1
0

api.go 729 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package s3
  3. import (
  4. "bytes"
  5. "fmt"
  6. "io"
  7. "sync"
  8. "sync/atomic"
  9. "time"
  10. "github.com/aws/aws-sdk-go/aws"
  11. "github.com/aws/aws-sdk-go/aws/awserr"
  12. "github.com/aws/aws-sdk-go/aws/awsutil"
  13. "github.com/aws/aws-sdk-go/aws/client"
  14. "github.com/aws/aws-sdk-go/aws/request"
  15. "github.com/aws/aws-sdk-go/private/protocol"
  16. "github.com/aws/aws-sdk-go/private/protocol/eventstream"
  17. "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
  18. "github.com/aws/aws-sdk-go/private/protocol/rest"
  19. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  20. )
  21. const opAbortMultipartUpload = "AbortMultipartUpload"
  22. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  23. // client's request for the AbortMultipartUpload operation. The "output" return
  24. // value will be populated with the request's response once the request completes
  25. // successfuly.
  26. //
  27. // Use "Send" method on the returned Request to send the API call to the service.
  28. // the "output" return value is not valid until after Send returns without error.
  29. //
  30. // See AbortMultipartUpload for more information on using the AbortMultipartUpload
  31. // API call, and error handling.
  32. //
  33. // This method is useful when you want to inject custom logic or configuration
  34. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  35. //
  36. //
  37. // // Example sending a request using the AbortMultipartUploadRequest method.
  38. // req, resp := client.AbortMultipartUploadRequest(params)
  39. //
  40. // err := req.Send()
  41. // if err == nil { // resp is now filled
  42. // fmt.Println(resp)
  43. // }
  44. //
  45. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  46. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  47. op := &request.Operation{
  48. Name: opAbortMultipartUpload,
  49. HTTPMethod: "DELETE",
  50. HTTPPath: "/{Bucket}/{Key+}",
  51. }
  52. if input == nil {
  53. input = &AbortMultipartUploadInput{}
  54. }
  55. output = &AbortMultipartUploadOutput{}
  56. req = c.newRequest(op, input, output)
  57. return
  58. }
  59. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  60. //
  61. // Aborts a multipart upload.
  62. //
  63. // To verify that all parts have been removed, so you don't get charged for
  64. // the part storage, you should call the List Parts operation and ensure the
  65. // parts list is empty.
  66. //
  67. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  68. // with awserr.Error's Code and Message methods to get detailed information about
  69. // the error.
  70. //
  71. // See the AWS API reference guide for Amazon Simple Storage Service's
  72. // API operation AbortMultipartUpload for usage and error information.
  73. //
  74. // Returned Error Codes:
  75. // * ErrCodeNoSuchUpload "NoSuchUpload"
  76. // The specified multipart upload does not exist.
  77. //
  78. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  79. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  80. req, out := c.AbortMultipartUploadRequest(input)
  81. return out, req.Send()
  82. }
  83. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  84. // the ability to pass a context and additional request options.
  85. //
  86. // See AbortMultipartUpload for details on how to use this API operation.
  87. //
  88. // The context must be non-nil and will be used for request cancellation. If
  89. // the context is nil a panic will occur. In the future the SDK may create
  90. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  91. // for more information on using Contexts.
  92. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  93. req, out := c.AbortMultipartUploadRequest(input)
  94. req.SetContext(ctx)
  95. req.ApplyOptions(opts...)
  96. return out, req.Send()
  97. }
  98. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  99. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  100. // client's request for the CompleteMultipartUpload operation. The "output" return
  101. // value will be populated with the request's response once the request completes
  102. // successfuly.
  103. //
  104. // Use "Send" method on the returned Request to send the API call to the service.
  105. // the "output" return value is not valid until after Send returns without error.
  106. //
  107. // See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
  108. // API call, and error handling.
  109. //
  110. // This method is useful when you want to inject custom logic or configuration
  111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  112. //
  113. //
  114. // // Example sending a request using the CompleteMultipartUploadRequest method.
  115. // req, resp := client.CompleteMultipartUploadRequest(params)
  116. //
  117. // err := req.Send()
  118. // if err == nil { // resp is now filled
  119. // fmt.Println(resp)
  120. // }
  121. //
  122. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  123. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  124. op := &request.Operation{
  125. Name: opCompleteMultipartUpload,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/{Bucket}/{Key+}",
  128. }
  129. if input == nil {
  130. input = &CompleteMultipartUploadInput{}
  131. }
  132. output = &CompleteMultipartUploadOutput{}
  133. req = c.newRequest(op, input, output)
  134. return
  135. }
  136. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  137. //
  138. // Completes a multipart upload by assembling previously uploaded parts.
  139. //
  140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  141. // with awserr.Error's Code and Message methods to get detailed information about
  142. // the error.
  143. //
  144. // See the AWS API reference guide for Amazon Simple Storage Service's
  145. // API operation CompleteMultipartUpload for usage and error information.
  146. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  147. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  148. req, out := c.CompleteMultipartUploadRequest(input)
  149. return out, req.Send()
  150. }
  151. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  152. // the ability to pass a context and additional request options.
  153. //
  154. // See CompleteMultipartUpload for details on how to use this API operation.
  155. //
  156. // The context must be non-nil and will be used for request cancellation. If
  157. // the context is nil a panic will occur. In the future the SDK may create
  158. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  159. // for more information on using Contexts.
  160. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  161. req, out := c.CompleteMultipartUploadRequest(input)
  162. req.SetContext(ctx)
  163. req.ApplyOptions(opts...)
  164. return out, req.Send()
  165. }
  166. const opCopyObject = "CopyObject"
  167. // CopyObjectRequest generates a "aws/request.Request" representing the
  168. // client's request for the CopyObject operation. The "output" return
  169. // value will be populated with the request's response once the request completes
  170. // successfuly.
  171. //
  172. // Use "Send" method on the returned Request to send the API call to the service.
  173. // the "output" return value is not valid until after Send returns without error.
  174. //
  175. // See CopyObject for more information on using the CopyObject
  176. // API call, and error handling.
  177. //
  178. // This method is useful when you want to inject custom logic or configuration
  179. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  180. //
  181. //
  182. // // Example sending a request using the CopyObjectRequest method.
  183. // req, resp := client.CopyObjectRequest(params)
  184. //
  185. // err := req.Send()
  186. // if err == nil { // resp is now filled
  187. // fmt.Println(resp)
  188. // }
  189. //
  190. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  191. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  192. op := &request.Operation{
  193. Name: opCopyObject,
  194. HTTPMethod: "PUT",
  195. HTTPPath: "/{Bucket}/{Key+}",
  196. }
  197. if input == nil {
  198. input = &CopyObjectInput{}
  199. }
  200. output = &CopyObjectOutput{}
  201. req = c.newRequest(op, input, output)
  202. return
  203. }
  204. // CopyObject API operation for Amazon Simple Storage Service.
  205. //
  206. // Creates a copy of an object that is already stored in Amazon S3.
  207. //
  208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  209. // with awserr.Error's Code and Message methods to get detailed information about
  210. // the error.
  211. //
  212. // See the AWS API reference guide for Amazon Simple Storage Service's
  213. // API operation CopyObject for usage and error information.
  214. //
  215. // Returned Error Codes:
  216. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  217. // The source object of the COPY operation is not in the active tier and is
  218. // only stored in Amazon Glacier.
  219. //
  220. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  221. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  222. req, out := c.CopyObjectRequest(input)
  223. return out, req.Send()
  224. }
  225. // CopyObjectWithContext is the same as CopyObject with the addition of
  226. // the ability to pass a context and additional request options.
  227. //
  228. // See CopyObject for details on how to use this API operation.
  229. //
  230. // The context must be non-nil and will be used for request cancellation. If
  231. // the context is nil a panic will occur. In the future the SDK may create
  232. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  233. // for more information on using Contexts.
  234. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  235. req, out := c.CopyObjectRequest(input)
  236. req.SetContext(ctx)
  237. req.ApplyOptions(opts...)
  238. return out, req.Send()
  239. }
  240. const opCreateBucket = "CreateBucket"
  241. // CreateBucketRequest generates a "aws/request.Request" representing the
  242. // client's request for the CreateBucket operation. The "output" return
  243. // value will be populated with the request's response once the request completes
  244. // successfuly.
  245. //
  246. // Use "Send" method on the returned Request to send the API call to the service.
  247. // the "output" return value is not valid until after Send returns without error.
  248. //
  249. // See CreateBucket for more information on using the CreateBucket
  250. // API call, and error handling.
  251. //
  252. // This method is useful when you want to inject custom logic or configuration
  253. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  254. //
  255. //
  256. // // Example sending a request using the CreateBucketRequest method.
  257. // req, resp := client.CreateBucketRequest(params)
  258. //
  259. // err := req.Send()
  260. // if err == nil { // resp is now filled
  261. // fmt.Println(resp)
  262. // }
  263. //
  264. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  265. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  266. op := &request.Operation{
  267. Name: opCreateBucket,
  268. HTTPMethod: "PUT",
  269. HTTPPath: "/{Bucket}",
  270. }
  271. if input == nil {
  272. input = &CreateBucketInput{}
  273. }
  274. output = &CreateBucketOutput{}
  275. req = c.newRequest(op, input, output)
  276. return
  277. }
  278. // CreateBucket API operation for Amazon Simple Storage Service.
  279. //
  280. // Creates a new bucket.
  281. //
  282. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  283. // with awserr.Error's Code and Message methods to get detailed information about
  284. // the error.
  285. //
  286. // See the AWS API reference guide for Amazon Simple Storage Service's
  287. // API operation CreateBucket for usage and error information.
  288. //
  289. // Returned Error Codes:
  290. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  291. // The requested bucket name is not available. The bucket namespace is shared
  292. // by all users of the system. Please select a different name and try again.
  293. //
  294. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  295. //
  296. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  297. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  298. req, out := c.CreateBucketRequest(input)
  299. return out, req.Send()
  300. }
  301. // CreateBucketWithContext is the same as CreateBucket with the addition of
  302. // the ability to pass a context and additional request options.
  303. //
  304. // See CreateBucket for details on how to use this API operation.
  305. //
  306. // The context must be non-nil and will be used for request cancellation. If
  307. // the context is nil a panic will occur. In the future the SDK may create
  308. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  309. // for more information on using Contexts.
  310. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  311. req, out := c.CreateBucketRequest(input)
  312. req.SetContext(ctx)
  313. req.ApplyOptions(opts...)
  314. return out, req.Send()
  315. }
  316. const opCreateMultipartUpload = "CreateMultipartUpload"
  317. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  318. // client's request for the CreateMultipartUpload operation. The "output" return
  319. // value will be populated with the request's response once the request completes
  320. // successfuly.
  321. //
  322. // Use "Send" method on the returned Request to send the API call to the service.
  323. // the "output" return value is not valid until after Send returns without error.
  324. //
  325. // See CreateMultipartUpload for more information on using the CreateMultipartUpload
  326. // API call, and error handling.
  327. //
  328. // This method is useful when you want to inject custom logic or configuration
  329. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  330. //
  331. //
  332. // // Example sending a request using the CreateMultipartUploadRequest method.
  333. // req, resp := client.CreateMultipartUploadRequest(params)
  334. //
  335. // err := req.Send()
  336. // if err == nil { // resp is now filled
  337. // fmt.Println(resp)
  338. // }
  339. //
  340. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  341. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  342. op := &request.Operation{
  343. Name: opCreateMultipartUpload,
  344. HTTPMethod: "POST",
  345. HTTPPath: "/{Bucket}/{Key+}?uploads",
  346. }
  347. if input == nil {
  348. input = &CreateMultipartUploadInput{}
  349. }
  350. output = &CreateMultipartUploadOutput{}
  351. req = c.newRequest(op, input, output)
  352. return
  353. }
  354. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  355. //
  356. // Initiates a multipart upload and returns an upload ID.
  357. //
  358. // Note: After you initiate multipart upload and upload one or more parts, you
  359. // must either complete or abort multipart upload in order to stop getting charged
  360. // for storage of the uploaded parts. Only after you either complete or abort
  361. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  362. // you for the parts storage.
  363. //
  364. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  365. // with awserr.Error's Code and Message methods to get detailed information about
  366. // the error.
  367. //
  368. // See the AWS API reference guide for Amazon Simple Storage Service's
  369. // API operation CreateMultipartUpload for usage and error information.
  370. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  371. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  372. req, out := c.CreateMultipartUploadRequest(input)
  373. return out, req.Send()
  374. }
  375. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  376. // the ability to pass a context and additional request options.
  377. //
  378. // See CreateMultipartUpload for details on how to use this API operation.
  379. //
  380. // The context must be non-nil and will be used for request cancellation. If
  381. // the context is nil a panic will occur. In the future the SDK may create
  382. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  383. // for more information on using Contexts.
  384. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  385. req, out := c.CreateMultipartUploadRequest(input)
  386. req.SetContext(ctx)
  387. req.ApplyOptions(opts...)
  388. return out, req.Send()
  389. }
  390. const opDeleteBucket = "DeleteBucket"
  391. // DeleteBucketRequest generates a "aws/request.Request" representing the
  392. // client's request for the DeleteBucket operation. The "output" return
  393. // value will be populated with the request's response once the request completes
  394. // successfuly.
  395. //
  396. // Use "Send" method on the returned Request to send the API call to the service.
  397. // the "output" return value is not valid until after Send returns without error.
  398. //
  399. // See DeleteBucket for more information on using the DeleteBucket
  400. // API call, and error handling.
  401. //
  402. // This method is useful when you want to inject custom logic or configuration
  403. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  404. //
  405. //
  406. // // Example sending a request using the DeleteBucketRequest method.
  407. // req, resp := client.DeleteBucketRequest(params)
  408. //
  409. // err := req.Send()
  410. // if err == nil { // resp is now filled
  411. // fmt.Println(resp)
  412. // }
  413. //
  414. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  415. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  416. op := &request.Operation{
  417. Name: opDeleteBucket,
  418. HTTPMethod: "DELETE",
  419. HTTPPath: "/{Bucket}",
  420. }
  421. if input == nil {
  422. input = &DeleteBucketInput{}
  423. }
  424. output = &DeleteBucketOutput{}
  425. req = c.newRequest(op, input, output)
  426. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  427. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  428. return
  429. }
  430. // DeleteBucket API operation for Amazon Simple Storage Service.
  431. //
  432. // Deletes the bucket. All objects (including all object versions and Delete
  433. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  434. //
  435. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  436. // with awserr.Error's Code and Message methods to get detailed information about
  437. // the error.
  438. //
  439. // See the AWS API reference guide for Amazon Simple Storage Service's
  440. // API operation DeleteBucket for usage and error information.
  441. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  442. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  443. req, out := c.DeleteBucketRequest(input)
  444. return out, req.Send()
  445. }
  446. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  447. // the ability to pass a context and additional request options.
  448. //
  449. // See DeleteBucket for details on how to use this API operation.
  450. //
  451. // The context must be non-nil and will be used for request cancellation. If
  452. // the context is nil a panic will occur. In the future the SDK may create
  453. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  454. // for more information on using Contexts.
  455. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  456. req, out := c.DeleteBucketRequest(input)
  457. req.SetContext(ctx)
  458. req.ApplyOptions(opts...)
  459. return out, req.Send()
  460. }
  461. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  462. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  463. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  464. // value will be populated with the request's response once the request completes
  465. // successfuly.
  466. //
  467. // Use "Send" method on the returned Request to send the API call to the service.
  468. // the "output" return value is not valid until after Send returns without error.
  469. //
  470. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  471. // API call, and error handling.
  472. //
  473. // This method is useful when you want to inject custom logic or configuration
  474. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  475. //
  476. //
  477. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  478. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  479. //
  480. // err := req.Send()
  481. // if err == nil { // resp is now filled
  482. // fmt.Println(resp)
  483. // }
  484. //
  485. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  486. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  487. op := &request.Operation{
  488. Name: opDeleteBucketAnalyticsConfiguration,
  489. HTTPMethod: "DELETE",
  490. HTTPPath: "/{Bucket}?analytics",
  491. }
  492. if input == nil {
  493. input = &DeleteBucketAnalyticsConfigurationInput{}
  494. }
  495. output = &DeleteBucketAnalyticsConfigurationOutput{}
  496. req = c.newRequest(op, input, output)
  497. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  498. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  499. return
  500. }
  501. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  502. //
  503. // Deletes an analytics configuration for the bucket (specified by the analytics
  504. // configuration ID).
  505. //
  506. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  507. // with awserr.Error's Code and Message methods to get detailed information about
  508. // the error.
  509. //
  510. // See the AWS API reference guide for Amazon Simple Storage Service's
  511. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  512. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  513. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  514. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  515. return out, req.Send()
  516. }
  517. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  518. // the ability to pass a context and additional request options.
  519. //
  520. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  521. //
  522. // The context must be non-nil and will be used for request cancellation. If
  523. // the context is nil a panic will occur. In the future the SDK may create
  524. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  525. // for more information on using Contexts.
  526. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  527. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  528. req.SetContext(ctx)
  529. req.ApplyOptions(opts...)
  530. return out, req.Send()
  531. }
  532. const opDeleteBucketCors = "DeleteBucketCors"
  533. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  534. // client's request for the DeleteBucketCors operation. The "output" return
  535. // value will be populated with the request's response once the request completes
  536. // successfuly.
  537. //
  538. // Use "Send" method on the returned Request to send the API call to the service.
  539. // the "output" return value is not valid until after Send returns without error.
  540. //
  541. // See DeleteBucketCors for more information on using the DeleteBucketCors
  542. // API call, and error handling.
  543. //
  544. // This method is useful when you want to inject custom logic or configuration
  545. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  546. //
  547. //
  548. // // Example sending a request using the DeleteBucketCorsRequest method.
  549. // req, resp := client.DeleteBucketCorsRequest(params)
  550. //
  551. // err := req.Send()
  552. // if err == nil { // resp is now filled
  553. // fmt.Println(resp)
  554. // }
  555. //
  556. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  557. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  558. op := &request.Operation{
  559. Name: opDeleteBucketCors,
  560. HTTPMethod: "DELETE",
  561. HTTPPath: "/{Bucket}?cors",
  562. }
  563. if input == nil {
  564. input = &DeleteBucketCorsInput{}
  565. }
  566. output = &DeleteBucketCorsOutput{}
  567. req = c.newRequest(op, input, output)
  568. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  569. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  570. return
  571. }
  572. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  573. //
  574. // Deletes the cors configuration information set for the bucket.
  575. //
  576. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  577. // with awserr.Error's Code and Message methods to get detailed information about
  578. // the error.
  579. //
  580. // See the AWS API reference guide for Amazon Simple Storage Service's
  581. // API operation DeleteBucketCors for usage and error information.
  582. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  583. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  584. req, out := c.DeleteBucketCorsRequest(input)
  585. return out, req.Send()
  586. }
  587. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  588. // the ability to pass a context and additional request options.
  589. //
  590. // See DeleteBucketCors for details on how to use this API operation.
  591. //
  592. // The context must be non-nil and will be used for request cancellation. If
  593. // the context is nil a panic will occur. In the future the SDK may create
  594. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  595. // for more information on using Contexts.
  596. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  597. req, out := c.DeleteBucketCorsRequest(input)
  598. req.SetContext(ctx)
  599. req.ApplyOptions(opts...)
  600. return out, req.Send()
  601. }
  602. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  603. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  604. // client's request for the DeleteBucketEncryption operation. The "output" return
  605. // value will be populated with the request's response once the request completes
  606. // successfuly.
  607. //
  608. // Use "Send" method on the returned Request to send the API call to the service.
  609. // the "output" return value is not valid until after Send returns without error.
  610. //
  611. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  612. // API call, and error handling.
  613. //
  614. // This method is useful when you want to inject custom logic or configuration
  615. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  616. //
  617. //
  618. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  619. // req, resp := client.DeleteBucketEncryptionRequest(params)
  620. //
  621. // err := req.Send()
  622. // if err == nil { // resp is now filled
  623. // fmt.Println(resp)
  624. // }
  625. //
  626. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  627. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  628. op := &request.Operation{
  629. Name: opDeleteBucketEncryption,
  630. HTTPMethod: "DELETE",
  631. HTTPPath: "/{Bucket}?encryption",
  632. }
  633. if input == nil {
  634. input = &DeleteBucketEncryptionInput{}
  635. }
  636. output = &DeleteBucketEncryptionOutput{}
  637. req = c.newRequest(op, input, output)
  638. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  639. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  640. return
  641. }
  642. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  643. //
  644. // Deletes the server-side encryption configuration from the bucket.
  645. //
  646. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  647. // with awserr.Error's Code and Message methods to get detailed information about
  648. // the error.
  649. //
  650. // See the AWS API reference guide for Amazon Simple Storage Service's
  651. // API operation DeleteBucketEncryption for usage and error information.
  652. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  653. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  654. req, out := c.DeleteBucketEncryptionRequest(input)
  655. return out, req.Send()
  656. }
  657. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  658. // the ability to pass a context and additional request options.
  659. //
  660. // See DeleteBucketEncryption for details on how to use this API operation.
  661. //
  662. // The context must be non-nil and will be used for request cancellation. If
  663. // the context is nil a panic will occur. In the future the SDK may create
  664. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  665. // for more information on using Contexts.
  666. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  667. req, out := c.DeleteBucketEncryptionRequest(input)
  668. req.SetContext(ctx)
  669. req.ApplyOptions(opts...)
  670. return out, req.Send()
  671. }
  672. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  673. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  674. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  675. // value will be populated with the request's response once the request completes
  676. // successfuly.
  677. //
  678. // Use "Send" method on the returned Request to send the API call to the service.
  679. // the "output" return value is not valid until after Send returns without error.
  680. //
  681. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  682. // API call, and error handling.
  683. //
  684. // This method is useful when you want to inject custom logic or configuration
  685. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  686. //
  687. //
  688. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  689. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  690. //
  691. // err := req.Send()
  692. // if err == nil { // resp is now filled
  693. // fmt.Println(resp)
  694. // }
  695. //
  696. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  697. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  698. op := &request.Operation{
  699. Name: opDeleteBucketInventoryConfiguration,
  700. HTTPMethod: "DELETE",
  701. HTTPPath: "/{Bucket}?inventory",
  702. }
  703. if input == nil {
  704. input = &DeleteBucketInventoryConfigurationInput{}
  705. }
  706. output = &DeleteBucketInventoryConfigurationOutput{}
  707. req = c.newRequest(op, input, output)
  708. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  709. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  710. return
  711. }
  712. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  713. //
  714. // Deletes an inventory configuration (identified by the inventory ID) from
  715. // the bucket.
  716. //
  717. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  718. // with awserr.Error's Code and Message methods to get detailed information about
  719. // the error.
  720. //
  721. // See the AWS API reference guide for Amazon Simple Storage Service's
  722. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  723. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  724. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  725. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  726. return out, req.Send()
  727. }
  728. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  729. // the ability to pass a context and additional request options.
  730. //
  731. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  732. //
  733. // The context must be non-nil and will be used for request cancellation. If
  734. // the context is nil a panic will occur. In the future the SDK may create
  735. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  736. // for more information on using Contexts.
  737. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  738. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  739. req.SetContext(ctx)
  740. req.ApplyOptions(opts...)
  741. return out, req.Send()
  742. }
  743. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  744. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  745. // client's request for the DeleteBucketLifecycle operation. The "output" return
  746. // value will be populated with the request's response once the request completes
  747. // successfuly.
  748. //
  749. // Use "Send" method on the returned Request to send the API call to the service.
  750. // the "output" return value is not valid until after Send returns without error.
  751. //
  752. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  753. // API call, and error handling.
  754. //
  755. // This method is useful when you want to inject custom logic or configuration
  756. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  757. //
  758. //
  759. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  760. // req, resp := client.DeleteBucketLifecycleRequest(params)
  761. //
  762. // err := req.Send()
  763. // if err == nil { // resp is now filled
  764. // fmt.Println(resp)
  765. // }
  766. //
  767. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  768. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  769. op := &request.Operation{
  770. Name: opDeleteBucketLifecycle,
  771. HTTPMethod: "DELETE",
  772. HTTPPath: "/{Bucket}?lifecycle",
  773. }
  774. if input == nil {
  775. input = &DeleteBucketLifecycleInput{}
  776. }
  777. output = &DeleteBucketLifecycleOutput{}
  778. req = c.newRequest(op, input, output)
  779. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  780. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  781. return
  782. }
  783. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  784. //
  785. // Deletes the lifecycle configuration from the bucket.
  786. //
  787. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  788. // with awserr.Error's Code and Message methods to get detailed information about
  789. // the error.
  790. //
  791. // See the AWS API reference guide for Amazon Simple Storage Service's
  792. // API operation DeleteBucketLifecycle for usage and error information.
  793. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  794. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  795. req, out := c.DeleteBucketLifecycleRequest(input)
  796. return out, req.Send()
  797. }
  798. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  799. // the ability to pass a context and additional request options.
  800. //
  801. // See DeleteBucketLifecycle for details on how to use this API operation.
  802. //
  803. // The context must be non-nil and will be used for request cancellation. If
  804. // the context is nil a panic will occur. In the future the SDK may create
  805. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  806. // for more information on using Contexts.
  807. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  808. req, out := c.DeleteBucketLifecycleRequest(input)
  809. req.SetContext(ctx)
  810. req.ApplyOptions(opts...)
  811. return out, req.Send()
  812. }
  813. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  814. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  815. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  816. // value will be populated with the request's response once the request completes
  817. // successfuly.
  818. //
  819. // Use "Send" method on the returned Request to send the API call to the service.
  820. // the "output" return value is not valid until after Send returns without error.
  821. //
  822. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  823. // API call, and error handling.
  824. //
  825. // This method is useful when you want to inject custom logic or configuration
  826. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  827. //
  828. //
  829. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  830. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  831. //
  832. // err := req.Send()
  833. // if err == nil { // resp is now filled
  834. // fmt.Println(resp)
  835. // }
  836. //
  837. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  838. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  839. op := &request.Operation{
  840. Name: opDeleteBucketMetricsConfiguration,
  841. HTTPMethod: "DELETE",
  842. HTTPPath: "/{Bucket}?metrics",
  843. }
  844. if input == nil {
  845. input = &DeleteBucketMetricsConfigurationInput{}
  846. }
  847. output = &DeleteBucketMetricsConfigurationOutput{}
  848. req = c.newRequest(op, input, output)
  849. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  850. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  851. return
  852. }
  853. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  854. //
  855. // Deletes a metrics configuration (specified by the metrics configuration ID)
  856. // from the bucket.
  857. //
  858. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  859. // with awserr.Error's Code and Message methods to get detailed information about
  860. // the error.
  861. //
  862. // See the AWS API reference guide for Amazon Simple Storage Service's
  863. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  864. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  865. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  866. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  867. return out, req.Send()
  868. }
  869. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  870. // the ability to pass a context and additional request options.
  871. //
  872. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  873. //
  874. // The context must be non-nil and will be used for request cancellation. If
  875. // the context is nil a panic will occur. In the future the SDK may create
  876. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  877. // for more information on using Contexts.
  878. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  879. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  880. req.SetContext(ctx)
  881. req.ApplyOptions(opts...)
  882. return out, req.Send()
  883. }
  884. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  885. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  886. // client's request for the DeleteBucketPolicy operation. The "output" return
  887. // value will be populated with the request's response once the request completes
  888. // successfuly.
  889. //
  890. // Use "Send" method on the returned Request to send the API call to the service.
  891. // the "output" return value is not valid until after Send returns without error.
  892. //
  893. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  894. // API call, and error handling.
  895. //
  896. // This method is useful when you want to inject custom logic or configuration
  897. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  898. //
  899. //
  900. // // Example sending a request using the DeleteBucketPolicyRequest method.
  901. // req, resp := client.DeleteBucketPolicyRequest(params)
  902. //
  903. // err := req.Send()
  904. // if err == nil { // resp is now filled
  905. // fmt.Println(resp)
  906. // }
  907. //
  908. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  909. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  910. op := &request.Operation{
  911. Name: opDeleteBucketPolicy,
  912. HTTPMethod: "DELETE",
  913. HTTPPath: "/{Bucket}?policy",
  914. }
  915. if input == nil {
  916. input = &DeleteBucketPolicyInput{}
  917. }
  918. output = &DeleteBucketPolicyOutput{}
  919. req = c.newRequest(op, input, output)
  920. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  921. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  922. return
  923. }
  924. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  925. //
  926. // Deletes the policy from the bucket.
  927. //
  928. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  929. // with awserr.Error's Code and Message methods to get detailed information about
  930. // the error.
  931. //
  932. // See the AWS API reference guide for Amazon Simple Storage Service's
  933. // API operation DeleteBucketPolicy for usage and error information.
  934. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  935. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  936. req, out := c.DeleteBucketPolicyRequest(input)
  937. return out, req.Send()
  938. }
  939. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  940. // the ability to pass a context and additional request options.
  941. //
  942. // See DeleteBucketPolicy for details on how to use this API operation.
  943. //
  944. // The context must be non-nil and will be used for request cancellation. If
  945. // the context is nil a panic will occur. In the future the SDK may create
  946. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  947. // for more information on using Contexts.
  948. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  949. req, out := c.DeleteBucketPolicyRequest(input)
  950. req.SetContext(ctx)
  951. req.ApplyOptions(opts...)
  952. return out, req.Send()
  953. }
  954. const opDeleteBucketReplication = "DeleteBucketReplication"
  955. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  956. // client's request for the DeleteBucketReplication operation. The "output" return
  957. // value will be populated with the request's response once the request completes
  958. // successfuly.
  959. //
  960. // Use "Send" method on the returned Request to send the API call to the service.
  961. // the "output" return value is not valid until after Send returns without error.
  962. //
  963. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  964. // API call, and error handling.
  965. //
  966. // This method is useful when you want to inject custom logic or configuration
  967. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  968. //
  969. //
  970. // // Example sending a request using the DeleteBucketReplicationRequest method.
  971. // req, resp := client.DeleteBucketReplicationRequest(params)
  972. //
  973. // err := req.Send()
  974. // if err == nil { // resp is now filled
  975. // fmt.Println(resp)
  976. // }
  977. //
  978. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  979. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  980. op := &request.Operation{
  981. Name: opDeleteBucketReplication,
  982. HTTPMethod: "DELETE",
  983. HTTPPath: "/{Bucket}?replication",
  984. }
  985. if input == nil {
  986. input = &DeleteBucketReplicationInput{}
  987. }
  988. output = &DeleteBucketReplicationOutput{}
  989. req = c.newRequest(op, input, output)
  990. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  991. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  992. return
  993. }
  994. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  995. //
  996. // Deletes the replication configuration from the bucket.
  997. //
  998. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  999. // with awserr.Error's Code and Message methods to get detailed information about
  1000. // the error.
  1001. //
  1002. // See the AWS API reference guide for Amazon Simple Storage Service's
  1003. // API operation DeleteBucketReplication for usage and error information.
  1004. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  1005. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  1006. req, out := c.DeleteBucketReplicationRequest(input)
  1007. return out, req.Send()
  1008. }
  1009. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1010. // the ability to pass a context and additional request options.
  1011. //
  1012. // See DeleteBucketReplication for details on how to use this API operation.
  1013. //
  1014. // The context must be non-nil and will be used for request cancellation. If
  1015. // the context is nil a panic will occur. In the future the SDK may create
  1016. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1017. // for more information on using Contexts.
  1018. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1019. req, out := c.DeleteBucketReplicationRequest(input)
  1020. req.SetContext(ctx)
  1021. req.ApplyOptions(opts...)
  1022. return out, req.Send()
  1023. }
  1024. const opDeleteBucketTagging = "DeleteBucketTagging"
  1025. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1026. // client's request for the DeleteBucketTagging operation. The "output" return
  1027. // value will be populated with the request's response once the request completes
  1028. // successfuly.
  1029. //
  1030. // Use "Send" method on the returned Request to send the API call to the service.
  1031. // the "output" return value is not valid until after Send returns without error.
  1032. //
  1033. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1034. // API call, and error handling.
  1035. //
  1036. // This method is useful when you want to inject custom logic or configuration
  1037. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1038. //
  1039. //
  1040. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1041. // req, resp := client.DeleteBucketTaggingRequest(params)
  1042. //
  1043. // err := req.Send()
  1044. // if err == nil { // resp is now filled
  1045. // fmt.Println(resp)
  1046. // }
  1047. //
  1048. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1049. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1050. op := &request.Operation{
  1051. Name: opDeleteBucketTagging,
  1052. HTTPMethod: "DELETE",
  1053. HTTPPath: "/{Bucket}?tagging",
  1054. }
  1055. if input == nil {
  1056. input = &DeleteBucketTaggingInput{}
  1057. }
  1058. output = &DeleteBucketTaggingOutput{}
  1059. req = c.newRequest(op, input, output)
  1060. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1061. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1062. return
  1063. }
  1064. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1065. //
  1066. // Deletes the tags from the bucket.
  1067. //
  1068. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1069. // with awserr.Error's Code and Message methods to get detailed information about
  1070. // the error.
  1071. //
  1072. // See the AWS API reference guide for Amazon Simple Storage Service's
  1073. // API operation DeleteBucketTagging for usage and error information.
  1074. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1075. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1076. req, out := c.DeleteBucketTaggingRequest(input)
  1077. return out, req.Send()
  1078. }
  1079. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1080. // the ability to pass a context and additional request options.
  1081. //
  1082. // See DeleteBucketTagging for details on how to use this API operation.
  1083. //
  1084. // The context must be non-nil and will be used for request cancellation. If
  1085. // the context is nil a panic will occur. In the future the SDK may create
  1086. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1087. // for more information on using Contexts.
  1088. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1089. req, out := c.DeleteBucketTaggingRequest(input)
  1090. req.SetContext(ctx)
  1091. req.ApplyOptions(opts...)
  1092. return out, req.Send()
  1093. }
  1094. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1095. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1096. // client's request for the DeleteBucketWebsite operation. The "output" return
  1097. // value will be populated with the request's response once the request completes
  1098. // successfuly.
  1099. //
  1100. // Use "Send" method on the returned Request to send the API call to the service.
  1101. // the "output" return value is not valid until after Send returns without error.
  1102. //
  1103. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1104. // API call, and error handling.
  1105. //
  1106. // This method is useful when you want to inject custom logic or configuration
  1107. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1108. //
  1109. //
  1110. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1111. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1112. //
  1113. // err := req.Send()
  1114. // if err == nil { // resp is now filled
  1115. // fmt.Println(resp)
  1116. // }
  1117. //
  1118. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1119. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1120. op := &request.Operation{
  1121. Name: opDeleteBucketWebsite,
  1122. HTTPMethod: "DELETE",
  1123. HTTPPath: "/{Bucket}?website",
  1124. }
  1125. if input == nil {
  1126. input = &DeleteBucketWebsiteInput{}
  1127. }
  1128. output = &DeleteBucketWebsiteOutput{}
  1129. req = c.newRequest(op, input, output)
  1130. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1131. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1132. return
  1133. }
  1134. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1135. //
  1136. // This operation removes the website configuration from the bucket.
  1137. //
  1138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1139. // with awserr.Error's Code and Message methods to get detailed information about
  1140. // the error.
  1141. //
  1142. // See the AWS API reference guide for Amazon Simple Storage Service's
  1143. // API operation DeleteBucketWebsite for usage and error information.
  1144. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1145. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1146. req, out := c.DeleteBucketWebsiteRequest(input)
  1147. return out, req.Send()
  1148. }
  1149. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1150. // the ability to pass a context and additional request options.
  1151. //
  1152. // See DeleteBucketWebsite for details on how to use this API operation.
  1153. //
  1154. // The context must be non-nil and will be used for request cancellation. If
  1155. // the context is nil a panic will occur. In the future the SDK may create
  1156. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1157. // for more information on using Contexts.
  1158. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1159. req, out := c.DeleteBucketWebsiteRequest(input)
  1160. req.SetContext(ctx)
  1161. req.ApplyOptions(opts...)
  1162. return out, req.Send()
  1163. }
  1164. const opDeleteObject = "DeleteObject"
  1165. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1166. // client's request for the DeleteObject operation. The "output" return
  1167. // value will be populated with the request's response once the request completes
  1168. // successfuly.
  1169. //
  1170. // Use "Send" method on the returned Request to send the API call to the service.
  1171. // the "output" return value is not valid until after Send returns without error.
  1172. //
  1173. // See DeleteObject for more information on using the DeleteObject
  1174. // API call, and error handling.
  1175. //
  1176. // This method is useful when you want to inject custom logic or configuration
  1177. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1178. //
  1179. //
  1180. // // Example sending a request using the DeleteObjectRequest method.
  1181. // req, resp := client.DeleteObjectRequest(params)
  1182. //
  1183. // err := req.Send()
  1184. // if err == nil { // resp is now filled
  1185. // fmt.Println(resp)
  1186. // }
  1187. //
  1188. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1189. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1190. op := &request.Operation{
  1191. Name: opDeleteObject,
  1192. HTTPMethod: "DELETE",
  1193. HTTPPath: "/{Bucket}/{Key+}",
  1194. }
  1195. if input == nil {
  1196. input = &DeleteObjectInput{}
  1197. }
  1198. output = &DeleteObjectOutput{}
  1199. req = c.newRequest(op, input, output)
  1200. return
  1201. }
  1202. // DeleteObject API operation for Amazon Simple Storage Service.
  1203. //
  1204. // Removes the null version (if there is one) of an object and inserts a delete
  1205. // marker, which becomes the latest version of the object. If there isn't a
  1206. // null version, Amazon S3 does not remove any objects.
  1207. //
  1208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1209. // with awserr.Error's Code and Message methods to get detailed information about
  1210. // the error.
  1211. //
  1212. // See the AWS API reference guide for Amazon Simple Storage Service's
  1213. // API operation DeleteObject for usage and error information.
  1214. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1215. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1216. req, out := c.DeleteObjectRequest(input)
  1217. return out, req.Send()
  1218. }
  1219. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1220. // the ability to pass a context and additional request options.
  1221. //
  1222. // See DeleteObject for details on how to use this API operation.
  1223. //
  1224. // The context must be non-nil and will be used for request cancellation. If
  1225. // the context is nil a panic will occur. In the future the SDK may create
  1226. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1227. // for more information on using Contexts.
  1228. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1229. req, out := c.DeleteObjectRequest(input)
  1230. req.SetContext(ctx)
  1231. req.ApplyOptions(opts...)
  1232. return out, req.Send()
  1233. }
  1234. const opDeleteObjectTagging = "DeleteObjectTagging"
  1235. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1236. // client's request for the DeleteObjectTagging operation. The "output" return
  1237. // value will be populated with the request's response once the request completes
  1238. // successfuly.
  1239. //
  1240. // Use "Send" method on the returned Request to send the API call to the service.
  1241. // the "output" return value is not valid until after Send returns without error.
  1242. //
  1243. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  1244. // API call, and error handling.
  1245. //
  1246. // This method is useful when you want to inject custom logic or configuration
  1247. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1248. //
  1249. //
  1250. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1251. // req, resp := client.DeleteObjectTaggingRequest(params)
  1252. //
  1253. // err := req.Send()
  1254. // if err == nil { // resp is now filled
  1255. // fmt.Println(resp)
  1256. // }
  1257. //
  1258. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1259. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1260. op := &request.Operation{
  1261. Name: opDeleteObjectTagging,
  1262. HTTPMethod: "DELETE",
  1263. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1264. }
  1265. if input == nil {
  1266. input = &DeleteObjectTaggingInput{}
  1267. }
  1268. output = &DeleteObjectTaggingOutput{}
  1269. req = c.newRequest(op, input, output)
  1270. return
  1271. }
  1272. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1273. //
  1274. // Removes the tag-set from an existing object.
  1275. //
  1276. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1277. // with awserr.Error's Code and Message methods to get detailed information about
  1278. // the error.
  1279. //
  1280. // See the AWS API reference guide for Amazon Simple Storage Service's
  1281. // API operation DeleteObjectTagging for usage and error information.
  1282. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1283. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1284. req, out := c.DeleteObjectTaggingRequest(input)
  1285. return out, req.Send()
  1286. }
  1287. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1288. // the ability to pass a context and additional request options.
  1289. //
  1290. // See DeleteObjectTagging for details on how to use this API operation.
  1291. //
  1292. // The context must be non-nil and will be used for request cancellation. If
  1293. // the context is nil a panic will occur. In the future the SDK may create
  1294. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1295. // for more information on using Contexts.
  1296. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1297. req, out := c.DeleteObjectTaggingRequest(input)
  1298. req.SetContext(ctx)
  1299. req.ApplyOptions(opts...)
  1300. return out, req.Send()
  1301. }
  1302. const opDeleteObjects = "DeleteObjects"
  1303. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1304. // client's request for the DeleteObjects operation. The "output" return
  1305. // value will be populated with the request's response once the request completes
  1306. // successfuly.
  1307. //
  1308. // Use "Send" method on the returned Request to send the API call to the service.
  1309. // the "output" return value is not valid until after Send returns without error.
  1310. //
  1311. // See DeleteObjects for more information on using the DeleteObjects
  1312. // API call, and error handling.
  1313. //
  1314. // This method is useful when you want to inject custom logic or configuration
  1315. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1316. //
  1317. //
  1318. // // Example sending a request using the DeleteObjectsRequest method.
  1319. // req, resp := client.DeleteObjectsRequest(params)
  1320. //
  1321. // err := req.Send()
  1322. // if err == nil { // resp is now filled
  1323. // fmt.Println(resp)
  1324. // }
  1325. //
  1326. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1327. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1328. op := &request.Operation{
  1329. Name: opDeleteObjects,
  1330. HTTPMethod: "POST",
  1331. HTTPPath: "/{Bucket}?delete",
  1332. }
  1333. if input == nil {
  1334. input = &DeleteObjectsInput{}
  1335. }
  1336. output = &DeleteObjectsOutput{}
  1337. req = c.newRequest(op, input, output)
  1338. return
  1339. }
  1340. // DeleteObjects API operation for Amazon Simple Storage Service.
  1341. //
  1342. // This operation enables you to delete multiple objects from a bucket using
  1343. // a single HTTP request. You may specify up to 1000 keys.
  1344. //
  1345. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1346. // with awserr.Error's Code and Message methods to get detailed information about
  1347. // the error.
  1348. //
  1349. // See the AWS API reference guide for Amazon Simple Storage Service's
  1350. // API operation DeleteObjects for usage and error information.
  1351. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1352. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1353. req, out := c.DeleteObjectsRequest(input)
  1354. return out, req.Send()
  1355. }
  1356. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1357. // the ability to pass a context and additional request options.
  1358. //
  1359. // See DeleteObjects for details on how to use this API operation.
  1360. //
  1361. // The context must be non-nil and will be used for request cancellation. If
  1362. // the context is nil a panic will occur. In the future the SDK may create
  1363. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1364. // for more information on using Contexts.
  1365. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1366. req, out := c.DeleteObjectsRequest(input)
  1367. req.SetContext(ctx)
  1368. req.ApplyOptions(opts...)
  1369. return out, req.Send()
  1370. }
  1371. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1372. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1373. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1374. // value will be populated with the request's response once the request completes
  1375. // successfuly.
  1376. //
  1377. // Use "Send" method on the returned Request to send the API call to the service.
  1378. // the "output" return value is not valid until after Send returns without error.
  1379. //
  1380. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  1381. // API call, and error handling.
  1382. //
  1383. // This method is useful when you want to inject custom logic or configuration
  1384. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1385. //
  1386. //
  1387. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1388. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1389. //
  1390. // err := req.Send()
  1391. // if err == nil { // resp is now filled
  1392. // fmt.Println(resp)
  1393. // }
  1394. //
  1395. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1396. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1397. op := &request.Operation{
  1398. Name: opGetBucketAccelerateConfiguration,
  1399. HTTPMethod: "GET",
  1400. HTTPPath: "/{Bucket}?accelerate",
  1401. }
  1402. if input == nil {
  1403. input = &GetBucketAccelerateConfigurationInput{}
  1404. }
  1405. output = &GetBucketAccelerateConfigurationOutput{}
  1406. req = c.newRequest(op, input, output)
  1407. return
  1408. }
  1409. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1410. //
  1411. // Returns the accelerate configuration of a bucket.
  1412. //
  1413. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1414. // with awserr.Error's Code and Message methods to get detailed information about
  1415. // the error.
  1416. //
  1417. // See the AWS API reference guide for Amazon Simple Storage Service's
  1418. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1419. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1420. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1421. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1422. return out, req.Send()
  1423. }
  1424. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1425. // the ability to pass a context and additional request options.
  1426. //
  1427. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1428. //
  1429. // The context must be non-nil and will be used for request cancellation. If
  1430. // the context is nil a panic will occur. In the future the SDK may create
  1431. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1432. // for more information on using Contexts.
  1433. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1434. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1435. req.SetContext(ctx)
  1436. req.ApplyOptions(opts...)
  1437. return out, req.Send()
  1438. }
  1439. const opGetBucketAcl = "GetBucketAcl"
  1440. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1441. // client's request for the GetBucketAcl operation. The "output" return
  1442. // value will be populated with the request's response once the request completes
  1443. // successfuly.
  1444. //
  1445. // Use "Send" method on the returned Request to send the API call to the service.
  1446. // the "output" return value is not valid until after Send returns without error.
  1447. //
  1448. // See GetBucketAcl for more information on using the GetBucketAcl
  1449. // API call, and error handling.
  1450. //
  1451. // This method is useful when you want to inject custom logic or configuration
  1452. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1453. //
  1454. //
  1455. // // Example sending a request using the GetBucketAclRequest method.
  1456. // req, resp := client.GetBucketAclRequest(params)
  1457. //
  1458. // err := req.Send()
  1459. // if err == nil { // resp is now filled
  1460. // fmt.Println(resp)
  1461. // }
  1462. //
  1463. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1464. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1465. op := &request.Operation{
  1466. Name: opGetBucketAcl,
  1467. HTTPMethod: "GET",
  1468. HTTPPath: "/{Bucket}?acl",
  1469. }
  1470. if input == nil {
  1471. input = &GetBucketAclInput{}
  1472. }
  1473. output = &GetBucketAclOutput{}
  1474. req = c.newRequest(op, input, output)
  1475. return
  1476. }
  1477. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1478. //
  1479. // Gets the access control policy for the bucket.
  1480. //
  1481. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1482. // with awserr.Error's Code and Message methods to get detailed information about
  1483. // the error.
  1484. //
  1485. // See the AWS API reference guide for Amazon Simple Storage Service's
  1486. // API operation GetBucketAcl for usage and error information.
  1487. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1488. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1489. req, out := c.GetBucketAclRequest(input)
  1490. return out, req.Send()
  1491. }
  1492. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1493. // the ability to pass a context and additional request options.
  1494. //
  1495. // See GetBucketAcl for details on how to use this API operation.
  1496. //
  1497. // The context must be non-nil and will be used for request cancellation. If
  1498. // the context is nil a panic will occur. In the future the SDK may create
  1499. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1500. // for more information on using Contexts.
  1501. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1502. req, out := c.GetBucketAclRequest(input)
  1503. req.SetContext(ctx)
  1504. req.ApplyOptions(opts...)
  1505. return out, req.Send()
  1506. }
  1507. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1508. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1509. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1510. // value will be populated with the request's response once the request completes
  1511. // successfuly.
  1512. //
  1513. // Use "Send" method on the returned Request to send the API call to the service.
  1514. // the "output" return value is not valid until after Send returns without error.
  1515. //
  1516. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  1517. // API call, and error handling.
  1518. //
  1519. // This method is useful when you want to inject custom logic or configuration
  1520. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1521. //
  1522. //
  1523. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1524. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1525. //
  1526. // err := req.Send()
  1527. // if err == nil { // resp is now filled
  1528. // fmt.Println(resp)
  1529. // }
  1530. //
  1531. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1532. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1533. op := &request.Operation{
  1534. Name: opGetBucketAnalyticsConfiguration,
  1535. HTTPMethod: "GET",
  1536. HTTPPath: "/{Bucket}?analytics",
  1537. }
  1538. if input == nil {
  1539. input = &GetBucketAnalyticsConfigurationInput{}
  1540. }
  1541. output = &GetBucketAnalyticsConfigurationOutput{}
  1542. req = c.newRequest(op, input, output)
  1543. return
  1544. }
  1545. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1546. //
  1547. // Gets an analytics configuration for the bucket (specified by the analytics
  1548. // configuration ID).
  1549. //
  1550. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1551. // with awserr.Error's Code and Message methods to get detailed information about
  1552. // the error.
  1553. //
  1554. // See the AWS API reference guide for Amazon Simple Storage Service's
  1555. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1556. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1557. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1558. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1559. return out, req.Send()
  1560. }
  1561. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1562. // the ability to pass a context and additional request options.
  1563. //
  1564. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1565. //
  1566. // The context must be non-nil and will be used for request cancellation. If
  1567. // the context is nil a panic will occur. In the future the SDK may create
  1568. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1569. // for more information on using Contexts.
  1570. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1571. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1572. req.SetContext(ctx)
  1573. req.ApplyOptions(opts...)
  1574. return out, req.Send()
  1575. }
  1576. const opGetBucketCors = "GetBucketCors"
  1577. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1578. // client's request for the GetBucketCors operation. The "output" return
  1579. // value will be populated with the request's response once the request completes
  1580. // successfuly.
  1581. //
  1582. // Use "Send" method on the returned Request to send the API call to the service.
  1583. // the "output" return value is not valid until after Send returns without error.
  1584. //
  1585. // See GetBucketCors for more information on using the GetBucketCors
  1586. // API call, and error handling.
  1587. //
  1588. // This method is useful when you want to inject custom logic or configuration
  1589. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1590. //
  1591. //
  1592. // // Example sending a request using the GetBucketCorsRequest method.
  1593. // req, resp := client.GetBucketCorsRequest(params)
  1594. //
  1595. // err := req.Send()
  1596. // if err == nil { // resp is now filled
  1597. // fmt.Println(resp)
  1598. // }
  1599. //
  1600. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1601. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1602. op := &request.Operation{
  1603. Name: opGetBucketCors,
  1604. HTTPMethod: "GET",
  1605. HTTPPath: "/{Bucket}?cors",
  1606. }
  1607. if input == nil {
  1608. input = &GetBucketCorsInput{}
  1609. }
  1610. output = &GetBucketCorsOutput{}
  1611. req = c.newRequest(op, input, output)
  1612. return
  1613. }
  1614. // GetBucketCors API operation for Amazon Simple Storage Service.
  1615. //
  1616. // Returns the cors configuration for the bucket.
  1617. //
  1618. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1619. // with awserr.Error's Code and Message methods to get detailed information about
  1620. // the error.
  1621. //
  1622. // See the AWS API reference guide for Amazon Simple Storage Service's
  1623. // API operation GetBucketCors for usage and error information.
  1624. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1625. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1626. req, out := c.GetBucketCorsRequest(input)
  1627. return out, req.Send()
  1628. }
  1629. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1630. // the ability to pass a context and additional request options.
  1631. //
  1632. // See GetBucketCors for details on how to use this API operation.
  1633. //
  1634. // The context must be non-nil and will be used for request cancellation. If
  1635. // the context is nil a panic will occur. In the future the SDK may create
  1636. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1637. // for more information on using Contexts.
  1638. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1639. req, out := c.GetBucketCorsRequest(input)
  1640. req.SetContext(ctx)
  1641. req.ApplyOptions(opts...)
  1642. return out, req.Send()
  1643. }
  1644. const opGetBucketEncryption = "GetBucketEncryption"
  1645. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  1646. // client's request for the GetBucketEncryption operation. The "output" return
  1647. // value will be populated with the request's response once the request completes
  1648. // successfuly.
  1649. //
  1650. // Use "Send" method on the returned Request to send the API call to the service.
  1651. // the "output" return value is not valid until after Send returns without error.
  1652. //
  1653. // See GetBucketEncryption for more information on using the GetBucketEncryption
  1654. // API call, and error handling.
  1655. //
  1656. // This method is useful when you want to inject custom logic or configuration
  1657. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1658. //
  1659. //
  1660. // // Example sending a request using the GetBucketEncryptionRequest method.
  1661. // req, resp := client.GetBucketEncryptionRequest(params)
  1662. //
  1663. // err := req.Send()
  1664. // if err == nil { // resp is now filled
  1665. // fmt.Println(resp)
  1666. // }
  1667. //
  1668. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1669. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  1670. op := &request.Operation{
  1671. Name: opGetBucketEncryption,
  1672. HTTPMethod: "GET",
  1673. HTTPPath: "/{Bucket}?encryption",
  1674. }
  1675. if input == nil {
  1676. input = &GetBucketEncryptionInput{}
  1677. }
  1678. output = &GetBucketEncryptionOutput{}
  1679. req = c.newRequest(op, input, output)
  1680. return
  1681. }
  1682. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  1683. //
  1684. // Returns the server-side encryption configuration of a bucket.
  1685. //
  1686. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1687. // with awserr.Error's Code and Message methods to get detailed information about
  1688. // the error.
  1689. //
  1690. // See the AWS API reference guide for Amazon Simple Storage Service's
  1691. // API operation GetBucketEncryption for usage and error information.
  1692. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1693. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  1694. req, out := c.GetBucketEncryptionRequest(input)
  1695. return out, req.Send()
  1696. }
  1697. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  1698. // the ability to pass a context and additional request options.
  1699. //
  1700. // See GetBucketEncryption for details on how to use this API operation.
  1701. //
  1702. // The context must be non-nil and will be used for request cancellation. If
  1703. // the context is nil a panic will occur. In the future the SDK may create
  1704. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1705. // for more information on using Contexts.
  1706. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  1707. req, out := c.GetBucketEncryptionRequest(input)
  1708. req.SetContext(ctx)
  1709. req.ApplyOptions(opts...)
  1710. return out, req.Send()
  1711. }
  1712. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1713. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1714. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1715. // value will be populated with the request's response once the request completes
  1716. // successfuly.
  1717. //
  1718. // Use "Send" method on the returned Request to send the API call to the service.
  1719. // the "output" return value is not valid until after Send returns without error.
  1720. //
  1721. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  1722. // API call, and error handling.
  1723. //
  1724. // This method is useful when you want to inject custom logic or configuration
  1725. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1726. //
  1727. //
  1728. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1729. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1730. //
  1731. // err := req.Send()
  1732. // if err == nil { // resp is now filled
  1733. // fmt.Println(resp)
  1734. // }
  1735. //
  1736. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1737. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1738. op := &request.Operation{
  1739. Name: opGetBucketInventoryConfiguration,
  1740. HTTPMethod: "GET",
  1741. HTTPPath: "/{Bucket}?inventory",
  1742. }
  1743. if input == nil {
  1744. input = &GetBucketInventoryConfigurationInput{}
  1745. }
  1746. output = &GetBucketInventoryConfigurationOutput{}
  1747. req = c.newRequest(op, input, output)
  1748. return
  1749. }
  1750. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1751. //
  1752. // Returns an inventory configuration (identified by the inventory ID) from
  1753. // the bucket.
  1754. //
  1755. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1756. // with awserr.Error's Code and Message methods to get detailed information about
  1757. // the error.
  1758. //
  1759. // See the AWS API reference guide for Amazon Simple Storage Service's
  1760. // API operation GetBucketInventoryConfiguration for usage and error information.
  1761. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1762. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1763. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1764. return out, req.Send()
  1765. }
  1766. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1767. // the ability to pass a context and additional request options.
  1768. //
  1769. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1770. //
  1771. // The context must be non-nil and will be used for request cancellation. If
  1772. // the context is nil a panic will occur. In the future the SDK may create
  1773. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1774. // for more information on using Contexts.
  1775. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1776. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1777. req.SetContext(ctx)
  1778. req.ApplyOptions(opts...)
  1779. return out, req.Send()
  1780. }
  1781. const opGetBucketLifecycle = "GetBucketLifecycle"
  1782. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1783. // client's request for the GetBucketLifecycle operation. The "output" return
  1784. // value will be populated with the request's response once the request completes
  1785. // successfuly.
  1786. //
  1787. // Use "Send" method on the returned Request to send the API call to the service.
  1788. // the "output" return value is not valid until after Send returns without error.
  1789. //
  1790. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  1791. // API call, and error handling.
  1792. //
  1793. // This method is useful when you want to inject custom logic or configuration
  1794. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1795. //
  1796. //
  1797. // // Example sending a request using the GetBucketLifecycleRequest method.
  1798. // req, resp := client.GetBucketLifecycleRequest(params)
  1799. //
  1800. // err := req.Send()
  1801. // if err == nil { // resp is now filled
  1802. // fmt.Println(resp)
  1803. // }
  1804. //
  1805. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1806. //
  1807. // Deprecated: GetBucketLifecycle has been deprecated
  1808. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1809. if c.Client.Config.Logger != nil {
  1810. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1811. }
  1812. op := &request.Operation{
  1813. Name: opGetBucketLifecycle,
  1814. HTTPMethod: "GET",
  1815. HTTPPath: "/{Bucket}?lifecycle",
  1816. }
  1817. if input == nil {
  1818. input = &GetBucketLifecycleInput{}
  1819. }
  1820. output = &GetBucketLifecycleOutput{}
  1821. req = c.newRequest(op, input, output)
  1822. return
  1823. }
  1824. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1825. //
  1826. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1827. //
  1828. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1829. // with awserr.Error's Code and Message methods to get detailed information about
  1830. // the error.
  1831. //
  1832. // See the AWS API reference guide for Amazon Simple Storage Service's
  1833. // API operation GetBucketLifecycle for usage and error information.
  1834. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1835. //
  1836. // Deprecated: GetBucketLifecycle has been deprecated
  1837. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1838. req, out := c.GetBucketLifecycleRequest(input)
  1839. return out, req.Send()
  1840. }
  1841. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1842. // the ability to pass a context and additional request options.
  1843. //
  1844. // See GetBucketLifecycle for details on how to use this API operation.
  1845. //
  1846. // The context must be non-nil and will be used for request cancellation. If
  1847. // the context is nil a panic will occur. In the future the SDK may create
  1848. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1849. // for more information on using Contexts.
  1850. //
  1851. // Deprecated: GetBucketLifecycleWithContext has been deprecated
  1852. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1853. req, out := c.GetBucketLifecycleRequest(input)
  1854. req.SetContext(ctx)
  1855. req.ApplyOptions(opts...)
  1856. return out, req.Send()
  1857. }
  1858. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1859. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1860. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1861. // value will be populated with the request's response once the request completes
  1862. // successfuly.
  1863. //
  1864. // Use "Send" method on the returned Request to send the API call to the service.
  1865. // the "output" return value is not valid until after Send returns without error.
  1866. //
  1867. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  1868. // API call, and error handling.
  1869. //
  1870. // This method is useful when you want to inject custom logic or configuration
  1871. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1872. //
  1873. //
  1874. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1875. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1876. //
  1877. // err := req.Send()
  1878. // if err == nil { // resp is now filled
  1879. // fmt.Println(resp)
  1880. // }
  1881. //
  1882. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1883. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1884. op := &request.Operation{
  1885. Name: opGetBucketLifecycleConfiguration,
  1886. HTTPMethod: "GET",
  1887. HTTPPath: "/{Bucket}?lifecycle",
  1888. }
  1889. if input == nil {
  1890. input = &GetBucketLifecycleConfigurationInput{}
  1891. }
  1892. output = &GetBucketLifecycleConfigurationOutput{}
  1893. req = c.newRequest(op, input, output)
  1894. return
  1895. }
  1896. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1897. //
  1898. // Returns the lifecycle configuration information set on the bucket.
  1899. //
  1900. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1901. // with awserr.Error's Code and Message methods to get detailed information about
  1902. // the error.
  1903. //
  1904. // See the AWS API reference guide for Amazon Simple Storage Service's
  1905. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1906. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1907. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1908. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1909. return out, req.Send()
  1910. }
  1911. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1912. // the ability to pass a context and additional request options.
  1913. //
  1914. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1915. //
  1916. // The context must be non-nil and will be used for request cancellation. If
  1917. // the context is nil a panic will occur. In the future the SDK may create
  1918. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1919. // for more information on using Contexts.
  1920. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1921. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1922. req.SetContext(ctx)
  1923. req.ApplyOptions(opts...)
  1924. return out, req.Send()
  1925. }
  1926. const opGetBucketLocation = "GetBucketLocation"
  1927. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1928. // client's request for the GetBucketLocation operation. The "output" return
  1929. // value will be populated with the request's response once the request completes
  1930. // successfuly.
  1931. //
  1932. // Use "Send" method on the returned Request to send the API call to the service.
  1933. // the "output" return value is not valid until after Send returns without error.
  1934. //
  1935. // See GetBucketLocation for more information on using the GetBucketLocation
  1936. // API call, and error handling.
  1937. //
  1938. // This method is useful when you want to inject custom logic or configuration
  1939. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1940. //
  1941. //
  1942. // // Example sending a request using the GetBucketLocationRequest method.
  1943. // req, resp := client.GetBucketLocationRequest(params)
  1944. //
  1945. // err := req.Send()
  1946. // if err == nil { // resp is now filled
  1947. // fmt.Println(resp)
  1948. // }
  1949. //
  1950. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1951. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1952. op := &request.Operation{
  1953. Name: opGetBucketLocation,
  1954. HTTPMethod: "GET",
  1955. HTTPPath: "/{Bucket}?location",
  1956. }
  1957. if input == nil {
  1958. input = &GetBucketLocationInput{}
  1959. }
  1960. output = &GetBucketLocationOutput{}
  1961. req = c.newRequest(op, input, output)
  1962. return
  1963. }
  1964. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1965. //
  1966. // Returns the region the bucket resides in.
  1967. //
  1968. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1969. // with awserr.Error's Code and Message methods to get detailed information about
  1970. // the error.
  1971. //
  1972. // See the AWS API reference guide for Amazon Simple Storage Service's
  1973. // API operation GetBucketLocation for usage and error information.
  1974. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1975. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1976. req, out := c.GetBucketLocationRequest(input)
  1977. return out, req.Send()
  1978. }
  1979. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  1980. // the ability to pass a context and additional request options.
  1981. //
  1982. // See GetBucketLocation for details on how to use this API operation.
  1983. //
  1984. // The context must be non-nil and will be used for request cancellation. If
  1985. // the context is nil a panic will occur. In the future the SDK may create
  1986. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1987. // for more information on using Contexts.
  1988. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  1989. req, out := c.GetBucketLocationRequest(input)
  1990. req.SetContext(ctx)
  1991. req.ApplyOptions(opts...)
  1992. return out, req.Send()
  1993. }
  1994. const opGetBucketLogging = "GetBucketLogging"
  1995. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1996. // client's request for the GetBucketLogging operation. The "output" return
  1997. // value will be populated with the request's response once the request completes
  1998. // successfuly.
  1999. //
  2000. // Use "Send" method on the returned Request to send the API call to the service.
  2001. // the "output" return value is not valid until after Send returns without error.
  2002. //
  2003. // See GetBucketLogging for more information on using the GetBucketLogging
  2004. // API call, and error handling.
  2005. //
  2006. // This method is useful when you want to inject custom logic or configuration
  2007. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2008. //
  2009. //
  2010. // // Example sending a request using the GetBucketLoggingRequest method.
  2011. // req, resp := client.GetBucketLoggingRequest(params)
  2012. //
  2013. // err := req.Send()
  2014. // if err == nil { // resp is now filled
  2015. // fmt.Println(resp)
  2016. // }
  2017. //
  2018. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2019. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  2020. op := &request.Operation{
  2021. Name: opGetBucketLogging,
  2022. HTTPMethod: "GET",
  2023. HTTPPath: "/{Bucket}?logging",
  2024. }
  2025. if input == nil {
  2026. input = &GetBucketLoggingInput{}
  2027. }
  2028. output = &GetBucketLoggingOutput{}
  2029. req = c.newRequest(op, input, output)
  2030. return
  2031. }
  2032. // GetBucketLogging API operation for Amazon Simple Storage Service.
  2033. //
  2034. // Returns the logging status of a bucket and the permissions users have to
  2035. // view and modify that status. To use GET, you must be the bucket owner.
  2036. //
  2037. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2038. // with awserr.Error's Code and Message methods to get detailed information about
  2039. // the error.
  2040. //
  2041. // See the AWS API reference guide for Amazon Simple Storage Service's
  2042. // API operation GetBucketLogging for usage and error information.
  2043. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2044. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  2045. req, out := c.GetBucketLoggingRequest(input)
  2046. return out, req.Send()
  2047. }
  2048. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  2049. // the ability to pass a context and additional request options.
  2050. //
  2051. // See GetBucketLogging for details on how to use this API operation.
  2052. //
  2053. // The context must be non-nil and will be used for request cancellation. If
  2054. // the context is nil a panic will occur. In the future the SDK may create
  2055. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2056. // for more information on using Contexts.
  2057. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  2058. req, out := c.GetBucketLoggingRequest(input)
  2059. req.SetContext(ctx)
  2060. req.ApplyOptions(opts...)
  2061. return out, req.Send()
  2062. }
  2063. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  2064. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  2065. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  2066. // value will be populated with the request's response once the request completes
  2067. // successfuly.
  2068. //
  2069. // Use "Send" method on the returned Request to send the API call to the service.
  2070. // the "output" return value is not valid until after Send returns without error.
  2071. //
  2072. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  2073. // API call, and error handling.
  2074. //
  2075. // This method is useful when you want to inject custom logic or configuration
  2076. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2077. //
  2078. //
  2079. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  2080. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  2081. //
  2082. // err := req.Send()
  2083. // if err == nil { // resp is now filled
  2084. // fmt.Println(resp)
  2085. // }
  2086. //
  2087. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2088. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  2089. op := &request.Operation{
  2090. Name: opGetBucketMetricsConfiguration,
  2091. HTTPMethod: "GET",
  2092. HTTPPath: "/{Bucket}?metrics",
  2093. }
  2094. if input == nil {
  2095. input = &GetBucketMetricsConfigurationInput{}
  2096. }
  2097. output = &GetBucketMetricsConfigurationOutput{}
  2098. req = c.newRequest(op, input, output)
  2099. return
  2100. }
  2101. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  2102. //
  2103. // Gets a metrics configuration (specified by the metrics configuration ID)
  2104. // from the bucket.
  2105. //
  2106. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2107. // with awserr.Error's Code and Message methods to get detailed information about
  2108. // the error.
  2109. //
  2110. // See the AWS API reference guide for Amazon Simple Storage Service's
  2111. // API operation GetBucketMetricsConfiguration for usage and error information.
  2112. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2113. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  2114. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2115. return out, req.Send()
  2116. }
  2117. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  2118. // the ability to pass a context and additional request options.
  2119. //
  2120. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  2121. //
  2122. // The context must be non-nil and will be used for request cancellation. If
  2123. // the context is nil a panic will occur. In the future the SDK may create
  2124. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2125. // for more information on using Contexts.
  2126. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2127. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2128. req.SetContext(ctx)
  2129. req.ApplyOptions(opts...)
  2130. return out, req.Send()
  2131. }
  2132. const opGetBucketNotification = "GetBucketNotification"
  2133. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2134. // client's request for the GetBucketNotification operation. The "output" return
  2135. // value will be populated with the request's response once the request completes
  2136. // successfuly.
  2137. //
  2138. // Use "Send" method on the returned Request to send the API call to the service.
  2139. // the "output" return value is not valid until after Send returns without error.
  2140. //
  2141. // See GetBucketNotification for more information on using the GetBucketNotification
  2142. // API call, and error handling.
  2143. //
  2144. // This method is useful when you want to inject custom logic or configuration
  2145. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2146. //
  2147. //
  2148. // // Example sending a request using the GetBucketNotificationRequest method.
  2149. // req, resp := client.GetBucketNotificationRequest(params)
  2150. //
  2151. // err := req.Send()
  2152. // if err == nil { // resp is now filled
  2153. // fmt.Println(resp)
  2154. // }
  2155. //
  2156. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2157. //
  2158. // Deprecated: GetBucketNotification has been deprecated
  2159. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2160. if c.Client.Config.Logger != nil {
  2161. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2162. }
  2163. op := &request.Operation{
  2164. Name: opGetBucketNotification,
  2165. HTTPMethod: "GET",
  2166. HTTPPath: "/{Bucket}?notification",
  2167. }
  2168. if input == nil {
  2169. input = &GetBucketNotificationConfigurationRequest{}
  2170. }
  2171. output = &NotificationConfigurationDeprecated{}
  2172. req = c.newRequest(op, input, output)
  2173. return
  2174. }
  2175. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2176. //
  2177. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2178. //
  2179. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2180. // with awserr.Error's Code and Message methods to get detailed information about
  2181. // the error.
  2182. //
  2183. // See the AWS API reference guide for Amazon Simple Storage Service's
  2184. // API operation GetBucketNotification for usage and error information.
  2185. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2186. //
  2187. // Deprecated: GetBucketNotification has been deprecated
  2188. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2189. req, out := c.GetBucketNotificationRequest(input)
  2190. return out, req.Send()
  2191. }
  2192. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2193. // the ability to pass a context and additional request options.
  2194. //
  2195. // See GetBucketNotification for details on how to use this API operation.
  2196. //
  2197. // The context must be non-nil and will be used for request cancellation. If
  2198. // the context is nil a panic will occur. In the future the SDK may create
  2199. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2200. // for more information on using Contexts.
  2201. //
  2202. // Deprecated: GetBucketNotificationWithContext has been deprecated
  2203. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2204. req, out := c.GetBucketNotificationRequest(input)
  2205. req.SetContext(ctx)
  2206. req.ApplyOptions(opts...)
  2207. return out, req.Send()
  2208. }
  2209. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2210. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2211. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2212. // value will be populated with the request's response once the request completes
  2213. // successfuly.
  2214. //
  2215. // Use "Send" method on the returned Request to send the API call to the service.
  2216. // the "output" return value is not valid until after Send returns without error.
  2217. //
  2218. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  2219. // API call, and error handling.
  2220. //
  2221. // This method is useful when you want to inject custom logic or configuration
  2222. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2223. //
  2224. //
  2225. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2226. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2227. //
  2228. // err := req.Send()
  2229. // if err == nil { // resp is now filled
  2230. // fmt.Println(resp)
  2231. // }
  2232. //
  2233. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2234. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2235. op := &request.Operation{
  2236. Name: opGetBucketNotificationConfiguration,
  2237. HTTPMethod: "GET",
  2238. HTTPPath: "/{Bucket}?notification",
  2239. }
  2240. if input == nil {
  2241. input = &GetBucketNotificationConfigurationRequest{}
  2242. }
  2243. output = &NotificationConfiguration{}
  2244. req = c.newRequest(op, input, output)
  2245. return
  2246. }
  2247. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2248. //
  2249. // Returns the notification configuration of a bucket.
  2250. //
  2251. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2252. // with awserr.Error's Code and Message methods to get detailed information about
  2253. // the error.
  2254. //
  2255. // See the AWS API reference guide for Amazon Simple Storage Service's
  2256. // API operation GetBucketNotificationConfiguration for usage and error information.
  2257. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2258. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2259. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2260. return out, req.Send()
  2261. }
  2262. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2263. // the ability to pass a context and additional request options.
  2264. //
  2265. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2266. //
  2267. // The context must be non-nil and will be used for request cancellation. If
  2268. // the context is nil a panic will occur. In the future the SDK may create
  2269. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2270. // for more information on using Contexts.
  2271. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2272. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2273. req.SetContext(ctx)
  2274. req.ApplyOptions(opts...)
  2275. return out, req.Send()
  2276. }
  2277. const opGetBucketPolicy = "GetBucketPolicy"
  2278. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2279. // client's request for the GetBucketPolicy operation. The "output" return
  2280. // value will be populated with the request's response once the request completes
  2281. // successfuly.
  2282. //
  2283. // Use "Send" method on the returned Request to send the API call to the service.
  2284. // the "output" return value is not valid until after Send returns without error.
  2285. //
  2286. // See GetBucketPolicy for more information on using the GetBucketPolicy
  2287. // API call, and error handling.
  2288. //
  2289. // This method is useful when you want to inject custom logic or configuration
  2290. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2291. //
  2292. //
  2293. // // Example sending a request using the GetBucketPolicyRequest method.
  2294. // req, resp := client.GetBucketPolicyRequest(params)
  2295. //
  2296. // err := req.Send()
  2297. // if err == nil { // resp is now filled
  2298. // fmt.Println(resp)
  2299. // }
  2300. //
  2301. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2302. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2303. op := &request.Operation{
  2304. Name: opGetBucketPolicy,
  2305. HTTPMethod: "GET",
  2306. HTTPPath: "/{Bucket}?policy",
  2307. }
  2308. if input == nil {
  2309. input = &GetBucketPolicyInput{}
  2310. }
  2311. output = &GetBucketPolicyOutput{}
  2312. req = c.newRequest(op, input, output)
  2313. return
  2314. }
  2315. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2316. //
  2317. // Returns the policy of a specified bucket.
  2318. //
  2319. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2320. // with awserr.Error's Code and Message methods to get detailed information about
  2321. // the error.
  2322. //
  2323. // See the AWS API reference guide for Amazon Simple Storage Service's
  2324. // API operation GetBucketPolicy for usage and error information.
  2325. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2326. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2327. req, out := c.GetBucketPolicyRequest(input)
  2328. return out, req.Send()
  2329. }
  2330. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2331. // the ability to pass a context and additional request options.
  2332. //
  2333. // See GetBucketPolicy for details on how to use this API operation.
  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 *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2340. req, out := c.GetBucketPolicyRequest(input)
  2341. req.SetContext(ctx)
  2342. req.ApplyOptions(opts...)
  2343. return out, req.Send()
  2344. }
  2345. const opGetBucketReplication = "GetBucketReplication"
  2346. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2347. // client's request for the GetBucketReplication operation. The "output" return
  2348. // value will be populated with the request's response once the request completes
  2349. // successfuly.
  2350. //
  2351. // Use "Send" method on the returned Request to send the API call to the service.
  2352. // the "output" return value is not valid until after Send returns without error.
  2353. //
  2354. // See GetBucketReplication for more information on using the GetBucketReplication
  2355. // API call, and error handling.
  2356. //
  2357. // This method is useful when you want to inject custom logic or configuration
  2358. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2359. //
  2360. //
  2361. // // Example sending a request using the GetBucketReplicationRequest method.
  2362. // req, resp := client.GetBucketReplicationRequest(params)
  2363. //
  2364. // err := req.Send()
  2365. // if err == nil { // resp is now filled
  2366. // fmt.Println(resp)
  2367. // }
  2368. //
  2369. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2370. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2371. op := &request.Operation{
  2372. Name: opGetBucketReplication,
  2373. HTTPMethod: "GET",
  2374. HTTPPath: "/{Bucket}?replication",
  2375. }
  2376. if input == nil {
  2377. input = &GetBucketReplicationInput{}
  2378. }
  2379. output = &GetBucketReplicationOutput{}
  2380. req = c.newRequest(op, input, output)
  2381. return
  2382. }
  2383. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2384. //
  2385. // Returns the replication configuration of a bucket.
  2386. //
  2387. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2388. // with awserr.Error's Code and Message methods to get detailed information about
  2389. // the error.
  2390. //
  2391. // See the AWS API reference guide for Amazon Simple Storage Service's
  2392. // API operation GetBucketReplication for usage and error information.
  2393. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2394. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2395. req, out := c.GetBucketReplicationRequest(input)
  2396. return out, req.Send()
  2397. }
  2398. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2399. // the ability to pass a context and additional request options.
  2400. //
  2401. // See GetBucketReplication for details on how to use this API operation.
  2402. //
  2403. // The context must be non-nil and will be used for request cancellation. If
  2404. // the context is nil a panic will occur. In the future the SDK may create
  2405. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2406. // for more information on using Contexts.
  2407. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2408. req, out := c.GetBucketReplicationRequest(input)
  2409. req.SetContext(ctx)
  2410. req.ApplyOptions(opts...)
  2411. return out, req.Send()
  2412. }
  2413. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2414. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2415. // client's request for the GetBucketRequestPayment operation. The "output" return
  2416. // value will be populated with the request's response once the request completes
  2417. // successfuly.
  2418. //
  2419. // Use "Send" method on the returned Request to send the API call to the service.
  2420. // the "output" return value is not valid until after Send returns without error.
  2421. //
  2422. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  2423. // API call, and error handling.
  2424. //
  2425. // This method is useful when you want to inject custom logic or configuration
  2426. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2427. //
  2428. //
  2429. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2430. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2431. //
  2432. // err := req.Send()
  2433. // if err == nil { // resp is now filled
  2434. // fmt.Println(resp)
  2435. // }
  2436. //
  2437. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2438. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2439. op := &request.Operation{
  2440. Name: opGetBucketRequestPayment,
  2441. HTTPMethod: "GET",
  2442. HTTPPath: "/{Bucket}?requestPayment",
  2443. }
  2444. if input == nil {
  2445. input = &GetBucketRequestPaymentInput{}
  2446. }
  2447. output = &GetBucketRequestPaymentOutput{}
  2448. req = c.newRequest(op, input, output)
  2449. return
  2450. }
  2451. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2452. //
  2453. // Returns the request payment configuration of a bucket.
  2454. //
  2455. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2456. // with awserr.Error's Code and Message methods to get detailed information about
  2457. // the error.
  2458. //
  2459. // See the AWS API reference guide for Amazon Simple Storage Service's
  2460. // API operation GetBucketRequestPayment for usage and error information.
  2461. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2462. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2463. req, out := c.GetBucketRequestPaymentRequest(input)
  2464. return out, req.Send()
  2465. }
  2466. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2467. // the ability to pass a context and additional request options.
  2468. //
  2469. // See GetBucketRequestPayment for details on how to use this API operation.
  2470. //
  2471. // The context must be non-nil and will be used for request cancellation. If
  2472. // the context is nil a panic will occur. In the future the SDK may create
  2473. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2474. // for more information on using Contexts.
  2475. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2476. req, out := c.GetBucketRequestPaymentRequest(input)
  2477. req.SetContext(ctx)
  2478. req.ApplyOptions(opts...)
  2479. return out, req.Send()
  2480. }
  2481. const opGetBucketTagging = "GetBucketTagging"
  2482. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2483. // client's request for the GetBucketTagging operation. The "output" return
  2484. // value will be populated with the request's response once the request completes
  2485. // successfuly.
  2486. //
  2487. // Use "Send" method on the returned Request to send the API call to the service.
  2488. // the "output" return value is not valid until after Send returns without error.
  2489. //
  2490. // See GetBucketTagging for more information on using the GetBucketTagging
  2491. // API call, and error handling.
  2492. //
  2493. // This method is useful when you want to inject custom logic or configuration
  2494. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2495. //
  2496. //
  2497. // // Example sending a request using the GetBucketTaggingRequest method.
  2498. // req, resp := client.GetBucketTaggingRequest(params)
  2499. //
  2500. // err := req.Send()
  2501. // if err == nil { // resp is now filled
  2502. // fmt.Println(resp)
  2503. // }
  2504. //
  2505. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2506. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2507. op := &request.Operation{
  2508. Name: opGetBucketTagging,
  2509. HTTPMethod: "GET",
  2510. HTTPPath: "/{Bucket}?tagging",
  2511. }
  2512. if input == nil {
  2513. input = &GetBucketTaggingInput{}
  2514. }
  2515. output = &GetBucketTaggingOutput{}
  2516. req = c.newRequest(op, input, output)
  2517. return
  2518. }
  2519. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2520. //
  2521. // Returns the tag set associated with the bucket.
  2522. //
  2523. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2524. // with awserr.Error's Code and Message methods to get detailed information about
  2525. // the error.
  2526. //
  2527. // See the AWS API reference guide for Amazon Simple Storage Service's
  2528. // API operation GetBucketTagging for usage and error information.
  2529. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2530. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2531. req, out := c.GetBucketTaggingRequest(input)
  2532. return out, req.Send()
  2533. }
  2534. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2535. // the ability to pass a context and additional request options.
  2536. //
  2537. // See GetBucketTagging for details on how to use this API operation.
  2538. //
  2539. // The context must be non-nil and will be used for request cancellation. If
  2540. // the context is nil a panic will occur. In the future the SDK may create
  2541. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2542. // for more information on using Contexts.
  2543. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2544. req, out := c.GetBucketTaggingRequest(input)
  2545. req.SetContext(ctx)
  2546. req.ApplyOptions(opts...)
  2547. return out, req.Send()
  2548. }
  2549. const opGetBucketVersioning = "GetBucketVersioning"
  2550. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2551. // client's request for the GetBucketVersioning operation. The "output" return
  2552. // value will be populated with the request's response once the request completes
  2553. // successfuly.
  2554. //
  2555. // Use "Send" method on the returned Request to send the API call to the service.
  2556. // the "output" return value is not valid until after Send returns without error.
  2557. //
  2558. // See GetBucketVersioning for more information on using the GetBucketVersioning
  2559. // API call, and error handling.
  2560. //
  2561. // This method is useful when you want to inject custom logic or configuration
  2562. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2563. //
  2564. //
  2565. // // Example sending a request using the GetBucketVersioningRequest method.
  2566. // req, resp := client.GetBucketVersioningRequest(params)
  2567. //
  2568. // err := req.Send()
  2569. // if err == nil { // resp is now filled
  2570. // fmt.Println(resp)
  2571. // }
  2572. //
  2573. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2574. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2575. op := &request.Operation{
  2576. Name: opGetBucketVersioning,
  2577. HTTPMethod: "GET",
  2578. HTTPPath: "/{Bucket}?versioning",
  2579. }
  2580. if input == nil {
  2581. input = &GetBucketVersioningInput{}
  2582. }
  2583. output = &GetBucketVersioningOutput{}
  2584. req = c.newRequest(op, input, output)
  2585. return
  2586. }
  2587. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2588. //
  2589. // Returns the versioning state of a bucket.
  2590. //
  2591. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2592. // with awserr.Error's Code and Message methods to get detailed information about
  2593. // the error.
  2594. //
  2595. // See the AWS API reference guide for Amazon Simple Storage Service's
  2596. // API operation GetBucketVersioning for usage and error information.
  2597. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2598. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2599. req, out := c.GetBucketVersioningRequest(input)
  2600. return out, req.Send()
  2601. }
  2602. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2603. // the ability to pass a context and additional request options.
  2604. //
  2605. // See GetBucketVersioning for details on how to use this API operation.
  2606. //
  2607. // The context must be non-nil and will be used for request cancellation. If
  2608. // the context is nil a panic will occur. In the future the SDK may create
  2609. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2610. // for more information on using Contexts.
  2611. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2612. req, out := c.GetBucketVersioningRequest(input)
  2613. req.SetContext(ctx)
  2614. req.ApplyOptions(opts...)
  2615. return out, req.Send()
  2616. }
  2617. const opGetBucketWebsite = "GetBucketWebsite"
  2618. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2619. // client's request for the GetBucketWebsite operation. The "output" return
  2620. // value will be populated with the request's response once the request completes
  2621. // successfuly.
  2622. //
  2623. // Use "Send" method on the returned Request to send the API call to the service.
  2624. // the "output" return value is not valid until after Send returns without error.
  2625. //
  2626. // See GetBucketWebsite for more information on using the GetBucketWebsite
  2627. // API call, and error handling.
  2628. //
  2629. // This method is useful when you want to inject custom logic or configuration
  2630. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2631. //
  2632. //
  2633. // // Example sending a request using the GetBucketWebsiteRequest method.
  2634. // req, resp := client.GetBucketWebsiteRequest(params)
  2635. //
  2636. // err := req.Send()
  2637. // if err == nil { // resp is now filled
  2638. // fmt.Println(resp)
  2639. // }
  2640. //
  2641. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2642. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2643. op := &request.Operation{
  2644. Name: opGetBucketWebsite,
  2645. HTTPMethod: "GET",
  2646. HTTPPath: "/{Bucket}?website",
  2647. }
  2648. if input == nil {
  2649. input = &GetBucketWebsiteInput{}
  2650. }
  2651. output = &GetBucketWebsiteOutput{}
  2652. req = c.newRequest(op, input, output)
  2653. return
  2654. }
  2655. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2656. //
  2657. // Returns the website configuration for a bucket.
  2658. //
  2659. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2660. // with awserr.Error's Code and Message methods to get detailed information about
  2661. // the error.
  2662. //
  2663. // See the AWS API reference guide for Amazon Simple Storage Service's
  2664. // API operation GetBucketWebsite for usage and error information.
  2665. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2666. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2667. req, out := c.GetBucketWebsiteRequest(input)
  2668. return out, req.Send()
  2669. }
  2670. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2671. // the ability to pass a context and additional request options.
  2672. //
  2673. // See GetBucketWebsite for details on how to use this API operation.
  2674. //
  2675. // The context must be non-nil and will be used for request cancellation. If
  2676. // the context is nil a panic will occur. In the future the SDK may create
  2677. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2678. // for more information on using Contexts.
  2679. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2680. req, out := c.GetBucketWebsiteRequest(input)
  2681. req.SetContext(ctx)
  2682. req.ApplyOptions(opts...)
  2683. return out, req.Send()
  2684. }
  2685. const opGetObject = "GetObject"
  2686. // GetObjectRequest generates a "aws/request.Request" representing the
  2687. // client's request for the GetObject operation. The "output" return
  2688. // value will be populated with the request's response once the request completes
  2689. // successfuly.
  2690. //
  2691. // Use "Send" method on the returned Request to send the API call to the service.
  2692. // the "output" return value is not valid until after Send returns without error.
  2693. //
  2694. // See GetObject for more information on using the GetObject
  2695. // API call, and error handling.
  2696. //
  2697. // This method is useful when you want to inject custom logic or configuration
  2698. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2699. //
  2700. //
  2701. // // Example sending a request using the GetObjectRequest method.
  2702. // req, resp := client.GetObjectRequest(params)
  2703. //
  2704. // err := req.Send()
  2705. // if err == nil { // resp is now filled
  2706. // fmt.Println(resp)
  2707. // }
  2708. //
  2709. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2710. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2711. op := &request.Operation{
  2712. Name: opGetObject,
  2713. HTTPMethod: "GET",
  2714. HTTPPath: "/{Bucket}/{Key+}",
  2715. }
  2716. if input == nil {
  2717. input = &GetObjectInput{}
  2718. }
  2719. output = &GetObjectOutput{}
  2720. req = c.newRequest(op, input, output)
  2721. return
  2722. }
  2723. // GetObject API operation for Amazon Simple Storage Service.
  2724. //
  2725. // Retrieves objects from Amazon S3.
  2726. //
  2727. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2728. // with awserr.Error's Code and Message methods to get detailed information about
  2729. // the error.
  2730. //
  2731. // See the AWS API reference guide for Amazon Simple Storage Service's
  2732. // API operation GetObject for usage and error information.
  2733. //
  2734. // Returned Error Codes:
  2735. // * ErrCodeNoSuchKey "NoSuchKey"
  2736. // The specified key does not exist.
  2737. //
  2738. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2739. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2740. req, out := c.GetObjectRequest(input)
  2741. return out, req.Send()
  2742. }
  2743. // GetObjectWithContext is the same as GetObject with the addition of
  2744. // the ability to pass a context and additional request options.
  2745. //
  2746. // See GetObject for details on how to use this API operation.
  2747. //
  2748. // The context must be non-nil and will be used for request cancellation. If
  2749. // the context is nil a panic will occur. In the future the SDK may create
  2750. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2751. // for more information on using Contexts.
  2752. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2753. req, out := c.GetObjectRequest(input)
  2754. req.SetContext(ctx)
  2755. req.ApplyOptions(opts...)
  2756. return out, req.Send()
  2757. }
  2758. const opGetObjectAcl = "GetObjectAcl"
  2759. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2760. // client's request for the GetObjectAcl operation. The "output" return
  2761. // value will be populated with the request's response once the request completes
  2762. // successfuly.
  2763. //
  2764. // Use "Send" method on the returned Request to send the API call to the service.
  2765. // the "output" return value is not valid until after Send returns without error.
  2766. //
  2767. // See GetObjectAcl for more information on using the GetObjectAcl
  2768. // API call, and error handling.
  2769. //
  2770. // This method is useful when you want to inject custom logic or configuration
  2771. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2772. //
  2773. //
  2774. // // Example sending a request using the GetObjectAclRequest method.
  2775. // req, resp := client.GetObjectAclRequest(params)
  2776. //
  2777. // err := req.Send()
  2778. // if err == nil { // resp is now filled
  2779. // fmt.Println(resp)
  2780. // }
  2781. //
  2782. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2783. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2784. op := &request.Operation{
  2785. Name: opGetObjectAcl,
  2786. HTTPMethod: "GET",
  2787. HTTPPath: "/{Bucket}/{Key+}?acl",
  2788. }
  2789. if input == nil {
  2790. input = &GetObjectAclInput{}
  2791. }
  2792. output = &GetObjectAclOutput{}
  2793. req = c.newRequest(op, input, output)
  2794. return
  2795. }
  2796. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2797. //
  2798. // Returns the access control list (ACL) of an object.
  2799. //
  2800. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2801. // with awserr.Error's Code and Message methods to get detailed information about
  2802. // the error.
  2803. //
  2804. // See the AWS API reference guide for Amazon Simple Storage Service's
  2805. // API operation GetObjectAcl for usage and error information.
  2806. //
  2807. // Returned Error Codes:
  2808. // * ErrCodeNoSuchKey "NoSuchKey"
  2809. // The specified key does not exist.
  2810. //
  2811. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2812. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2813. req, out := c.GetObjectAclRequest(input)
  2814. return out, req.Send()
  2815. }
  2816. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2817. // the ability to pass a context and additional request options.
  2818. //
  2819. // See GetObjectAcl for details on how to use this API operation.
  2820. //
  2821. // The context must be non-nil and will be used for request cancellation. If
  2822. // the context is nil a panic will occur. In the future the SDK may create
  2823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2824. // for more information on using Contexts.
  2825. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2826. req, out := c.GetObjectAclRequest(input)
  2827. req.SetContext(ctx)
  2828. req.ApplyOptions(opts...)
  2829. return out, req.Send()
  2830. }
  2831. const opGetObjectTagging = "GetObjectTagging"
  2832. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  2833. // client's request for the GetObjectTagging operation. The "output" return
  2834. // value will be populated with the request's response once the request completes
  2835. // successfuly.
  2836. //
  2837. // Use "Send" method on the returned Request to send the API call to the service.
  2838. // the "output" return value is not valid until after Send returns without error.
  2839. //
  2840. // See GetObjectTagging for more information on using the GetObjectTagging
  2841. // API call, and error handling.
  2842. //
  2843. // This method is useful when you want to inject custom logic or configuration
  2844. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2845. //
  2846. //
  2847. // // Example sending a request using the GetObjectTaggingRequest method.
  2848. // req, resp := client.GetObjectTaggingRequest(params)
  2849. //
  2850. // err := req.Send()
  2851. // if err == nil { // resp is now filled
  2852. // fmt.Println(resp)
  2853. // }
  2854. //
  2855. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2856. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  2857. op := &request.Operation{
  2858. Name: opGetObjectTagging,
  2859. HTTPMethod: "GET",
  2860. HTTPPath: "/{Bucket}/{Key+}?tagging",
  2861. }
  2862. if input == nil {
  2863. input = &GetObjectTaggingInput{}
  2864. }
  2865. output = &GetObjectTaggingOutput{}
  2866. req = c.newRequest(op, input, output)
  2867. return
  2868. }
  2869. // GetObjectTagging API operation for Amazon Simple Storage Service.
  2870. //
  2871. // Returns the tag-set of an object.
  2872. //
  2873. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2874. // with awserr.Error's Code and Message methods to get detailed information about
  2875. // the error.
  2876. //
  2877. // See the AWS API reference guide for Amazon Simple Storage Service's
  2878. // API operation GetObjectTagging for usage and error information.
  2879. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2880. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  2881. req, out := c.GetObjectTaggingRequest(input)
  2882. return out, req.Send()
  2883. }
  2884. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  2885. // the ability to pass a context and additional request options.
  2886. //
  2887. // See GetObjectTagging for details on how to use this API operation.
  2888. //
  2889. // The context must be non-nil and will be used for request cancellation. If
  2890. // the context is nil a panic will occur. In the future the SDK may create
  2891. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2892. // for more information on using Contexts.
  2893. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  2894. req, out := c.GetObjectTaggingRequest(input)
  2895. req.SetContext(ctx)
  2896. req.ApplyOptions(opts...)
  2897. return out, req.Send()
  2898. }
  2899. const opGetObjectTorrent = "GetObjectTorrent"
  2900. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  2901. // client's request for the GetObjectTorrent operation. The "output" return
  2902. // value will be populated with the request's response once the request completes
  2903. // successfuly.
  2904. //
  2905. // Use "Send" method on the returned Request to send the API call to the service.
  2906. // the "output" return value is not valid until after Send returns without error.
  2907. //
  2908. // See GetObjectTorrent for more information on using the GetObjectTorrent
  2909. // API call, and error handling.
  2910. //
  2911. // This method is useful when you want to inject custom logic or configuration
  2912. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2913. //
  2914. //
  2915. // // Example sending a request using the GetObjectTorrentRequest method.
  2916. // req, resp := client.GetObjectTorrentRequest(params)
  2917. //
  2918. // err := req.Send()
  2919. // if err == nil { // resp is now filled
  2920. // fmt.Println(resp)
  2921. // }
  2922. //
  2923. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2924. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  2925. op := &request.Operation{
  2926. Name: opGetObjectTorrent,
  2927. HTTPMethod: "GET",
  2928. HTTPPath: "/{Bucket}/{Key+}?torrent",
  2929. }
  2930. if input == nil {
  2931. input = &GetObjectTorrentInput{}
  2932. }
  2933. output = &GetObjectTorrentOutput{}
  2934. req = c.newRequest(op, input, output)
  2935. return
  2936. }
  2937. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  2938. //
  2939. // Return torrent files from a bucket.
  2940. //
  2941. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2942. // with awserr.Error's Code and Message methods to get detailed information about
  2943. // the error.
  2944. //
  2945. // See the AWS API reference guide for Amazon Simple Storage Service's
  2946. // API operation GetObjectTorrent for usage and error information.
  2947. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2948. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  2949. req, out := c.GetObjectTorrentRequest(input)
  2950. return out, req.Send()
  2951. }
  2952. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  2953. // the ability to pass a context and additional request options.
  2954. //
  2955. // See GetObjectTorrent for details on how to use this API operation.
  2956. //
  2957. // The context must be non-nil and will be used for request cancellation. If
  2958. // the context is nil a panic will occur. In the future the SDK may create
  2959. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2960. // for more information on using Contexts.
  2961. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  2962. req, out := c.GetObjectTorrentRequest(input)
  2963. req.SetContext(ctx)
  2964. req.ApplyOptions(opts...)
  2965. return out, req.Send()
  2966. }
  2967. const opHeadBucket = "HeadBucket"
  2968. // HeadBucketRequest generates a "aws/request.Request" representing the
  2969. // client's request for the HeadBucket operation. The "output" return
  2970. // value will be populated with the request's response once the request completes
  2971. // successfuly.
  2972. //
  2973. // Use "Send" method on the returned Request to send the API call to the service.
  2974. // the "output" return value is not valid until after Send returns without error.
  2975. //
  2976. // See HeadBucket for more information on using the HeadBucket
  2977. // API call, and error handling.
  2978. //
  2979. // This method is useful when you want to inject custom logic or configuration
  2980. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2981. //
  2982. //
  2983. // // Example sending a request using the HeadBucketRequest method.
  2984. // req, resp := client.HeadBucketRequest(params)
  2985. //
  2986. // err := req.Send()
  2987. // if err == nil { // resp is now filled
  2988. // fmt.Println(resp)
  2989. // }
  2990. //
  2991. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2992. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  2993. op := &request.Operation{
  2994. Name: opHeadBucket,
  2995. HTTPMethod: "HEAD",
  2996. HTTPPath: "/{Bucket}",
  2997. }
  2998. if input == nil {
  2999. input = &HeadBucketInput{}
  3000. }
  3001. output = &HeadBucketOutput{}
  3002. req = c.newRequest(op, input, output)
  3003. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3004. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3005. return
  3006. }
  3007. // HeadBucket API operation for Amazon Simple Storage Service.
  3008. //
  3009. // This operation is useful to determine if a bucket exists and you have permission
  3010. // to access it.
  3011. //
  3012. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3013. // with awserr.Error's Code and Message methods to get detailed information about
  3014. // the error.
  3015. //
  3016. // See the AWS API reference guide for Amazon Simple Storage Service's
  3017. // API operation HeadBucket for usage and error information.
  3018. //
  3019. // Returned Error Codes:
  3020. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3021. // The specified bucket does not exist.
  3022. //
  3023. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3024. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  3025. req, out := c.HeadBucketRequest(input)
  3026. return out, req.Send()
  3027. }
  3028. // HeadBucketWithContext is the same as HeadBucket with the addition of
  3029. // the ability to pass a context and additional request options.
  3030. //
  3031. // See HeadBucket for details on how to use this API operation.
  3032. //
  3033. // The context must be non-nil and will be used for request cancellation. If
  3034. // the context is nil a panic will occur. In the future the SDK may create
  3035. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3036. // for more information on using Contexts.
  3037. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  3038. req, out := c.HeadBucketRequest(input)
  3039. req.SetContext(ctx)
  3040. req.ApplyOptions(opts...)
  3041. return out, req.Send()
  3042. }
  3043. const opHeadObject = "HeadObject"
  3044. // HeadObjectRequest generates a "aws/request.Request" representing the
  3045. // client's request for the HeadObject operation. The "output" return
  3046. // value will be populated with the request's response once the request completes
  3047. // successfuly.
  3048. //
  3049. // Use "Send" method on the returned Request to send the API call to the service.
  3050. // the "output" return value is not valid until after Send returns without error.
  3051. //
  3052. // See HeadObject for more information on using the HeadObject
  3053. // API call, and error handling.
  3054. //
  3055. // This method is useful when you want to inject custom logic or configuration
  3056. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3057. //
  3058. //
  3059. // // Example sending a request using the HeadObjectRequest method.
  3060. // req, resp := client.HeadObjectRequest(params)
  3061. //
  3062. // err := req.Send()
  3063. // if err == nil { // resp is now filled
  3064. // fmt.Println(resp)
  3065. // }
  3066. //
  3067. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3068. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  3069. op := &request.Operation{
  3070. Name: opHeadObject,
  3071. HTTPMethod: "HEAD",
  3072. HTTPPath: "/{Bucket}/{Key+}",
  3073. }
  3074. if input == nil {
  3075. input = &HeadObjectInput{}
  3076. }
  3077. output = &HeadObjectOutput{}
  3078. req = c.newRequest(op, input, output)
  3079. return
  3080. }
  3081. // HeadObject API operation for Amazon Simple Storage Service.
  3082. //
  3083. // The HEAD operation retrieves metadata from an object without returning the
  3084. // object itself. This operation is useful if you're only interested in an object's
  3085. // metadata. To use HEAD, you must have READ access to the object.
  3086. //
  3087. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  3088. // for more information on returned errors.
  3089. //
  3090. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3091. // with awserr.Error's Code and Message methods to get detailed information about
  3092. // the error.
  3093. //
  3094. // See the AWS API reference guide for Amazon Simple Storage Service's
  3095. // API operation HeadObject for usage and error information.
  3096. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3097. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  3098. req, out := c.HeadObjectRequest(input)
  3099. return out, req.Send()
  3100. }
  3101. // HeadObjectWithContext is the same as HeadObject with the addition of
  3102. // the ability to pass a context and additional request options.
  3103. //
  3104. // See HeadObject for details on how to use this API operation.
  3105. //
  3106. // The context must be non-nil and will be used for request cancellation. If
  3107. // the context is nil a panic will occur. In the future the SDK may create
  3108. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3109. // for more information on using Contexts.
  3110. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  3111. req, out := c.HeadObjectRequest(input)
  3112. req.SetContext(ctx)
  3113. req.ApplyOptions(opts...)
  3114. return out, req.Send()
  3115. }
  3116. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3117. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3118. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3119. // value will be populated with the request's response once the request completes
  3120. // successfuly.
  3121. //
  3122. // Use "Send" method on the returned Request to send the API call to the service.
  3123. // the "output" return value is not valid until after Send returns without error.
  3124. //
  3125. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  3126. // API call, and error handling.
  3127. //
  3128. // This method is useful when you want to inject custom logic or configuration
  3129. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3130. //
  3131. //
  3132. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3133. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3134. //
  3135. // err := req.Send()
  3136. // if err == nil { // resp is now filled
  3137. // fmt.Println(resp)
  3138. // }
  3139. //
  3140. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3141. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3142. op := &request.Operation{
  3143. Name: opListBucketAnalyticsConfigurations,
  3144. HTTPMethod: "GET",
  3145. HTTPPath: "/{Bucket}?analytics",
  3146. }
  3147. if input == nil {
  3148. input = &ListBucketAnalyticsConfigurationsInput{}
  3149. }
  3150. output = &ListBucketAnalyticsConfigurationsOutput{}
  3151. req = c.newRequest(op, input, output)
  3152. return
  3153. }
  3154. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3155. //
  3156. // Lists the analytics configurations for the bucket.
  3157. //
  3158. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3159. // with awserr.Error's Code and Message methods to get detailed information about
  3160. // the error.
  3161. //
  3162. // See the AWS API reference guide for Amazon Simple Storage Service's
  3163. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3164. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3165. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3166. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3167. return out, req.Send()
  3168. }
  3169. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3170. // the ability to pass a context and additional request options.
  3171. //
  3172. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3173. //
  3174. // The context must be non-nil and will be used for request cancellation. If
  3175. // the context is nil a panic will occur. In the future the SDK may create
  3176. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3177. // for more information on using Contexts.
  3178. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3179. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3180. req.SetContext(ctx)
  3181. req.ApplyOptions(opts...)
  3182. return out, req.Send()
  3183. }
  3184. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3185. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3186. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3187. // value will be populated with the request's response once the request completes
  3188. // successfuly.
  3189. //
  3190. // Use "Send" method on the returned Request to send the API call to the service.
  3191. // the "output" return value is not valid until after Send returns without error.
  3192. //
  3193. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  3194. // API call, and error handling.
  3195. //
  3196. // This method is useful when you want to inject custom logic or configuration
  3197. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3198. //
  3199. //
  3200. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3201. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3202. //
  3203. // err := req.Send()
  3204. // if err == nil { // resp is now filled
  3205. // fmt.Println(resp)
  3206. // }
  3207. //
  3208. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3209. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3210. op := &request.Operation{
  3211. Name: opListBucketInventoryConfigurations,
  3212. HTTPMethod: "GET",
  3213. HTTPPath: "/{Bucket}?inventory",
  3214. }
  3215. if input == nil {
  3216. input = &ListBucketInventoryConfigurationsInput{}
  3217. }
  3218. output = &ListBucketInventoryConfigurationsOutput{}
  3219. req = c.newRequest(op, input, output)
  3220. return
  3221. }
  3222. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3223. //
  3224. // Returns a list of inventory configurations for the bucket.
  3225. //
  3226. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3227. // with awserr.Error's Code and Message methods to get detailed information about
  3228. // the error.
  3229. //
  3230. // See the AWS API reference guide for Amazon Simple Storage Service's
  3231. // API operation ListBucketInventoryConfigurations for usage and error information.
  3232. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3233. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3234. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3235. return out, req.Send()
  3236. }
  3237. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3238. // the ability to pass a context and additional request options.
  3239. //
  3240. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3241. //
  3242. // The context must be non-nil and will be used for request cancellation. If
  3243. // the context is nil a panic will occur. In the future the SDK may create
  3244. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3245. // for more information on using Contexts.
  3246. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3247. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3248. req.SetContext(ctx)
  3249. req.ApplyOptions(opts...)
  3250. return out, req.Send()
  3251. }
  3252. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3253. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3254. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3255. // value will be populated with the request's response once the request completes
  3256. // successfuly.
  3257. //
  3258. // Use "Send" method on the returned Request to send the API call to the service.
  3259. // the "output" return value is not valid until after Send returns without error.
  3260. //
  3261. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  3262. // API call, and error handling.
  3263. //
  3264. // This method is useful when you want to inject custom logic or configuration
  3265. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3266. //
  3267. //
  3268. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3269. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3270. //
  3271. // err := req.Send()
  3272. // if err == nil { // resp is now filled
  3273. // fmt.Println(resp)
  3274. // }
  3275. //
  3276. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3277. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3278. op := &request.Operation{
  3279. Name: opListBucketMetricsConfigurations,
  3280. HTTPMethod: "GET",
  3281. HTTPPath: "/{Bucket}?metrics",
  3282. }
  3283. if input == nil {
  3284. input = &ListBucketMetricsConfigurationsInput{}
  3285. }
  3286. output = &ListBucketMetricsConfigurationsOutput{}
  3287. req = c.newRequest(op, input, output)
  3288. return
  3289. }
  3290. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3291. //
  3292. // Lists the metrics configurations for the bucket.
  3293. //
  3294. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3295. // with awserr.Error's Code and Message methods to get detailed information about
  3296. // the error.
  3297. //
  3298. // See the AWS API reference guide for Amazon Simple Storage Service's
  3299. // API operation ListBucketMetricsConfigurations for usage and error information.
  3300. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3301. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3302. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3303. return out, req.Send()
  3304. }
  3305. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3306. // the ability to pass a context and additional request options.
  3307. //
  3308. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3309. //
  3310. // The context must be non-nil and will be used for request cancellation. If
  3311. // the context is nil a panic will occur. In the future the SDK may create
  3312. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3313. // for more information on using Contexts.
  3314. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3315. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3316. req.SetContext(ctx)
  3317. req.ApplyOptions(opts...)
  3318. return out, req.Send()
  3319. }
  3320. const opListBuckets = "ListBuckets"
  3321. // ListBucketsRequest generates a "aws/request.Request" representing the
  3322. // client's request for the ListBuckets operation. The "output" return
  3323. // value will be populated with the request's response once the request completes
  3324. // successfuly.
  3325. //
  3326. // Use "Send" method on the returned Request to send the API call to the service.
  3327. // the "output" return value is not valid until after Send returns without error.
  3328. //
  3329. // See ListBuckets for more information on using the ListBuckets
  3330. // API call, and error handling.
  3331. //
  3332. // This method is useful when you want to inject custom logic or configuration
  3333. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3334. //
  3335. //
  3336. // // Example sending a request using the ListBucketsRequest method.
  3337. // req, resp := client.ListBucketsRequest(params)
  3338. //
  3339. // err := req.Send()
  3340. // if err == nil { // resp is now filled
  3341. // fmt.Println(resp)
  3342. // }
  3343. //
  3344. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3345. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3346. op := &request.Operation{
  3347. Name: opListBuckets,
  3348. HTTPMethod: "GET",
  3349. HTTPPath: "/",
  3350. }
  3351. if input == nil {
  3352. input = &ListBucketsInput{}
  3353. }
  3354. output = &ListBucketsOutput{}
  3355. req = c.newRequest(op, input, output)
  3356. return
  3357. }
  3358. // ListBuckets API operation for Amazon Simple Storage Service.
  3359. //
  3360. // Returns a list of all buckets owned by the authenticated sender of the request.
  3361. //
  3362. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3363. // with awserr.Error's Code and Message methods to get detailed information about
  3364. // the error.
  3365. //
  3366. // See the AWS API reference guide for Amazon Simple Storage Service's
  3367. // API operation ListBuckets for usage and error information.
  3368. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3369. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3370. req, out := c.ListBucketsRequest(input)
  3371. return out, req.Send()
  3372. }
  3373. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3374. // the ability to pass a context and additional request options.
  3375. //
  3376. // See ListBuckets for details on how to use this API operation.
  3377. //
  3378. // The context must be non-nil and will be used for request cancellation. If
  3379. // the context is nil a panic will occur. In the future the SDK may create
  3380. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3381. // for more information on using Contexts.
  3382. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3383. req, out := c.ListBucketsRequest(input)
  3384. req.SetContext(ctx)
  3385. req.ApplyOptions(opts...)
  3386. return out, req.Send()
  3387. }
  3388. const opListMultipartUploads = "ListMultipartUploads"
  3389. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3390. // client's request for the ListMultipartUploads operation. The "output" return
  3391. // value will be populated with the request's response once the request completes
  3392. // successfuly.
  3393. //
  3394. // Use "Send" method on the returned Request to send the API call to the service.
  3395. // the "output" return value is not valid until after Send returns without error.
  3396. //
  3397. // See ListMultipartUploads for more information on using the ListMultipartUploads
  3398. // API call, and error handling.
  3399. //
  3400. // This method is useful when you want to inject custom logic or configuration
  3401. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3402. //
  3403. //
  3404. // // Example sending a request using the ListMultipartUploadsRequest method.
  3405. // req, resp := client.ListMultipartUploadsRequest(params)
  3406. //
  3407. // err := req.Send()
  3408. // if err == nil { // resp is now filled
  3409. // fmt.Println(resp)
  3410. // }
  3411. //
  3412. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3413. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3414. op := &request.Operation{
  3415. Name: opListMultipartUploads,
  3416. HTTPMethod: "GET",
  3417. HTTPPath: "/{Bucket}?uploads",
  3418. Paginator: &request.Paginator{
  3419. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3420. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3421. LimitToken: "MaxUploads",
  3422. TruncationToken: "IsTruncated",
  3423. },
  3424. }
  3425. if input == nil {
  3426. input = &ListMultipartUploadsInput{}
  3427. }
  3428. output = &ListMultipartUploadsOutput{}
  3429. req = c.newRequest(op, input, output)
  3430. return
  3431. }
  3432. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3433. //
  3434. // This operation lists in-progress multipart uploads.
  3435. //
  3436. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3437. // with awserr.Error's Code and Message methods to get detailed information about
  3438. // the error.
  3439. //
  3440. // See the AWS API reference guide for Amazon Simple Storage Service's
  3441. // API operation ListMultipartUploads for usage and error information.
  3442. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3443. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3444. req, out := c.ListMultipartUploadsRequest(input)
  3445. return out, req.Send()
  3446. }
  3447. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3448. // the ability to pass a context and additional request options.
  3449. //
  3450. // See ListMultipartUploads for details on how to use this API operation.
  3451. //
  3452. // The context must be non-nil and will be used for request cancellation. If
  3453. // the context is nil a panic will occur. In the future the SDK may create
  3454. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3455. // for more information on using Contexts.
  3456. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3457. req, out := c.ListMultipartUploadsRequest(input)
  3458. req.SetContext(ctx)
  3459. req.ApplyOptions(opts...)
  3460. return out, req.Send()
  3461. }
  3462. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3463. // calling the "fn" function with the response data for each page. To stop
  3464. // iterating, return false from the fn function.
  3465. //
  3466. // See ListMultipartUploads method for more information on how to use this operation.
  3467. //
  3468. // Note: This operation can generate multiple requests to a service.
  3469. //
  3470. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3471. // pageNum := 0
  3472. // err := client.ListMultipartUploadsPages(params,
  3473. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3474. // pageNum++
  3475. // fmt.Println(page)
  3476. // return pageNum <= 3
  3477. // })
  3478. //
  3479. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3480. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3481. }
  3482. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3483. // it takes a Context and allows setting request options on the pages.
  3484. //
  3485. // The context must be non-nil and will be used for request cancellation. If
  3486. // the context is nil a panic will occur. In the future the SDK may create
  3487. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3488. // for more information on using Contexts.
  3489. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3490. p := request.Pagination{
  3491. NewRequest: func() (*request.Request, error) {
  3492. var inCpy *ListMultipartUploadsInput
  3493. if input != nil {
  3494. tmp := *input
  3495. inCpy = &tmp
  3496. }
  3497. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3498. req.SetContext(ctx)
  3499. req.ApplyOptions(opts...)
  3500. return req, nil
  3501. },
  3502. }
  3503. cont := true
  3504. for p.Next() && cont {
  3505. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3506. }
  3507. return p.Err()
  3508. }
  3509. const opListObjectVersions = "ListObjectVersions"
  3510. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3511. // client's request for the ListObjectVersions operation. The "output" return
  3512. // value will be populated with the request's response once the request completes
  3513. // successfuly.
  3514. //
  3515. // Use "Send" method on the returned Request to send the API call to the service.
  3516. // the "output" return value is not valid until after Send returns without error.
  3517. //
  3518. // See ListObjectVersions for more information on using the ListObjectVersions
  3519. // API call, and error handling.
  3520. //
  3521. // This method is useful when you want to inject custom logic or configuration
  3522. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3523. //
  3524. //
  3525. // // Example sending a request using the ListObjectVersionsRequest method.
  3526. // req, resp := client.ListObjectVersionsRequest(params)
  3527. //
  3528. // err := req.Send()
  3529. // if err == nil { // resp is now filled
  3530. // fmt.Println(resp)
  3531. // }
  3532. //
  3533. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3534. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3535. op := &request.Operation{
  3536. Name: opListObjectVersions,
  3537. HTTPMethod: "GET",
  3538. HTTPPath: "/{Bucket}?versions",
  3539. Paginator: &request.Paginator{
  3540. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3541. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3542. LimitToken: "MaxKeys",
  3543. TruncationToken: "IsTruncated",
  3544. },
  3545. }
  3546. if input == nil {
  3547. input = &ListObjectVersionsInput{}
  3548. }
  3549. output = &ListObjectVersionsOutput{}
  3550. req = c.newRequest(op, input, output)
  3551. return
  3552. }
  3553. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3554. //
  3555. // Returns metadata about all of the versions of objects in a bucket.
  3556. //
  3557. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3558. // with awserr.Error's Code and Message methods to get detailed information about
  3559. // the error.
  3560. //
  3561. // See the AWS API reference guide for Amazon Simple Storage Service's
  3562. // API operation ListObjectVersions for usage and error information.
  3563. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3564. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3565. req, out := c.ListObjectVersionsRequest(input)
  3566. return out, req.Send()
  3567. }
  3568. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3569. // the ability to pass a context and additional request options.
  3570. //
  3571. // See ListObjectVersions for details on how to use this API operation.
  3572. //
  3573. // The context must be non-nil and will be used for request cancellation. If
  3574. // the context is nil a panic will occur. In the future the SDK may create
  3575. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3576. // for more information on using Contexts.
  3577. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3578. req, out := c.ListObjectVersionsRequest(input)
  3579. req.SetContext(ctx)
  3580. req.ApplyOptions(opts...)
  3581. return out, req.Send()
  3582. }
  3583. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3584. // calling the "fn" function with the response data for each page. To stop
  3585. // iterating, return false from the fn function.
  3586. //
  3587. // See ListObjectVersions method for more information on how to use this operation.
  3588. //
  3589. // Note: This operation can generate multiple requests to a service.
  3590. //
  3591. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3592. // pageNum := 0
  3593. // err := client.ListObjectVersionsPages(params,
  3594. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  3595. // pageNum++
  3596. // fmt.Println(page)
  3597. // return pageNum <= 3
  3598. // })
  3599. //
  3600. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  3601. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  3602. }
  3603. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  3604. // it takes a Context and allows setting request options on the pages.
  3605. //
  3606. // The context must be non-nil and will be used for request cancellation. If
  3607. // the context is nil a panic will occur. In the future the SDK may create
  3608. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3609. // for more information on using Contexts.
  3610. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  3611. p := request.Pagination{
  3612. NewRequest: func() (*request.Request, error) {
  3613. var inCpy *ListObjectVersionsInput
  3614. if input != nil {
  3615. tmp := *input
  3616. inCpy = &tmp
  3617. }
  3618. req, _ := c.ListObjectVersionsRequest(inCpy)
  3619. req.SetContext(ctx)
  3620. req.ApplyOptions(opts...)
  3621. return req, nil
  3622. },
  3623. }
  3624. cont := true
  3625. for p.Next() && cont {
  3626. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  3627. }
  3628. return p.Err()
  3629. }
  3630. const opListObjects = "ListObjects"
  3631. // ListObjectsRequest generates a "aws/request.Request" representing the
  3632. // client's request for the ListObjects operation. The "output" return
  3633. // value will be populated with the request's response once the request completes
  3634. // successfuly.
  3635. //
  3636. // Use "Send" method on the returned Request to send the API call to the service.
  3637. // the "output" return value is not valid until after Send returns without error.
  3638. //
  3639. // See ListObjects for more information on using the ListObjects
  3640. // API call, and error handling.
  3641. //
  3642. // This method is useful when you want to inject custom logic or configuration
  3643. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3644. //
  3645. //
  3646. // // Example sending a request using the ListObjectsRequest method.
  3647. // req, resp := client.ListObjectsRequest(params)
  3648. //
  3649. // err := req.Send()
  3650. // if err == nil { // resp is now filled
  3651. // fmt.Println(resp)
  3652. // }
  3653. //
  3654. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3655. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  3656. op := &request.Operation{
  3657. Name: opListObjects,
  3658. HTTPMethod: "GET",
  3659. HTTPPath: "/{Bucket}",
  3660. Paginator: &request.Paginator{
  3661. InputTokens: []string{"Marker"},
  3662. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  3663. LimitToken: "MaxKeys",
  3664. TruncationToken: "IsTruncated",
  3665. },
  3666. }
  3667. if input == nil {
  3668. input = &ListObjectsInput{}
  3669. }
  3670. output = &ListObjectsOutput{}
  3671. req = c.newRequest(op, input, output)
  3672. return
  3673. }
  3674. // ListObjects API operation for Amazon Simple Storage Service.
  3675. //
  3676. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3677. // the request parameters as selection criteria to return a subset of the objects
  3678. // in a bucket.
  3679. //
  3680. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3681. // with awserr.Error's Code and Message methods to get detailed information about
  3682. // the error.
  3683. //
  3684. // See the AWS API reference guide for Amazon Simple Storage Service's
  3685. // API operation ListObjects for usage and error information.
  3686. //
  3687. // Returned Error Codes:
  3688. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3689. // The specified bucket does not exist.
  3690. //
  3691. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3692. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  3693. req, out := c.ListObjectsRequest(input)
  3694. return out, req.Send()
  3695. }
  3696. // ListObjectsWithContext is the same as ListObjects with the addition of
  3697. // the ability to pass a context and additional request options.
  3698. //
  3699. // See ListObjects for details on how to use this API operation.
  3700. //
  3701. // The context must be non-nil and will be used for request cancellation. If
  3702. // the context is nil a panic will occur. In the future the SDK may create
  3703. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3704. // for more information on using Contexts.
  3705. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  3706. req, out := c.ListObjectsRequest(input)
  3707. req.SetContext(ctx)
  3708. req.ApplyOptions(opts...)
  3709. return out, req.Send()
  3710. }
  3711. // ListObjectsPages iterates over the pages of a ListObjects operation,
  3712. // calling the "fn" function with the response data for each page. To stop
  3713. // iterating, return false from the fn function.
  3714. //
  3715. // See ListObjects method for more information on how to use this operation.
  3716. //
  3717. // Note: This operation can generate multiple requests to a service.
  3718. //
  3719. // // Example iterating over at most 3 pages of a ListObjects operation.
  3720. // pageNum := 0
  3721. // err := client.ListObjectsPages(params,
  3722. // func(page *ListObjectsOutput, lastPage bool) bool {
  3723. // pageNum++
  3724. // fmt.Println(page)
  3725. // return pageNum <= 3
  3726. // })
  3727. //
  3728. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  3729. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  3730. }
  3731. // ListObjectsPagesWithContext same as ListObjectsPages except
  3732. // it takes a Context and allows setting request options on the pages.
  3733. //
  3734. // The context must be non-nil and will be used for request cancellation. If
  3735. // the context is nil a panic will occur. In the future the SDK may create
  3736. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3737. // for more information on using Contexts.
  3738. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  3739. p := request.Pagination{
  3740. NewRequest: func() (*request.Request, error) {
  3741. var inCpy *ListObjectsInput
  3742. if input != nil {
  3743. tmp := *input
  3744. inCpy = &tmp
  3745. }
  3746. req, _ := c.ListObjectsRequest(inCpy)
  3747. req.SetContext(ctx)
  3748. req.ApplyOptions(opts...)
  3749. return req, nil
  3750. },
  3751. }
  3752. cont := true
  3753. for p.Next() && cont {
  3754. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  3755. }
  3756. return p.Err()
  3757. }
  3758. const opListObjectsV2 = "ListObjectsV2"
  3759. // ListObjectsV2Request generates a "aws/request.Request" representing the
  3760. // client's request for the ListObjectsV2 operation. The "output" return
  3761. // value will be populated with the request's response once the request completes
  3762. // successfuly.
  3763. //
  3764. // Use "Send" method on the returned Request to send the API call to the service.
  3765. // the "output" return value is not valid until after Send returns without error.
  3766. //
  3767. // See ListObjectsV2 for more information on using the ListObjectsV2
  3768. // API call, and error handling.
  3769. //
  3770. // This method is useful when you want to inject custom logic or configuration
  3771. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3772. //
  3773. //
  3774. // // Example sending a request using the ListObjectsV2Request method.
  3775. // req, resp := client.ListObjectsV2Request(params)
  3776. //
  3777. // err := req.Send()
  3778. // if err == nil { // resp is now filled
  3779. // fmt.Println(resp)
  3780. // }
  3781. //
  3782. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3783. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  3784. op := &request.Operation{
  3785. Name: opListObjectsV2,
  3786. HTTPMethod: "GET",
  3787. HTTPPath: "/{Bucket}?list-type=2",
  3788. Paginator: &request.Paginator{
  3789. InputTokens: []string{"ContinuationToken"},
  3790. OutputTokens: []string{"NextContinuationToken"},
  3791. LimitToken: "MaxKeys",
  3792. TruncationToken: "",
  3793. },
  3794. }
  3795. if input == nil {
  3796. input = &ListObjectsV2Input{}
  3797. }
  3798. output = &ListObjectsV2Output{}
  3799. req = c.newRequest(op, input, output)
  3800. return
  3801. }
  3802. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  3803. //
  3804. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3805. // the request parameters as selection criteria to return a subset of the objects
  3806. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  3807. // you use this revised API for new application development.
  3808. //
  3809. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3810. // with awserr.Error's Code and Message methods to get detailed information about
  3811. // the error.
  3812. //
  3813. // See the AWS API reference guide for Amazon Simple Storage Service's
  3814. // API operation ListObjectsV2 for usage and error information.
  3815. //
  3816. // Returned Error Codes:
  3817. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3818. // The specified bucket does not exist.
  3819. //
  3820. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3821. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  3822. req, out := c.ListObjectsV2Request(input)
  3823. return out, req.Send()
  3824. }
  3825. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  3826. // the ability to pass a context and additional request options.
  3827. //
  3828. // See ListObjectsV2 for details on how to use this API operation.
  3829. //
  3830. // The context must be non-nil and will be used for request cancellation. If
  3831. // the context is nil a panic will occur. In the future the SDK may create
  3832. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3833. // for more information on using Contexts.
  3834. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  3835. req, out := c.ListObjectsV2Request(input)
  3836. req.SetContext(ctx)
  3837. req.ApplyOptions(opts...)
  3838. return out, req.Send()
  3839. }
  3840. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  3841. // calling the "fn" function with the response data for each page. To stop
  3842. // iterating, return false from the fn function.
  3843. //
  3844. // See ListObjectsV2 method for more information on how to use this operation.
  3845. //
  3846. // Note: This operation can generate multiple requests to a service.
  3847. //
  3848. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  3849. // pageNum := 0
  3850. // err := client.ListObjectsV2Pages(params,
  3851. // func(page *ListObjectsV2Output, lastPage bool) bool {
  3852. // pageNum++
  3853. // fmt.Println(page)
  3854. // return pageNum <= 3
  3855. // })
  3856. //
  3857. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  3858. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  3859. }
  3860. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  3861. // it takes a Context and allows setting request options on the pages.
  3862. //
  3863. // The context must be non-nil and will be used for request cancellation. If
  3864. // the context is nil a panic will occur. In the future the SDK may create
  3865. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3866. // for more information on using Contexts.
  3867. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  3868. p := request.Pagination{
  3869. NewRequest: func() (*request.Request, error) {
  3870. var inCpy *ListObjectsV2Input
  3871. if input != nil {
  3872. tmp := *input
  3873. inCpy = &tmp
  3874. }
  3875. req, _ := c.ListObjectsV2Request(inCpy)
  3876. req.SetContext(ctx)
  3877. req.ApplyOptions(opts...)
  3878. return req, nil
  3879. },
  3880. }
  3881. cont := true
  3882. for p.Next() && cont {
  3883. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  3884. }
  3885. return p.Err()
  3886. }
  3887. const opListParts = "ListParts"
  3888. // ListPartsRequest generates a "aws/request.Request" representing the
  3889. // client's request for the ListParts operation. The "output" return
  3890. // value will be populated with the request's response once the request completes
  3891. // successfuly.
  3892. //
  3893. // Use "Send" method on the returned Request to send the API call to the service.
  3894. // the "output" return value is not valid until after Send returns without error.
  3895. //
  3896. // See ListParts for more information on using the ListParts
  3897. // API call, and error handling.
  3898. //
  3899. // This method is useful when you want to inject custom logic or configuration
  3900. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3901. //
  3902. //
  3903. // // Example sending a request using the ListPartsRequest method.
  3904. // req, resp := client.ListPartsRequest(params)
  3905. //
  3906. // err := req.Send()
  3907. // if err == nil { // resp is now filled
  3908. // fmt.Println(resp)
  3909. // }
  3910. //
  3911. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3912. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  3913. op := &request.Operation{
  3914. Name: opListParts,
  3915. HTTPMethod: "GET",
  3916. HTTPPath: "/{Bucket}/{Key+}",
  3917. Paginator: &request.Paginator{
  3918. InputTokens: []string{"PartNumberMarker"},
  3919. OutputTokens: []string{"NextPartNumberMarker"},
  3920. LimitToken: "MaxParts",
  3921. TruncationToken: "IsTruncated",
  3922. },
  3923. }
  3924. if input == nil {
  3925. input = &ListPartsInput{}
  3926. }
  3927. output = &ListPartsOutput{}
  3928. req = c.newRequest(op, input, output)
  3929. return
  3930. }
  3931. // ListParts API operation for Amazon Simple Storage Service.
  3932. //
  3933. // Lists the parts that have been uploaded for a specific multipart upload.
  3934. //
  3935. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3936. // with awserr.Error's Code and Message methods to get detailed information about
  3937. // the error.
  3938. //
  3939. // See the AWS API reference guide for Amazon Simple Storage Service's
  3940. // API operation ListParts for usage and error information.
  3941. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3942. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  3943. req, out := c.ListPartsRequest(input)
  3944. return out, req.Send()
  3945. }
  3946. // ListPartsWithContext is the same as ListParts with the addition of
  3947. // the ability to pass a context and additional request options.
  3948. //
  3949. // See ListParts for details on how to use this API operation.
  3950. //
  3951. // The context must be non-nil and will be used for request cancellation. If
  3952. // the context is nil a panic will occur. In the future the SDK may create
  3953. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3954. // for more information on using Contexts.
  3955. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  3956. req, out := c.ListPartsRequest(input)
  3957. req.SetContext(ctx)
  3958. req.ApplyOptions(opts...)
  3959. return out, req.Send()
  3960. }
  3961. // ListPartsPages iterates over the pages of a ListParts operation,
  3962. // calling the "fn" function with the response data for each page. To stop
  3963. // iterating, return false from the fn function.
  3964. //
  3965. // See ListParts method for more information on how to use this operation.
  3966. //
  3967. // Note: This operation can generate multiple requests to a service.
  3968. //
  3969. // // Example iterating over at most 3 pages of a ListParts operation.
  3970. // pageNum := 0
  3971. // err := client.ListPartsPages(params,
  3972. // func(page *ListPartsOutput, lastPage bool) bool {
  3973. // pageNum++
  3974. // fmt.Println(page)
  3975. // return pageNum <= 3
  3976. // })
  3977. //
  3978. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  3979. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  3980. }
  3981. // ListPartsPagesWithContext same as ListPartsPages except
  3982. // it takes a Context and allows setting request options on the pages.
  3983. //
  3984. // The context must be non-nil and will be used for request cancellation. If
  3985. // the context is nil a panic will occur. In the future the SDK may create
  3986. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3987. // for more information on using Contexts.
  3988. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  3989. p := request.Pagination{
  3990. NewRequest: func() (*request.Request, error) {
  3991. var inCpy *ListPartsInput
  3992. if input != nil {
  3993. tmp := *input
  3994. inCpy = &tmp
  3995. }
  3996. req, _ := c.ListPartsRequest(inCpy)
  3997. req.SetContext(ctx)
  3998. req.ApplyOptions(opts...)
  3999. return req, nil
  4000. },
  4001. }
  4002. cont := true
  4003. for p.Next() && cont {
  4004. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  4005. }
  4006. return p.Err()
  4007. }
  4008. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  4009. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  4010. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  4011. // value will be populated with the request's response once the request completes
  4012. // successfuly.
  4013. //
  4014. // Use "Send" method on the returned Request to send the API call to the service.
  4015. // the "output" return value is not valid until after Send returns without error.
  4016. //
  4017. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  4018. // API call, and error handling.
  4019. //
  4020. // This method is useful when you want to inject custom logic or configuration
  4021. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4022. //
  4023. //
  4024. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  4025. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  4026. //
  4027. // err := req.Send()
  4028. // if err == nil { // resp is now filled
  4029. // fmt.Println(resp)
  4030. // }
  4031. //
  4032. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4033. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  4034. op := &request.Operation{
  4035. Name: opPutBucketAccelerateConfiguration,
  4036. HTTPMethod: "PUT",
  4037. HTTPPath: "/{Bucket}?accelerate",
  4038. }
  4039. if input == nil {
  4040. input = &PutBucketAccelerateConfigurationInput{}
  4041. }
  4042. output = &PutBucketAccelerateConfigurationOutput{}
  4043. req = c.newRequest(op, input, output)
  4044. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4045. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4046. return
  4047. }
  4048. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  4049. //
  4050. // Sets the accelerate configuration of an existing bucket.
  4051. //
  4052. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4053. // with awserr.Error's Code and Message methods to get detailed information about
  4054. // the error.
  4055. //
  4056. // See the AWS API reference guide for Amazon Simple Storage Service's
  4057. // API operation PutBucketAccelerateConfiguration for usage and error information.
  4058. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4059. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  4060. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4061. return out, req.Send()
  4062. }
  4063. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  4064. // the ability to pass a context and additional request options.
  4065. //
  4066. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  4067. //
  4068. // The context must be non-nil and will be used for request cancellation. If
  4069. // the context is nil a panic will occur. In the future the SDK may create
  4070. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4071. // for more information on using Contexts.
  4072. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  4073. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4074. req.SetContext(ctx)
  4075. req.ApplyOptions(opts...)
  4076. return out, req.Send()
  4077. }
  4078. const opPutBucketAcl = "PutBucketAcl"
  4079. // PutBucketAclRequest generates a "aws/request.Request" representing the
  4080. // client's request for the PutBucketAcl operation. The "output" return
  4081. // value will be populated with the request's response once the request completes
  4082. // successfuly.
  4083. //
  4084. // Use "Send" method on the returned Request to send the API call to the service.
  4085. // the "output" return value is not valid until after Send returns without error.
  4086. //
  4087. // See PutBucketAcl for more information on using the PutBucketAcl
  4088. // API call, and error handling.
  4089. //
  4090. // This method is useful when you want to inject custom logic or configuration
  4091. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4092. //
  4093. //
  4094. // // Example sending a request using the PutBucketAclRequest method.
  4095. // req, resp := client.PutBucketAclRequest(params)
  4096. //
  4097. // err := req.Send()
  4098. // if err == nil { // resp is now filled
  4099. // fmt.Println(resp)
  4100. // }
  4101. //
  4102. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4103. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4104. op := &request.Operation{
  4105. Name: opPutBucketAcl,
  4106. HTTPMethod: "PUT",
  4107. HTTPPath: "/{Bucket}?acl",
  4108. }
  4109. if input == nil {
  4110. input = &PutBucketAclInput{}
  4111. }
  4112. output = &PutBucketAclOutput{}
  4113. req = c.newRequest(op, input, output)
  4114. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4115. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4116. return
  4117. }
  4118. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4119. //
  4120. // Sets the permissions on a bucket using access control lists (ACL).
  4121. //
  4122. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4123. // with awserr.Error's Code and Message methods to get detailed information about
  4124. // the error.
  4125. //
  4126. // See the AWS API reference guide for Amazon Simple Storage Service's
  4127. // API operation PutBucketAcl for usage and error information.
  4128. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4129. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4130. req, out := c.PutBucketAclRequest(input)
  4131. return out, req.Send()
  4132. }
  4133. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4134. // the ability to pass a context and additional request options.
  4135. //
  4136. // See PutBucketAcl for details on how to use this API operation.
  4137. //
  4138. // The context must be non-nil and will be used for request cancellation. If
  4139. // the context is nil a panic will occur. In the future the SDK may create
  4140. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4141. // for more information on using Contexts.
  4142. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4143. req, out := c.PutBucketAclRequest(input)
  4144. req.SetContext(ctx)
  4145. req.ApplyOptions(opts...)
  4146. return out, req.Send()
  4147. }
  4148. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4149. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4150. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4151. // value will be populated with the request's response once the request completes
  4152. // successfuly.
  4153. //
  4154. // Use "Send" method on the returned Request to send the API call to the service.
  4155. // the "output" return value is not valid until after Send returns without error.
  4156. //
  4157. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  4158. // API call, and error handling.
  4159. //
  4160. // This method is useful when you want to inject custom logic or configuration
  4161. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4162. //
  4163. //
  4164. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4165. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4166. //
  4167. // err := req.Send()
  4168. // if err == nil { // resp is now filled
  4169. // fmt.Println(resp)
  4170. // }
  4171. //
  4172. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4173. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4174. op := &request.Operation{
  4175. Name: opPutBucketAnalyticsConfiguration,
  4176. HTTPMethod: "PUT",
  4177. HTTPPath: "/{Bucket}?analytics",
  4178. }
  4179. if input == nil {
  4180. input = &PutBucketAnalyticsConfigurationInput{}
  4181. }
  4182. output = &PutBucketAnalyticsConfigurationOutput{}
  4183. req = c.newRequest(op, input, output)
  4184. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4185. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4186. return
  4187. }
  4188. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4189. //
  4190. // Sets an analytics configuration for the bucket (specified by the analytics
  4191. // configuration ID).
  4192. //
  4193. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4194. // with awserr.Error's Code and Message methods to get detailed information about
  4195. // the error.
  4196. //
  4197. // See the AWS API reference guide for Amazon Simple Storage Service's
  4198. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4199. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4200. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4201. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4202. return out, req.Send()
  4203. }
  4204. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4205. // the ability to pass a context and additional request options.
  4206. //
  4207. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4208. //
  4209. // The context must be non-nil and will be used for request cancellation. If
  4210. // the context is nil a panic will occur. In the future the SDK may create
  4211. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4212. // for more information on using Contexts.
  4213. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4214. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4215. req.SetContext(ctx)
  4216. req.ApplyOptions(opts...)
  4217. return out, req.Send()
  4218. }
  4219. const opPutBucketCors = "PutBucketCors"
  4220. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4221. // client's request for the PutBucketCors operation. The "output" return
  4222. // value will be populated with the request's response once the request completes
  4223. // successfuly.
  4224. //
  4225. // Use "Send" method on the returned Request to send the API call to the service.
  4226. // the "output" return value is not valid until after Send returns without error.
  4227. //
  4228. // See PutBucketCors for more information on using the PutBucketCors
  4229. // API call, and error handling.
  4230. //
  4231. // This method is useful when you want to inject custom logic or configuration
  4232. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4233. //
  4234. //
  4235. // // Example sending a request using the PutBucketCorsRequest method.
  4236. // req, resp := client.PutBucketCorsRequest(params)
  4237. //
  4238. // err := req.Send()
  4239. // if err == nil { // resp is now filled
  4240. // fmt.Println(resp)
  4241. // }
  4242. //
  4243. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4244. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4245. op := &request.Operation{
  4246. Name: opPutBucketCors,
  4247. HTTPMethod: "PUT",
  4248. HTTPPath: "/{Bucket}?cors",
  4249. }
  4250. if input == nil {
  4251. input = &PutBucketCorsInput{}
  4252. }
  4253. output = &PutBucketCorsOutput{}
  4254. req = c.newRequest(op, input, output)
  4255. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4256. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4257. return
  4258. }
  4259. // PutBucketCors API operation for Amazon Simple Storage Service.
  4260. //
  4261. // Sets the cors configuration for a bucket.
  4262. //
  4263. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4264. // with awserr.Error's Code and Message methods to get detailed information about
  4265. // the error.
  4266. //
  4267. // See the AWS API reference guide for Amazon Simple Storage Service's
  4268. // API operation PutBucketCors for usage and error information.
  4269. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4270. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4271. req, out := c.PutBucketCorsRequest(input)
  4272. return out, req.Send()
  4273. }
  4274. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4275. // the ability to pass a context and additional request options.
  4276. //
  4277. // See PutBucketCors for details on how to use this API operation.
  4278. //
  4279. // The context must be non-nil and will be used for request cancellation. If
  4280. // the context is nil a panic will occur. In the future the SDK may create
  4281. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4282. // for more information on using Contexts.
  4283. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4284. req, out := c.PutBucketCorsRequest(input)
  4285. req.SetContext(ctx)
  4286. req.ApplyOptions(opts...)
  4287. return out, req.Send()
  4288. }
  4289. const opPutBucketEncryption = "PutBucketEncryption"
  4290. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  4291. // client's request for the PutBucketEncryption operation. The "output" return
  4292. // value will be populated with the request's response once the request completes
  4293. // successfuly.
  4294. //
  4295. // Use "Send" method on the returned Request to send the API call to the service.
  4296. // the "output" return value is not valid until after Send returns without error.
  4297. //
  4298. // See PutBucketEncryption for more information on using the PutBucketEncryption
  4299. // API call, and error handling.
  4300. //
  4301. // This method is useful when you want to inject custom logic or configuration
  4302. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4303. //
  4304. //
  4305. // // Example sending a request using the PutBucketEncryptionRequest method.
  4306. // req, resp := client.PutBucketEncryptionRequest(params)
  4307. //
  4308. // err := req.Send()
  4309. // if err == nil { // resp is now filled
  4310. // fmt.Println(resp)
  4311. // }
  4312. //
  4313. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4314. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  4315. op := &request.Operation{
  4316. Name: opPutBucketEncryption,
  4317. HTTPMethod: "PUT",
  4318. HTTPPath: "/{Bucket}?encryption",
  4319. }
  4320. if input == nil {
  4321. input = &PutBucketEncryptionInput{}
  4322. }
  4323. output = &PutBucketEncryptionOutput{}
  4324. req = c.newRequest(op, input, output)
  4325. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4326. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4327. return
  4328. }
  4329. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  4330. //
  4331. // Creates a new server-side encryption configuration (or replaces an existing
  4332. // one, if present).
  4333. //
  4334. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4335. // with awserr.Error's Code and Message methods to get detailed information about
  4336. // the error.
  4337. //
  4338. // See the AWS API reference guide for Amazon Simple Storage Service's
  4339. // API operation PutBucketEncryption for usage and error information.
  4340. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4341. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  4342. req, out := c.PutBucketEncryptionRequest(input)
  4343. return out, req.Send()
  4344. }
  4345. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  4346. // the ability to pass a context and additional request options.
  4347. //
  4348. // See PutBucketEncryption for details on how to use this API operation.
  4349. //
  4350. // The context must be non-nil and will be used for request cancellation. If
  4351. // the context is nil a panic will occur. In the future the SDK may create
  4352. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4353. // for more information on using Contexts.
  4354. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  4355. req, out := c.PutBucketEncryptionRequest(input)
  4356. req.SetContext(ctx)
  4357. req.ApplyOptions(opts...)
  4358. return out, req.Send()
  4359. }
  4360. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4361. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4362. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4363. // value will be populated with the request's response once the request completes
  4364. // successfuly.
  4365. //
  4366. // Use "Send" method on the returned Request to send the API call to the service.
  4367. // the "output" return value is not valid until after Send returns without error.
  4368. //
  4369. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  4370. // API call, and error handling.
  4371. //
  4372. // This method is useful when you want to inject custom logic or configuration
  4373. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4374. //
  4375. //
  4376. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4377. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4378. //
  4379. // err := req.Send()
  4380. // if err == nil { // resp is now filled
  4381. // fmt.Println(resp)
  4382. // }
  4383. //
  4384. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4385. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4386. op := &request.Operation{
  4387. Name: opPutBucketInventoryConfiguration,
  4388. HTTPMethod: "PUT",
  4389. HTTPPath: "/{Bucket}?inventory",
  4390. }
  4391. if input == nil {
  4392. input = &PutBucketInventoryConfigurationInput{}
  4393. }
  4394. output = &PutBucketInventoryConfigurationOutput{}
  4395. req = c.newRequest(op, input, output)
  4396. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4397. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4398. return
  4399. }
  4400. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4401. //
  4402. // Adds an inventory configuration (identified by the inventory ID) from the
  4403. // bucket.
  4404. //
  4405. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4406. // with awserr.Error's Code and Message methods to get detailed information about
  4407. // the error.
  4408. //
  4409. // See the AWS API reference guide for Amazon Simple Storage Service's
  4410. // API operation PutBucketInventoryConfiguration for usage and error information.
  4411. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4412. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4413. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4414. return out, req.Send()
  4415. }
  4416. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4417. // the ability to pass a context and additional request options.
  4418. //
  4419. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4420. //
  4421. // The context must be non-nil and will be used for request cancellation. If
  4422. // the context is nil a panic will occur. In the future the SDK may create
  4423. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4424. // for more information on using Contexts.
  4425. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4426. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4427. req.SetContext(ctx)
  4428. req.ApplyOptions(opts...)
  4429. return out, req.Send()
  4430. }
  4431. const opPutBucketLifecycle = "PutBucketLifecycle"
  4432. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4433. // client's request for the PutBucketLifecycle operation. The "output" return
  4434. // value will be populated with the request's response once the request completes
  4435. // successfuly.
  4436. //
  4437. // Use "Send" method on the returned Request to send the API call to the service.
  4438. // the "output" return value is not valid until after Send returns without error.
  4439. //
  4440. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  4441. // API call, and error handling.
  4442. //
  4443. // This method is useful when you want to inject custom logic or configuration
  4444. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4445. //
  4446. //
  4447. // // Example sending a request using the PutBucketLifecycleRequest method.
  4448. // req, resp := client.PutBucketLifecycleRequest(params)
  4449. //
  4450. // err := req.Send()
  4451. // if err == nil { // resp is now filled
  4452. // fmt.Println(resp)
  4453. // }
  4454. //
  4455. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4456. //
  4457. // Deprecated: PutBucketLifecycle has been deprecated
  4458. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4459. if c.Client.Config.Logger != nil {
  4460. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4461. }
  4462. op := &request.Operation{
  4463. Name: opPutBucketLifecycle,
  4464. HTTPMethod: "PUT",
  4465. HTTPPath: "/{Bucket}?lifecycle",
  4466. }
  4467. if input == nil {
  4468. input = &PutBucketLifecycleInput{}
  4469. }
  4470. output = &PutBucketLifecycleOutput{}
  4471. req = c.newRequest(op, input, output)
  4472. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4473. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4474. return
  4475. }
  4476. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4477. //
  4478. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4479. //
  4480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4481. // with awserr.Error's Code and Message methods to get detailed information about
  4482. // the error.
  4483. //
  4484. // See the AWS API reference guide for Amazon Simple Storage Service's
  4485. // API operation PutBucketLifecycle for usage and error information.
  4486. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4487. //
  4488. // Deprecated: PutBucketLifecycle has been deprecated
  4489. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4490. req, out := c.PutBucketLifecycleRequest(input)
  4491. return out, req.Send()
  4492. }
  4493. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4494. // the ability to pass a context and additional request options.
  4495. //
  4496. // See PutBucketLifecycle for details on how to use this API operation.
  4497. //
  4498. // The context must be non-nil and will be used for request cancellation. If
  4499. // the context is nil a panic will occur. In the future the SDK may create
  4500. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4501. // for more information on using Contexts.
  4502. //
  4503. // Deprecated: PutBucketLifecycleWithContext has been deprecated
  4504. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4505. req, out := c.PutBucketLifecycleRequest(input)
  4506. req.SetContext(ctx)
  4507. req.ApplyOptions(opts...)
  4508. return out, req.Send()
  4509. }
  4510. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4511. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4512. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4513. // value will be populated with the request's response once the request completes
  4514. // successfuly.
  4515. //
  4516. // Use "Send" method on the returned Request to send the API call to the service.
  4517. // the "output" return value is not valid until after Send returns without error.
  4518. //
  4519. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  4520. // API call, and error handling.
  4521. //
  4522. // This method is useful when you want to inject custom logic or configuration
  4523. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4524. //
  4525. //
  4526. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4527. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4528. //
  4529. // err := req.Send()
  4530. // if err == nil { // resp is now filled
  4531. // fmt.Println(resp)
  4532. // }
  4533. //
  4534. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4535. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4536. op := &request.Operation{
  4537. Name: opPutBucketLifecycleConfiguration,
  4538. HTTPMethod: "PUT",
  4539. HTTPPath: "/{Bucket}?lifecycle",
  4540. }
  4541. if input == nil {
  4542. input = &PutBucketLifecycleConfigurationInput{}
  4543. }
  4544. output = &PutBucketLifecycleConfigurationOutput{}
  4545. req = c.newRequest(op, input, output)
  4546. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4547. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4548. return
  4549. }
  4550. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4551. //
  4552. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4553. // exists, it replaces it.
  4554. //
  4555. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4556. // with awserr.Error's Code and Message methods to get detailed information about
  4557. // the error.
  4558. //
  4559. // See the AWS API reference guide for Amazon Simple Storage Service's
  4560. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4561. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4562. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4563. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4564. return out, req.Send()
  4565. }
  4566. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4567. // the ability to pass a context and additional request options.
  4568. //
  4569. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4570. //
  4571. // The context must be non-nil and will be used for request cancellation. If
  4572. // the context is nil a panic will occur. In the future the SDK may create
  4573. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4574. // for more information on using Contexts.
  4575. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4576. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4577. req.SetContext(ctx)
  4578. req.ApplyOptions(opts...)
  4579. return out, req.Send()
  4580. }
  4581. const opPutBucketLogging = "PutBucketLogging"
  4582. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4583. // client's request for the PutBucketLogging operation. The "output" return
  4584. // value will be populated with the request's response once the request completes
  4585. // successfuly.
  4586. //
  4587. // Use "Send" method on the returned Request to send the API call to the service.
  4588. // the "output" return value is not valid until after Send returns without error.
  4589. //
  4590. // See PutBucketLogging for more information on using the PutBucketLogging
  4591. // API call, and error handling.
  4592. //
  4593. // This method is useful when you want to inject custom logic or configuration
  4594. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4595. //
  4596. //
  4597. // // Example sending a request using the PutBucketLoggingRequest method.
  4598. // req, resp := client.PutBucketLoggingRequest(params)
  4599. //
  4600. // err := req.Send()
  4601. // if err == nil { // resp is now filled
  4602. // fmt.Println(resp)
  4603. // }
  4604. //
  4605. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4606. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  4607. op := &request.Operation{
  4608. Name: opPutBucketLogging,
  4609. HTTPMethod: "PUT",
  4610. HTTPPath: "/{Bucket}?logging",
  4611. }
  4612. if input == nil {
  4613. input = &PutBucketLoggingInput{}
  4614. }
  4615. output = &PutBucketLoggingOutput{}
  4616. req = c.newRequest(op, input, output)
  4617. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4618. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4619. return
  4620. }
  4621. // PutBucketLogging API operation for Amazon Simple Storage Service.
  4622. //
  4623. // Set the logging parameters for a bucket and to specify permissions for who
  4624. // can view and modify the logging parameters. To set the logging status of
  4625. // a bucket, you must be the bucket owner.
  4626. //
  4627. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4628. // with awserr.Error's Code and Message methods to get detailed information about
  4629. // the error.
  4630. //
  4631. // See the AWS API reference guide for Amazon Simple Storage Service's
  4632. // API operation PutBucketLogging for usage and error information.
  4633. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4634. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  4635. req, out := c.PutBucketLoggingRequest(input)
  4636. return out, req.Send()
  4637. }
  4638. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  4639. // the ability to pass a context and additional request options.
  4640. //
  4641. // See PutBucketLogging for details on how to use this API operation.
  4642. //
  4643. // The context must be non-nil and will be used for request cancellation. If
  4644. // the context is nil a panic will occur. In the future the SDK may create
  4645. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4646. // for more information on using Contexts.
  4647. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  4648. req, out := c.PutBucketLoggingRequest(input)
  4649. req.SetContext(ctx)
  4650. req.ApplyOptions(opts...)
  4651. return out, req.Send()
  4652. }
  4653. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  4654. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  4655. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  4656. // value will be populated with the request's response once the request completes
  4657. // successfuly.
  4658. //
  4659. // Use "Send" method on the returned Request to send the API call to the service.
  4660. // the "output" return value is not valid until after Send returns without error.
  4661. //
  4662. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  4663. // API call, and error handling.
  4664. //
  4665. // This method is useful when you want to inject custom logic or configuration
  4666. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4667. //
  4668. //
  4669. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  4670. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  4671. //
  4672. // err := req.Send()
  4673. // if err == nil { // resp is now filled
  4674. // fmt.Println(resp)
  4675. // }
  4676. //
  4677. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4678. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  4679. op := &request.Operation{
  4680. Name: opPutBucketMetricsConfiguration,
  4681. HTTPMethod: "PUT",
  4682. HTTPPath: "/{Bucket}?metrics",
  4683. }
  4684. if input == nil {
  4685. input = &PutBucketMetricsConfigurationInput{}
  4686. }
  4687. output = &PutBucketMetricsConfigurationOutput{}
  4688. req = c.newRequest(op, input, output)
  4689. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4690. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4691. return
  4692. }
  4693. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  4694. //
  4695. // Sets a metrics configuration (specified by the metrics configuration ID)
  4696. // for the bucket.
  4697. //
  4698. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4699. // with awserr.Error's Code and Message methods to get detailed information about
  4700. // the error.
  4701. //
  4702. // See the AWS API reference guide for Amazon Simple Storage Service's
  4703. // API operation PutBucketMetricsConfiguration for usage and error information.
  4704. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4705. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  4706. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4707. return out, req.Send()
  4708. }
  4709. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  4710. // the ability to pass a context and additional request options.
  4711. //
  4712. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  4713. //
  4714. // The context must be non-nil and will be used for request cancellation. If
  4715. // the context is nil a panic will occur. In the future the SDK may create
  4716. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4717. // for more information on using Contexts.
  4718. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  4719. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4720. req.SetContext(ctx)
  4721. req.ApplyOptions(opts...)
  4722. return out, req.Send()
  4723. }
  4724. const opPutBucketNotification = "PutBucketNotification"
  4725. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  4726. // client's request for the PutBucketNotification operation. The "output" return
  4727. // value will be populated with the request's response once the request completes
  4728. // successfuly.
  4729. //
  4730. // Use "Send" method on the returned Request to send the API call to the service.
  4731. // the "output" return value is not valid until after Send returns without error.
  4732. //
  4733. // See PutBucketNotification for more information on using the PutBucketNotification
  4734. // API call, and error handling.
  4735. //
  4736. // This method is useful when you want to inject custom logic or configuration
  4737. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4738. //
  4739. //
  4740. // // Example sending a request using the PutBucketNotificationRequest method.
  4741. // req, resp := client.PutBucketNotificationRequest(params)
  4742. //
  4743. // err := req.Send()
  4744. // if err == nil { // resp is now filled
  4745. // fmt.Println(resp)
  4746. // }
  4747. //
  4748. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4749. //
  4750. // Deprecated: PutBucketNotification has been deprecated
  4751. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  4752. if c.Client.Config.Logger != nil {
  4753. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  4754. }
  4755. op := &request.Operation{
  4756. Name: opPutBucketNotification,
  4757. HTTPMethod: "PUT",
  4758. HTTPPath: "/{Bucket}?notification",
  4759. }
  4760. if input == nil {
  4761. input = &PutBucketNotificationInput{}
  4762. }
  4763. output = &PutBucketNotificationOutput{}
  4764. req = c.newRequest(op, input, output)
  4765. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4766. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4767. return
  4768. }
  4769. // PutBucketNotification API operation for Amazon Simple Storage Service.
  4770. //
  4771. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  4772. //
  4773. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4774. // with awserr.Error's Code and Message methods to get detailed information about
  4775. // the error.
  4776. //
  4777. // See the AWS API reference guide for Amazon Simple Storage Service's
  4778. // API operation PutBucketNotification for usage and error information.
  4779. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4780. //
  4781. // Deprecated: PutBucketNotification has been deprecated
  4782. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  4783. req, out := c.PutBucketNotificationRequest(input)
  4784. return out, req.Send()
  4785. }
  4786. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  4787. // the ability to pass a context and additional request options.
  4788. //
  4789. // See PutBucketNotification for details on how to use this API operation.
  4790. //
  4791. // The context must be non-nil and will be used for request cancellation. If
  4792. // the context is nil a panic will occur. In the future the SDK may create
  4793. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4794. // for more information on using Contexts.
  4795. //
  4796. // Deprecated: PutBucketNotificationWithContext has been deprecated
  4797. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  4798. req, out := c.PutBucketNotificationRequest(input)
  4799. req.SetContext(ctx)
  4800. req.ApplyOptions(opts...)
  4801. return out, req.Send()
  4802. }
  4803. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  4804. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  4805. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  4806. // value will be populated with the request's response once the request completes
  4807. // successfuly.
  4808. //
  4809. // Use "Send" method on the returned Request to send the API call to the service.
  4810. // the "output" return value is not valid until after Send returns without error.
  4811. //
  4812. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  4813. // API call, and error handling.
  4814. //
  4815. // This method is useful when you want to inject custom logic or configuration
  4816. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4817. //
  4818. //
  4819. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  4820. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  4821. //
  4822. // err := req.Send()
  4823. // if err == nil { // resp is now filled
  4824. // fmt.Println(resp)
  4825. // }
  4826. //
  4827. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4828. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  4829. op := &request.Operation{
  4830. Name: opPutBucketNotificationConfiguration,
  4831. HTTPMethod: "PUT",
  4832. HTTPPath: "/{Bucket}?notification",
  4833. }
  4834. if input == nil {
  4835. input = &PutBucketNotificationConfigurationInput{}
  4836. }
  4837. output = &PutBucketNotificationConfigurationOutput{}
  4838. req = c.newRequest(op, input, output)
  4839. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4840. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4841. return
  4842. }
  4843. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  4844. //
  4845. // Enables notifications of specified events for a bucket.
  4846. //
  4847. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4848. // with awserr.Error's Code and Message methods to get detailed information about
  4849. // the error.
  4850. //
  4851. // See the AWS API reference guide for Amazon Simple Storage Service's
  4852. // API operation PutBucketNotificationConfiguration for usage and error information.
  4853. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4854. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  4855. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4856. return out, req.Send()
  4857. }
  4858. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  4859. // the ability to pass a context and additional request options.
  4860. //
  4861. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  4862. //
  4863. // The context must be non-nil and will be used for request cancellation. If
  4864. // the context is nil a panic will occur. In the future the SDK may create
  4865. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4866. // for more information on using Contexts.
  4867. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  4868. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4869. req.SetContext(ctx)
  4870. req.ApplyOptions(opts...)
  4871. return out, req.Send()
  4872. }
  4873. const opPutBucketPolicy = "PutBucketPolicy"
  4874. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  4875. // client's request for the PutBucketPolicy operation. The "output" return
  4876. // value will be populated with the request's response once the request completes
  4877. // successfuly.
  4878. //
  4879. // Use "Send" method on the returned Request to send the API call to the service.
  4880. // the "output" return value is not valid until after Send returns without error.
  4881. //
  4882. // See PutBucketPolicy for more information on using the PutBucketPolicy
  4883. // API call, and error handling.
  4884. //
  4885. // This method is useful when you want to inject custom logic or configuration
  4886. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4887. //
  4888. //
  4889. // // Example sending a request using the PutBucketPolicyRequest method.
  4890. // req, resp := client.PutBucketPolicyRequest(params)
  4891. //
  4892. // err := req.Send()
  4893. // if err == nil { // resp is now filled
  4894. // fmt.Println(resp)
  4895. // }
  4896. //
  4897. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4898. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  4899. op := &request.Operation{
  4900. Name: opPutBucketPolicy,
  4901. HTTPMethod: "PUT",
  4902. HTTPPath: "/{Bucket}?policy",
  4903. }
  4904. if input == nil {
  4905. input = &PutBucketPolicyInput{}
  4906. }
  4907. output = &PutBucketPolicyOutput{}
  4908. req = c.newRequest(op, input, output)
  4909. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4910. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4911. return
  4912. }
  4913. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  4914. //
  4915. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  4916. // in this request completely replaces it.
  4917. //
  4918. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4919. // with awserr.Error's Code and Message methods to get detailed information about
  4920. // the error.
  4921. //
  4922. // See the AWS API reference guide for Amazon Simple Storage Service's
  4923. // API operation PutBucketPolicy for usage and error information.
  4924. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4925. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  4926. req, out := c.PutBucketPolicyRequest(input)
  4927. return out, req.Send()
  4928. }
  4929. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  4930. // the ability to pass a context and additional request options.
  4931. //
  4932. // See PutBucketPolicy for details on how to use this API operation.
  4933. //
  4934. // The context must be non-nil and will be used for request cancellation. If
  4935. // the context is nil a panic will occur. In the future the SDK may create
  4936. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4937. // for more information on using Contexts.
  4938. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  4939. req, out := c.PutBucketPolicyRequest(input)
  4940. req.SetContext(ctx)
  4941. req.ApplyOptions(opts...)
  4942. return out, req.Send()
  4943. }
  4944. const opPutBucketReplication = "PutBucketReplication"
  4945. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  4946. // client's request for the PutBucketReplication operation. The "output" return
  4947. // value will be populated with the request's response once the request completes
  4948. // successfuly.
  4949. //
  4950. // Use "Send" method on the returned Request to send the API call to the service.
  4951. // the "output" return value is not valid until after Send returns without error.
  4952. //
  4953. // See PutBucketReplication for more information on using the PutBucketReplication
  4954. // API call, and error handling.
  4955. //
  4956. // This method is useful when you want to inject custom logic or configuration
  4957. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4958. //
  4959. //
  4960. // // Example sending a request using the PutBucketReplicationRequest method.
  4961. // req, resp := client.PutBucketReplicationRequest(params)
  4962. //
  4963. // err := req.Send()
  4964. // if err == nil { // resp is now filled
  4965. // fmt.Println(resp)
  4966. // }
  4967. //
  4968. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4969. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  4970. op := &request.Operation{
  4971. Name: opPutBucketReplication,
  4972. HTTPMethod: "PUT",
  4973. HTTPPath: "/{Bucket}?replication",
  4974. }
  4975. if input == nil {
  4976. input = &PutBucketReplicationInput{}
  4977. }
  4978. output = &PutBucketReplicationOutput{}
  4979. req = c.newRequest(op, input, output)
  4980. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4981. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4982. return
  4983. }
  4984. // PutBucketReplication API operation for Amazon Simple Storage Service.
  4985. //
  4986. // Creates a new replication configuration (or replaces an existing one, if
  4987. // present). For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  4988. // in the Amazon S3 Developer Guide.
  4989. //
  4990. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4991. // with awserr.Error's Code and Message methods to get detailed information about
  4992. // the error.
  4993. //
  4994. // See the AWS API reference guide for Amazon Simple Storage Service's
  4995. // API operation PutBucketReplication for usage and error information.
  4996. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4997. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  4998. req, out := c.PutBucketReplicationRequest(input)
  4999. return out, req.Send()
  5000. }
  5001. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  5002. // the ability to pass a context and additional request options.
  5003. //
  5004. // See PutBucketReplication for details on how to use this API operation.
  5005. //
  5006. // The context must be non-nil and will be used for request cancellation. If
  5007. // the context is nil a panic will occur. In the future the SDK may create
  5008. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5009. // for more information on using Contexts.
  5010. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  5011. req, out := c.PutBucketReplicationRequest(input)
  5012. req.SetContext(ctx)
  5013. req.ApplyOptions(opts...)
  5014. return out, req.Send()
  5015. }
  5016. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  5017. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  5018. // client's request for the PutBucketRequestPayment operation. The "output" return
  5019. // value will be populated with the request's response once the request completes
  5020. // successfuly.
  5021. //
  5022. // Use "Send" method on the returned Request to send the API call to the service.
  5023. // the "output" return value is not valid until after Send returns without error.
  5024. //
  5025. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  5026. // API call, and error handling.
  5027. //
  5028. // This method is useful when you want to inject custom logic or configuration
  5029. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5030. //
  5031. //
  5032. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  5033. // req, resp := client.PutBucketRequestPaymentRequest(params)
  5034. //
  5035. // err := req.Send()
  5036. // if err == nil { // resp is now filled
  5037. // fmt.Println(resp)
  5038. // }
  5039. //
  5040. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5041. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  5042. op := &request.Operation{
  5043. Name: opPutBucketRequestPayment,
  5044. HTTPMethod: "PUT",
  5045. HTTPPath: "/{Bucket}?requestPayment",
  5046. }
  5047. if input == nil {
  5048. input = &PutBucketRequestPaymentInput{}
  5049. }
  5050. output = &PutBucketRequestPaymentOutput{}
  5051. req = c.newRequest(op, input, output)
  5052. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5053. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5054. return
  5055. }
  5056. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  5057. //
  5058. // Sets the request payment configuration for a bucket. By default, the bucket
  5059. // owner pays for downloads from the bucket. This configuration parameter enables
  5060. // the bucket owner (only) to specify that the person requesting the download
  5061. // will be charged for the download. Documentation on requester pays buckets
  5062. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  5063. //
  5064. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5065. // with awserr.Error's Code and Message methods to get detailed information about
  5066. // the error.
  5067. //
  5068. // See the AWS API reference guide for Amazon Simple Storage Service's
  5069. // API operation PutBucketRequestPayment for usage and error information.
  5070. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5071. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  5072. req, out := c.PutBucketRequestPaymentRequest(input)
  5073. return out, req.Send()
  5074. }
  5075. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  5076. // the ability to pass a context and additional request options.
  5077. //
  5078. // See PutBucketRequestPayment for details on how to use this API operation.
  5079. //
  5080. // The context must be non-nil and will be used for request cancellation. If
  5081. // the context is nil a panic will occur. In the future the SDK may create
  5082. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5083. // for more information on using Contexts.
  5084. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  5085. req, out := c.PutBucketRequestPaymentRequest(input)
  5086. req.SetContext(ctx)
  5087. req.ApplyOptions(opts...)
  5088. return out, req.Send()
  5089. }
  5090. const opPutBucketTagging = "PutBucketTagging"
  5091. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  5092. // client's request for the PutBucketTagging operation. The "output" return
  5093. // value will be populated with the request's response once the request completes
  5094. // successfuly.
  5095. //
  5096. // Use "Send" method on the returned Request to send the API call to the service.
  5097. // the "output" return value is not valid until after Send returns without error.
  5098. //
  5099. // See PutBucketTagging for more information on using the PutBucketTagging
  5100. // API call, and error handling.
  5101. //
  5102. // This method is useful when you want to inject custom logic or configuration
  5103. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5104. //
  5105. //
  5106. // // Example sending a request using the PutBucketTaggingRequest method.
  5107. // req, resp := client.PutBucketTaggingRequest(params)
  5108. //
  5109. // err := req.Send()
  5110. // if err == nil { // resp is now filled
  5111. // fmt.Println(resp)
  5112. // }
  5113. //
  5114. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5115. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  5116. op := &request.Operation{
  5117. Name: opPutBucketTagging,
  5118. HTTPMethod: "PUT",
  5119. HTTPPath: "/{Bucket}?tagging",
  5120. }
  5121. if input == nil {
  5122. input = &PutBucketTaggingInput{}
  5123. }
  5124. output = &PutBucketTaggingOutput{}
  5125. req = c.newRequest(op, input, output)
  5126. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5127. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5128. return
  5129. }
  5130. // PutBucketTagging API operation for Amazon Simple Storage Service.
  5131. //
  5132. // Sets the tags for a bucket.
  5133. //
  5134. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5135. // with awserr.Error's Code and Message methods to get detailed information about
  5136. // the error.
  5137. //
  5138. // See the AWS API reference guide for Amazon Simple Storage Service's
  5139. // API operation PutBucketTagging for usage and error information.
  5140. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5141. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  5142. req, out := c.PutBucketTaggingRequest(input)
  5143. return out, req.Send()
  5144. }
  5145. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  5146. // the ability to pass a context and additional request options.
  5147. //
  5148. // See PutBucketTagging for details on how to use this API operation.
  5149. //
  5150. // The context must be non-nil and will be used for request cancellation. If
  5151. // the context is nil a panic will occur. In the future the SDK may create
  5152. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5153. // for more information on using Contexts.
  5154. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  5155. req, out := c.PutBucketTaggingRequest(input)
  5156. req.SetContext(ctx)
  5157. req.ApplyOptions(opts...)
  5158. return out, req.Send()
  5159. }
  5160. const opPutBucketVersioning = "PutBucketVersioning"
  5161. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  5162. // client's request for the PutBucketVersioning operation. The "output" return
  5163. // value will be populated with the request's response once the request completes
  5164. // successfuly.
  5165. //
  5166. // Use "Send" method on the returned Request to send the API call to the service.
  5167. // the "output" return value is not valid until after Send returns without error.
  5168. //
  5169. // See PutBucketVersioning for more information on using the PutBucketVersioning
  5170. // API call, and error handling.
  5171. //
  5172. // This method is useful when you want to inject custom logic or configuration
  5173. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5174. //
  5175. //
  5176. // // Example sending a request using the PutBucketVersioningRequest method.
  5177. // req, resp := client.PutBucketVersioningRequest(params)
  5178. //
  5179. // err := req.Send()
  5180. // if err == nil { // resp is now filled
  5181. // fmt.Println(resp)
  5182. // }
  5183. //
  5184. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5185. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5186. op := &request.Operation{
  5187. Name: opPutBucketVersioning,
  5188. HTTPMethod: "PUT",
  5189. HTTPPath: "/{Bucket}?versioning",
  5190. }
  5191. if input == nil {
  5192. input = &PutBucketVersioningInput{}
  5193. }
  5194. output = &PutBucketVersioningOutput{}
  5195. req = c.newRequest(op, input, output)
  5196. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5197. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5198. return
  5199. }
  5200. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5201. //
  5202. // Sets the versioning state of an existing bucket. To set the versioning state,
  5203. // you must be the bucket owner.
  5204. //
  5205. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5206. // with awserr.Error's Code and Message methods to get detailed information about
  5207. // the error.
  5208. //
  5209. // See the AWS API reference guide for Amazon Simple Storage Service's
  5210. // API operation PutBucketVersioning for usage and error information.
  5211. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5212. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5213. req, out := c.PutBucketVersioningRequest(input)
  5214. return out, req.Send()
  5215. }
  5216. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5217. // the ability to pass a context and additional request options.
  5218. //
  5219. // See PutBucketVersioning for details on how to use this API operation.
  5220. //
  5221. // The context must be non-nil and will be used for request cancellation. If
  5222. // the context is nil a panic will occur. In the future the SDK may create
  5223. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5224. // for more information on using Contexts.
  5225. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5226. req, out := c.PutBucketVersioningRequest(input)
  5227. req.SetContext(ctx)
  5228. req.ApplyOptions(opts...)
  5229. return out, req.Send()
  5230. }
  5231. const opPutBucketWebsite = "PutBucketWebsite"
  5232. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5233. // client's request for the PutBucketWebsite operation. The "output" return
  5234. // value will be populated with the request's response once the request completes
  5235. // successfuly.
  5236. //
  5237. // Use "Send" method on the returned Request to send the API call to the service.
  5238. // the "output" return value is not valid until after Send returns without error.
  5239. //
  5240. // See PutBucketWebsite for more information on using the PutBucketWebsite
  5241. // API call, and error handling.
  5242. //
  5243. // This method is useful when you want to inject custom logic or configuration
  5244. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5245. //
  5246. //
  5247. // // Example sending a request using the PutBucketWebsiteRequest method.
  5248. // req, resp := client.PutBucketWebsiteRequest(params)
  5249. //
  5250. // err := req.Send()
  5251. // if err == nil { // resp is now filled
  5252. // fmt.Println(resp)
  5253. // }
  5254. //
  5255. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5256. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5257. op := &request.Operation{
  5258. Name: opPutBucketWebsite,
  5259. HTTPMethod: "PUT",
  5260. HTTPPath: "/{Bucket}?website",
  5261. }
  5262. if input == nil {
  5263. input = &PutBucketWebsiteInput{}
  5264. }
  5265. output = &PutBucketWebsiteOutput{}
  5266. req = c.newRequest(op, input, output)
  5267. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5268. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5269. return
  5270. }
  5271. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5272. //
  5273. // Set the website configuration for a bucket.
  5274. //
  5275. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5276. // with awserr.Error's Code and Message methods to get detailed information about
  5277. // the error.
  5278. //
  5279. // See the AWS API reference guide for Amazon Simple Storage Service's
  5280. // API operation PutBucketWebsite for usage and error information.
  5281. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5282. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5283. req, out := c.PutBucketWebsiteRequest(input)
  5284. return out, req.Send()
  5285. }
  5286. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5287. // the ability to pass a context and additional request options.
  5288. //
  5289. // See PutBucketWebsite for details on how to use this API operation.
  5290. //
  5291. // The context must be non-nil and will be used for request cancellation. If
  5292. // the context is nil a panic will occur. In the future the SDK may create
  5293. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5294. // for more information on using Contexts.
  5295. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5296. req, out := c.PutBucketWebsiteRequest(input)
  5297. req.SetContext(ctx)
  5298. req.ApplyOptions(opts...)
  5299. return out, req.Send()
  5300. }
  5301. const opPutObject = "PutObject"
  5302. // PutObjectRequest generates a "aws/request.Request" representing the
  5303. // client's request for the PutObject operation. The "output" return
  5304. // value will be populated with the request's response once the request completes
  5305. // successfuly.
  5306. //
  5307. // Use "Send" method on the returned Request to send the API call to the service.
  5308. // the "output" return value is not valid until after Send returns without error.
  5309. //
  5310. // See PutObject for more information on using the PutObject
  5311. // API call, and error handling.
  5312. //
  5313. // This method is useful when you want to inject custom logic or configuration
  5314. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5315. //
  5316. //
  5317. // // Example sending a request using the PutObjectRequest method.
  5318. // req, resp := client.PutObjectRequest(params)
  5319. //
  5320. // err := req.Send()
  5321. // if err == nil { // resp is now filled
  5322. // fmt.Println(resp)
  5323. // }
  5324. //
  5325. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5326. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5327. op := &request.Operation{
  5328. Name: opPutObject,
  5329. HTTPMethod: "PUT",
  5330. HTTPPath: "/{Bucket}/{Key+}",
  5331. }
  5332. if input == nil {
  5333. input = &PutObjectInput{}
  5334. }
  5335. output = &PutObjectOutput{}
  5336. req = c.newRequest(op, input, output)
  5337. return
  5338. }
  5339. // PutObject API operation for Amazon Simple Storage Service.
  5340. //
  5341. // Adds an object to a bucket.
  5342. //
  5343. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5344. // with awserr.Error's Code and Message methods to get detailed information about
  5345. // the error.
  5346. //
  5347. // See the AWS API reference guide for Amazon Simple Storage Service's
  5348. // API operation PutObject for usage and error information.
  5349. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5350. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5351. req, out := c.PutObjectRequest(input)
  5352. return out, req.Send()
  5353. }
  5354. // PutObjectWithContext is the same as PutObject with the addition of
  5355. // the ability to pass a context and additional request options.
  5356. //
  5357. // See PutObject for details on how to use this API operation.
  5358. //
  5359. // The context must be non-nil and will be used for request cancellation. If
  5360. // the context is nil a panic will occur. In the future the SDK may create
  5361. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5362. // for more information on using Contexts.
  5363. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5364. req, out := c.PutObjectRequest(input)
  5365. req.SetContext(ctx)
  5366. req.ApplyOptions(opts...)
  5367. return out, req.Send()
  5368. }
  5369. const opPutObjectAcl = "PutObjectAcl"
  5370. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5371. // client's request for the PutObjectAcl operation. The "output" return
  5372. // value will be populated with the request's response once the request completes
  5373. // successfuly.
  5374. //
  5375. // Use "Send" method on the returned Request to send the API call to the service.
  5376. // the "output" return value is not valid until after Send returns without error.
  5377. //
  5378. // See PutObjectAcl for more information on using the PutObjectAcl
  5379. // API call, and error handling.
  5380. //
  5381. // This method is useful when you want to inject custom logic or configuration
  5382. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5383. //
  5384. //
  5385. // // Example sending a request using the PutObjectAclRequest method.
  5386. // req, resp := client.PutObjectAclRequest(params)
  5387. //
  5388. // err := req.Send()
  5389. // if err == nil { // resp is now filled
  5390. // fmt.Println(resp)
  5391. // }
  5392. //
  5393. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5394. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5395. op := &request.Operation{
  5396. Name: opPutObjectAcl,
  5397. HTTPMethod: "PUT",
  5398. HTTPPath: "/{Bucket}/{Key+}?acl",
  5399. }
  5400. if input == nil {
  5401. input = &PutObjectAclInput{}
  5402. }
  5403. output = &PutObjectAclOutput{}
  5404. req = c.newRequest(op, input, output)
  5405. return
  5406. }
  5407. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5408. //
  5409. // uses the acl subresource to set the access control list (ACL) permissions
  5410. // for an object that already exists in a bucket
  5411. //
  5412. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5413. // with awserr.Error's Code and Message methods to get detailed information about
  5414. // the error.
  5415. //
  5416. // See the AWS API reference guide for Amazon Simple Storage Service's
  5417. // API operation PutObjectAcl for usage and error information.
  5418. //
  5419. // Returned Error Codes:
  5420. // * ErrCodeNoSuchKey "NoSuchKey"
  5421. // The specified key does not exist.
  5422. //
  5423. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5424. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5425. req, out := c.PutObjectAclRequest(input)
  5426. return out, req.Send()
  5427. }
  5428. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5429. // the ability to pass a context and additional request options.
  5430. //
  5431. // See PutObjectAcl for details on how to use this API operation.
  5432. //
  5433. // The context must be non-nil and will be used for request cancellation. If
  5434. // the context is nil a panic will occur. In the future the SDK may create
  5435. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5436. // for more information on using Contexts.
  5437. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5438. req, out := c.PutObjectAclRequest(input)
  5439. req.SetContext(ctx)
  5440. req.ApplyOptions(opts...)
  5441. return out, req.Send()
  5442. }
  5443. const opPutObjectTagging = "PutObjectTagging"
  5444. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  5445. // client's request for the PutObjectTagging operation. The "output" return
  5446. // value will be populated with the request's response once the request completes
  5447. // successfuly.
  5448. //
  5449. // Use "Send" method on the returned Request to send the API call to the service.
  5450. // the "output" return value is not valid until after Send returns without error.
  5451. //
  5452. // See PutObjectTagging for more information on using the PutObjectTagging
  5453. // API call, and error handling.
  5454. //
  5455. // This method is useful when you want to inject custom logic or configuration
  5456. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5457. //
  5458. //
  5459. // // Example sending a request using the PutObjectTaggingRequest method.
  5460. // req, resp := client.PutObjectTaggingRequest(params)
  5461. //
  5462. // err := req.Send()
  5463. // if err == nil { // resp is now filled
  5464. // fmt.Println(resp)
  5465. // }
  5466. //
  5467. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5468. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  5469. op := &request.Operation{
  5470. Name: opPutObjectTagging,
  5471. HTTPMethod: "PUT",
  5472. HTTPPath: "/{Bucket}/{Key+}?tagging",
  5473. }
  5474. if input == nil {
  5475. input = &PutObjectTaggingInput{}
  5476. }
  5477. output = &PutObjectTaggingOutput{}
  5478. req = c.newRequest(op, input, output)
  5479. return
  5480. }
  5481. // PutObjectTagging API operation for Amazon Simple Storage Service.
  5482. //
  5483. // Sets the supplied tag-set to an object that already exists in a bucket
  5484. //
  5485. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5486. // with awserr.Error's Code and Message methods to get detailed information about
  5487. // the error.
  5488. //
  5489. // See the AWS API reference guide for Amazon Simple Storage Service's
  5490. // API operation PutObjectTagging for usage and error information.
  5491. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5492. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  5493. req, out := c.PutObjectTaggingRequest(input)
  5494. return out, req.Send()
  5495. }
  5496. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  5497. // the ability to pass a context and additional request options.
  5498. //
  5499. // See PutObjectTagging for details on how to use this API operation.
  5500. //
  5501. // The context must be non-nil and will be used for request cancellation. If
  5502. // the context is nil a panic will occur. In the future the SDK may create
  5503. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5504. // for more information on using Contexts.
  5505. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  5506. req, out := c.PutObjectTaggingRequest(input)
  5507. req.SetContext(ctx)
  5508. req.ApplyOptions(opts...)
  5509. return out, req.Send()
  5510. }
  5511. const opRestoreObject = "RestoreObject"
  5512. // RestoreObjectRequest generates a "aws/request.Request" representing the
  5513. // client's request for the RestoreObject operation. The "output" return
  5514. // value will be populated with the request's response once the request completes
  5515. // successfuly.
  5516. //
  5517. // Use "Send" method on the returned Request to send the API call to the service.
  5518. // the "output" return value is not valid until after Send returns without error.
  5519. //
  5520. // See RestoreObject for more information on using the RestoreObject
  5521. // API call, and error handling.
  5522. //
  5523. // This method is useful when you want to inject custom logic or configuration
  5524. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5525. //
  5526. //
  5527. // // Example sending a request using the RestoreObjectRequest method.
  5528. // req, resp := client.RestoreObjectRequest(params)
  5529. //
  5530. // err := req.Send()
  5531. // if err == nil { // resp is now filled
  5532. // fmt.Println(resp)
  5533. // }
  5534. //
  5535. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5536. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  5537. op := &request.Operation{
  5538. Name: opRestoreObject,
  5539. HTTPMethod: "POST",
  5540. HTTPPath: "/{Bucket}/{Key+}?restore",
  5541. }
  5542. if input == nil {
  5543. input = &RestoreObjectInput{}
  5544. }
  5545. output = &RestoreObjectOutput{}
  5546. req = c.newRequest(op, input, output)
  5547. return
  5548. }
  5549. // RestoreObject API operation for Amazon Simple Storage Service.
  5550. //
  5551. // Restores an archived copy of an object back into Amazon S3
  5552. //
  5553. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5554. // with awserr.Error's Code and Message methods to get detailed information about
  5555. // the error.
  5556. //
  5557. // See the AWS API reference guide for Amazon Simple Storage Service's
  5558. // API operation RestoreObject for usage and error information.
  5559. //
  5560. // Returned Error Codes:
  5561. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  5562. // This operation is not allowed against this storage tier
  5563. //
  5564. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5565. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  5566. req, out := c.RestoreObjectRequest(input)
  5567. return out, req.Send()
  5568. }
  5569. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  5570. // the ability to pass a context and additional request options.
  5571. //
  5572. // See RestoreObject for details on how to use this API operation.
  5573. //
  5574. // The context must be non-nil and will be used for request cancellation. If
  5575. // the context is nil a panic will occur. In the future the SDK may create
  5576. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5577. // for more information on using Contexts.
  5578. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  5579. req, out := c.RestoreObjectRequest(input)
  5580. req.SetContext(ctx)
  5581. req.ApplyOptions(opts...)
  5582. return out, req.Send()
  5583. }
  5584. const opSelectObjectContent = "SelectObjectContent"
  5585. // SelectObjectContentRequest generates a "aws/request.Request" representing the
  5586. // client's request for the SelectObjectContent operation. The "output" return
  5587. // value will be populated with the request's response once the request completes
  5588. // successfuly.
  5589. //
  5590. // Use "Send" method on the returned Request to send the API call to the service.
  5591. // the "output" return value is not valid until after Send returns without error.
  5592. //
  5593. // See SelectObjectContent for more information on using the SelectObjectContent
  5594. // API call, and error handling.
  5595. //
  5596. // This method is useful when you want to inject custom logic or configuration
  5597. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5598. //
  5599. //
  5600. // // Example sending a request using the SelectObjectContentRequest method.
  5601. // req, resp := client.SelectObjectContentRequest(params)
  5602. //
  5603. // err := req.Send()
  5604. // if err == nil { // resp is now filled
  5605. // fmt.Println(resp)
  5606. // }
  5607. //
  5608. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  5609. func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
  5610. op := &request.Operation{
  5611. Name: opSelectObjectContent,
  5612. HTTPMethod: "POST",
  5613. HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
  5614. }
  5615. if input == nil {
  5616. input = &SelectObjectContentInput{}
  5617. }
  5618. output = &SelectObjectContentOutput{}
  5619. req = c.newRequest(op, input, output)
  5620. req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  5621. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
  5622. req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
  5623. return
  5624. }
  5625. // SelectObjectContent API operation for Amazon Simple Storage Service.
  5626. //
  5627. // This operation filters the contents of an Amazon S3 object based on a simple
  5628. // Structured Query Language (SQL) statement. In the request, along with the
  5629. // SQL expression, you must also specify a data serialization format (JSON or
  5630. // CSV) of the object. Amazon S3 uses this to parse object data into records,
  5631. // and returns only records that match the specified SQL expression. You must
  5632. // also specify the data serialization format for the response.
  5633. //
  5634. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5635. // with awserr.Error's Code and Message methods to get detailed information about
  5636. // the error.
  5637. //
  5638. // See the AWS API reference guide for Amazon Simple Storage Service's
  5639. // API operation SelectObjectContent for usage and error information.
  5640. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  5641. func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
  5642. req, out := c.SelectObjectContentRequest(input)
  5643. return out, req.Send()
  5644. }
  5645. // SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
  5646. // the ability to pass a context and additional request options.
  5647. //
  5648. // See SelectObjectContent for details on how to use this API operation.
  5649. //
  5650. // The context must be non-nil and will be used for request cancellation. If
  5651. // the context is nil a panic will occur. In the future the SDK may create
  5652. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5653. // for more information on using Contexts.
  5654. func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
  5655. req, out := c.SelectObjectContentRequest(input)
  5656. req.SetContext(ctx)
  5657. req.ApplyOptions(opts...)
  5658. return out, req.Send()
  5659. }
  5660. const opUploadPart = "UploadPart"
  5661. // UploadPartRequest generates a "aws/request.Request" representing the
  5662. // client's request for the UploadPart operation. The "output" return
  5663. // value will be populated with the request's response once the request completes
  5664. // successfuly.
  5665. //
  5666. // Use "Send" method on the returned Request to send the API call to the service.
  5667. // the "output" return value is not valid until after Send returns without error.
  5668. //
  5669. // See UploadPart for more information on using the UploadPart
  5670. // API call, and error handling.
  5671. //
  5672. // This method is useful when you want to inject custom logic or configuration
  5673. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5674. //
  5675. //
  5676. // // Example sending a request using the UploadPartRequest method.
  5677. // req, resp := client.UploadPartRequest(params)
  5678. //
  5679. // err := req.Send()
  5680. // if err == nil { // resp is now filled
  5681. // fmt.Println(resp)
  5682. // }
  5683. //
  5684. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5685. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  5686. op := &request.Operation{
  5687. Name: opUploadPart,
  5688. HTTPMethod: "PUT",
  5689. HTTPPath: "/{Bucket}/{Key+}",
  5690. }
  5691. if input == nil {
  5692. input = &UploadPartInput{}
  5693. }
  5694. output = &UploadPartOutput{}
  5695. req = c.newRequest(op, input, output)
  5696. return
  5697. }
  5698. // UploadPart API operation for Amazon Simple Storage Service.
  5699. //
  5700. // Uploads a part in a multipart upload.
  5701. //
  5702. // Note: After you initiate multipart upload and upload one or more parts, you
  5703. // must either complete or abort multipart upload in order to stop getting charged
  5704. // for storage of the uploaded parts. Only after you either complete or abort
  5705. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  5706. // you for the parts storage.
  5707. //
  5708. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5709. // with awserr.Error's Code and Message methods to get detailed information about
  5710. // the error.
  5711. //
  5712. // See the AWS API reference guide for Amazon Simple Storage Service's
  5713. // API operation UploadPart for usage and error information.
  5714. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5715. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  5716. req, out := c.UploadPartRequest(input)
  5717. return out, req.Send()
  5718. }
  5719. // UploadPartWithContext is the same as UploadPart with the addition of
  5720. // the ability to pass a context and additional request options.
  5721. //
  5722. // See UploadPart for details on how to use this API operation.
  5723. //
  5724. // The context must be non-nil and will be used for request cancellation. If
  5725. // the context is nil a panic will occur. In the future the SDK may create
  5726. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5727. // for more information on using Contexts.
  5728. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  5729. req, out := c.UploadPartRequest(input)
  5730. req.SetContext(ctx)
  5731. req.ApplyOptions(opts...)
  5732. return out, req.Send()
  5733. }
  5734. const opUploadPartCopy = "UploadPartCopy"
  5735. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  5736. // client's request for the UploadPartCopy operation. The "output" return
  5737. // value will be populated with the request's response once the request completes
  5738. // successfuly.
  5739. //
  5740. // Use "Send" method on the returned Request to send the API call to the service.
  5741. // the "output" return value is not valid until after Send returns without error.
  5742. //
  5743. // See UploadPartCopy for more information on using the UploadPartCopy
  5744. // API call, and error handling.
  5745. //
  5746. // This method is useful when you want to inject custom logic or configuration
  5747. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5748. //
  5749. //
  5750. // // Example sending a request using the UploadPartCopyRequest method.
  5751. // req, resp := client.UploadPartCopyRequest(params)
  5752. //
  5753. // err := req.Send()
  5754. // if err == nil { // resp is now filled
  5755. // fmt.Println(resp)
  5756. // }
  5757. //
  5758. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5759. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  5760. op := &request.Operation{
  5761. Name: opUploadPartCopy,
  5762. HTTPMethod: "PUT",
  5763. HTTPPath: "/{Bucket}/{Key+}",
  5764. }
  5765. if input == nil {
  5766. input = &UploadPartCopyInput{}
  5767. }
  5768. output = &UploadPartCopyOutput{}
  5769. req = c.newRequest(op, input, output)
  5770. return
  5771. }
  5772. // UploadPartCopy API operation for Amazon Simple Storage Service.
  5773. //
  5774. // Uploads a part by copying data from an existing object as data source.
  5775. //
  5776. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5777. // with awserr.Error's Code and Message methods to get detailed information about
  5778. // the error.
  5779. //
  5780. // See the AWS API reference guide for Amazon Simple Storage Service's
  5781. // API operation UploadPartCopy for usage and error information.
  5782. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5783. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  5784. req, out := c.UploadPartCopyRequest(input)
  5785. return out, req.Send()
  5786. }
  5787. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  5788. // the ability to pass a context and additional request options.
  5789. //
  5790. // See UploadPartCopy for details on how to use this API operation.
  5791. //
  5792. // The context must be non-nil and will be used for request cancellation. If
  5793. // the context is nil a panic will occur. In the future the SDK may create
  5794. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5795. // for more information on using Contexts.
  5796. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  5797. req, out := c.UploadPartCopyRequest(input)
  5798. req.SetContext(ctx)
  5799. req.ApplyOptions(opts...)
  5800. return out, req.Send()
  5801. }
  5802. // Specifies the days since the initiation of an Incomplete Multipart Upload
  5803. // that Lifecycle will wait before permanently removing all parts of the upload.
  5804. type AbortIncompleteMultipartUpload struct {
  5805. _ struct{} `type:"structure"`
  5806. // Indicates the number of days that must pass since initiation for Lifecycle
  5807. // to abort an Incomplete Multipart Upload.
  5808. DaysAfterInitiation *int64 `type:"integer"`
  5809. }
  5810. // String returns the string representation
  5811. func (s AbortIncompleteMultipartUpload) String() string {
  5812. return awsutil.Prettify(s)
  5813. }
  5814. // GoString returns the string representation
  5815. func (s AbortIncompleteMultipartUpload) GoString() string {
  5816. return s.String()
  5817. }
  5818. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  5819. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  5820. s.DaysAfterInitiation = &v
  5821. return s
  5822. }
  5823. type AbortMultipartUploadInput struct {
  5824. _ struct{} `type:"structure"`
  5825. // Bucket is a required field
  5826. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5827. // Key is a required field
  5828. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5829. // Confirms that the requester knows that she or he will be charged for the
  5830. // request. Bucket owners need not specify this parameter in their requests.
  5831. // Documentation on downloading objects from requester pays buckets can be found
  5832. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5833. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5834. // UploadId is a required field
  5835. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  5836. }
  5837. // String returns the string representation
  5838. func (s AbortMultipartUploadInput) String() string {
  5839. return awsutil.Prettify(s)
  5840. }
  5841. // GoString returns the string representation
  5842. func (s AbortMultipartUploadInput) GoString() string {
  5843. return s.String()
  5844. }
  5845. // Validate inspects the fields of the type to determine if they are valid.
  5846. func (s *AbortMultipartUploadInput) Validate() error {
  5847. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  5848. if s.Bucket == nil {
  5849. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5850. }
  5851. if s.Key == nil {
  5852. invalidParams.Add(request.NewErrParamRequired("Key"))
  5853. }
  5854. if s.Key != nil && len(*s.Key) < 1 {
  5855. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5856. }
  5857. if s.UploadId == nil {
  5858. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  5859. }
  5860. if invalidParams.Len() > 0 {
  5861. return invalidParams
  5862. }
  5863. return nil
  5864. }
  5865. // SetBucket sets the Bucket field's value.
  5866. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  5867. s.Bucket = &v
  5868. return s
  5869. }
  5870. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  5871. if s.Bucket == nil {
  5872. return v
  5873. }
  5874. return *s.Bucket
  5875. }
  5876. // SetKey sets the Key field's value.
  5877. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  5878. s.Key = &v
  5879. return s
  5880. }
  5881. // SetRequestPayer sets the RequestPayer field's value.
  5882. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  5883. s.RequestPayer = &v
  5884. return s
  5885. }
  5886. // SetUploadId sets the UploadId field's value.
  5887. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  5888. s.UploadId = &v
  5889. return s
  5890. }
  5891. type AbortMultipartUploadOutput struct {
  5892. _ struct{} `type:"structure"`
  5893. // If present, indicates that the requester was successfully charged for the
  5894. // request.
  5895. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5896. }
  5897. // String returns the string representation
  5898. func (s AbortMultipartUploadOutput) String() string {
  5899. return awsutil.Prettify(s)
  5900. }
  5901. // GoString returns the string representation
  5902. func (s AbortMultipartUploadOutput) GoString() string {
  5903. return s.String()
  5904. }
  5905. // SetRequestCharged sets the RequestCharged field's value.
  5906. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  5907. s.RequestCharged = &v
  5908. return s
  5909. }
  5910. type AccelerateConfiguration struct {
  5911. _ struct{} `type:"structure"`
  5912. // The accelerate configuration of the bucket.
  5913. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  5914. }
  5915. // String returns the string representation
  5916. func (s AccelerateConfiguration) String() string {
  5917. return awsutil.Prettify(s)
  5918. }
  5919. // GoString returns the string representation
  5920. func (s AccelerateConfiguration) GoString() string {
  5921. return s.String()
  5922. }
  5923. // SetStatus sets the Status field's value.
  5924. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  5925. s.Status = &v
  5926. return s
  5927. }
  5928. type AccessControlPolicy struct {
  5929. _ struct{} `type:"structure"`
  5930. // A list of grants.
  5931. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5932. Owner *Owner `type:"structure"`
  5933. }
  5934. // String returns the string representation
  5935. func (s AccessControlPolicy) String() string {
  5936. return awsutil.Prettify(s)
  5937. }
  5938. // GoString returns the string representation
  5939. func (s AccessControlPolicy) GoString() string {
  5940. return s.String()
  5941. }
  5942. // Validate inspects the fields of the type to determine if they are valid.
  5943. func (s *AccessControlPolicy) Validate() error {
  5944. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  5945. if s.Grants != nil {
  5946. for i, v := range s.Grants {
  5947. if v == nil {
  5948. continue
  5949. }
  5950. if err := v.Validate(); err != nil {
  5951. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  5952. }
  5953. }
  5954. }
  5955. if invalidParams.Len() > 0 {
  5956. return invalidParams
  5957. }
  5958. return nil
  5959. }
  5960. // SetGrants sets the Grants field's value.
  5961. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  5962. s.Grants = v
  5963. return s
  5964. }
  5965. // SetOwner sets the Owner field's value.
  5966. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  5967. s.Owner = v
  5968. return s
  5969. }
  5970. // Container for information regarding the access control for replicas.
  5971. type AccessControlTranslation struct {
  5972. _ struct{} `type:"structure"`
  5973. // The override value for the owner of the replica object.
  5974. //
  5975. // Owner is a required field
  5976. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  5977. }
  5978. // String returns the string representation
  5979. func (s AccessControlTranslation) String() string {
  5980. return awsutil.Prettify(s)
  5981. }
  5982. // GoString returns the string representation
  5983. func (s AccessControlTranslation) GoString() string {
  5984. return s.String()
  5985. }
  5986. // Validate inspects the fields of the type to determine if they are valid.
  5987. func (s *AccessControlTranslation) Validate() error {
  5988. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  5989. if s.Owner == nil {
  5990. invalidParams.Add(request.NewErrParamRequired("Owner"))
  5991. }
  5992. if invalidParams.Len() > 0 {
  5993. return invalidParams
  5994. }
  5995. return nil
  5996. }
  5997. // SetOwner sets the Owner field's value.
  5998. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  5999. s.Owner = &v
  6000. return s
  6001. }
  6002. type AnalyticsAndOperator struct {
  6003. _ struct{} `type:"structure"`
  6004. // The prefix to use when evaluating an AND predicate.
  6005. Prefix *string `type:"string"`
  6006. // The list of tags to use when evaluating an AND predicate.
  6007. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  6008. }
  6009. // String returns the string representation
  6010. func (s AnalyticsAndOperator) String() string {
  6011. return awsutil.Prettify(s)
  6012. }
  6013. // GoString returns the string representation
  6014. func (s AnalyticsAndOperator) GoString() string {
  6015. return s.String()
  6016. }
  6017. // Validate inspects the fields of the type to determine if they are valid.
  6018. func (s *AnalyticsAndOperator) Validate() error {
  6019. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  6020. if s.Tags != nil {
  6021. for i, v := range s.Tags {
  6022. if v == nil {
  6023. continue
  6024. }
  6025. if err := v.Validate(); err != nil {
  6026. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6027. }
  6028. }
  6029. }
  6030. if invalidParams.Len() > 0 {
  6031. return invalidParams
  6032. }
  6033. return nil
  6034. }
  6035. // SetPrefix sets the Prefix field's value.
  6036. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  6037. s.Prefix = &v
  6038. return s
  6039. }
  6040. // SetTags sets the Tags field's value.
  6041. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  6042. s.Tags = v
  6043. return s
  6044. }
  6045. type AnalyticsConfiguration struct {
  6046. _ struct{} `type:"structure"`
  6047. // The filter used to describe a set of objects for analyses. A filter must
  6048. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  6049. // If no filter is provided, all objects will be considered in any analysis.
  6050. Filter *AnalyticsFilter `type:"structure"`
  6051. // The identifier used to represent an analytics configuration.
  6052. //
  6053. // Id is a required field
  6054. Id *string `type:"string" required:"true"`
  6055. // If present, it indicates that data related to access patterns will be collected
  6056. // and made available to analyze the tradeoffs between different storage classes.
  6057. //
  6058. // StorageClassAnalysis is a required field
  6059. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  6060. }
  6061. // String returns the string representation
  6062. func (s AnalyticsConfiguration) String() string {
  6063. return awsutil.Prettify(s)
  6064. }
  6065. // GoString returns the string representation
  6066. func (s AnalyticsConfiguration) GoString() string {
  6067. return s.String()
  6068. }
  6069. // Validate inspects the fields of the type to determine if they are valid.
  6070. func (s *AnalyticsConfiguration) Validate() error {
  6071. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  6072. if s.Id == nil {
  6073. invalidParams.Add(request.NewErrParamRequired("Id"))
  6074. }
  6075. if s.StorageClassAnalysis == nil {
  6076. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  6077. }
  6078. if s.Filter != nil {
  6079. if err := s.Filter.Validate(); err != nil {
  6080. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  6081. }
  6082. }
  6083. if s.StorageClassAnalysis != nil {
  6084. if err := s.StorageClassAnalysis.Validate(); err != nil {
  6085. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  6086. }
  6087. }
  6088. if invalidParams.Len() > 0 {
  6089. return invalidParams
  6090. }
  6091. return nil
  6092. }
  6093. // SetFilter sets the Filter field's value.
  6094. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  6095. s.Filter = v
  6096. return s
  6097. }
  6098. // SetId sets the Id field's value.
  6099. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  6100. s.Id = &v
  6101. return s
  6102. }
  6103. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  6104. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  6105. s.StorageClassAnalysis = v
  6106. return s
  6107. }
  6108. type AnalyticsExportDestination struct {
  6109. _ struct{} `type:"structure"`
  6110. // A destination signifying output to an S3 bucket.
  6111. //
  6112. // S3BucketDestination is a required field
  6113. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  6114. }
  6115. // String returns the string representation
  6116. func (s AnalyticsExportDestination) String() string {
  6117. return awsutil.Prettify(s)
  6118. }
  6119. // GoString returns the string representation
  6120. func (s AnalyticsExportDestination) GoString() string {
  6121. return s.String()
  6122. }
  6123. // Validate inspects the fields of the type to determine if they are valid.
  6124. func (s *AnalyticsExportDestination) Validate() error {
  6125. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  6126. if s.S3BucketDestination == nil {
  6127. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  6128. }
  6129. if s.S3BucketDestination != nil {
  6130. if err := s.S3BucketDestination.Validate(); err != nil {
  6131. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  6132. }
  6133. }
  6134. if invalidParams.Len() > 0 {
  6135. return invalidParams
  6136. }
  6137. return nil
  6138. }
  6139. // SetS3BucketDestination sets the S3BucketDestination field's value.
  6140. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  6141. s.S3BucketDestination = v
  6142. return s
  6143. }
  6144. type AnalyticsFilter struct {
  6145. _ struct{} `type:"structure"`
  6146. // A conjunction (logical AND) of predicates, which is used in evaluating an
  6147. // analytics filter. The operator must have at least two predicates.
  6148. And *AnalyticsAndOperator `type:"structure"`
  6149. // The prefix to use when evaluating an analytics filter.
  6150. Prefix *string `type:"string"`
  6151. // The tag to use when evaluating an analytics filter.
  6152. Tag *Tag `type:"structure"`
  6153. }
  6154. // String returns the string representation
  6155. func (s AnalyticsFilter) String() string {
  6156. return awsutil.Prettify(s)
  6157. }
  6158. // GoString returns the string representation
  6159. func (s AnalyticsFilter) GoString() string {
  6160. return s.String()
  6161. }
  6162. // Validate inspects the fields of the type to determine if they are valid.
  6163. func (s *AnalyticsFilter) Validate() error {
  6164. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  6165. if s.And != nil {
  6166. if err := s.And.Validate(); err != nil {
  6167. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  6168. }
  6169. }
  6170. if s.Tag != nil {
  6171. if err := s.Tag.Validate(); err != nil {
  6172. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  6173. }
  6174. }
  6175. if invalidParams.Len() > 0 {
  6176. return invalidParams
  6177. }
  6178. return nil
  6179. }
  6180. // SetAnd sets the And field's value.
  6181. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  6182. s.And = v
  6183. return s
  6184. }
  6185. // SetPrefix sets the Prefix field's value.
  6186. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  6187. s.Prefix = &v
  6188. return s
  6189. }
  6190. // SetTag sets the Tag field's value.
  6191. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  6192. s.Tag = v
  6193. return s
  6194. }
  6195. type AnalyticsS3BucketDestination struct {
  6196. _ struct{} `type:"structure"`
  6197. // The Amazon resource name (ARN) of the bucket to which data is exported.
  6198. //
  6199. // Bucket is a required field
  6200. Bucket *string `type:"string" required:"true"`
  6201. // The account ID that owns the destination bucket. If no account ID is provided,
  6202. // the owner will not be validated prior to exporting data.
  6203. BucketAccountId *string `type:"string"`
  6204. // The file format used when exporting data to Amazon S3.
  6205. //
  6206. // Format is a required field
  6207. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  6208. // The prefix to use when exporting data. The exported data begins with this
  6209. // prefix.
  6210. Prefix *string `type:"string"`
  6211. }
  6212. // String returns the string representation
  6213. func (s AnalyticsS3BucketDestination) String() string {
  6214. return awsutil.Prettify(s)
  6215. }
  6216. // GoString returns the string representation
  6217. func (s AnalyticsS3BucketDestination) GoString() string {
  6218. return s.String()
  6219. }
  6220. // Validate inspects the fields of the type to determine if they are valid.
  6221. func (s *AnalyticsS3BucketDestination) Validate() error {
  6222. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  6223. if s.Bucket == nil {
  6224. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6225. }
  6226. if s.Format == nil {
  6227. invalidParams.Add(request.NewErrParamRequired("Format"))
  6228. }
  6229. if invalidParams.Len() > 0 {
  6230. return invalidParams
  6231. }
  6232. return nil
  6233. }
  6234. // SetBucket sets the Bucket field's value.
  6235. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  6236. s.Bucket = &v
  6237. return s
  6238. }
  6239. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  6240. if s.Bucket == nil {
  6241. return v
  6242. }
  6243. return *s.Bucket
  6244. }
  6245. // SetBucketAccountId sets the BucketAccountId field's value.
  6246. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  6247. s.BucketAccountId = &v
  6248. return s
  6249. }
  6250. // SetFormat sets the Format field's value.
  6251. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  6252. s.Format = &v
  6253. return s
  6254. }
  6255. // SetPrefix sets the Prefix field's value.
  6256. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  6257. s.Prefix = &v
  6258. return s
  6259. }
  6260. type Bucket struct {
  6261. _ struct{} `type:"structure"`
  6262. // Date the bucket was created.
  6263. CreationDate *time.Time `type:"timestamp"`
  6264. // The name of the bucket.
  6265. Name *string `type:"string"`
  6266. }
  6267. // String returns the string representation
  6268. func (s Bucket) String() string {
  6269. return awsutil.Prettify(s)
  6270. }
  6271. // GoString returns the string representation
  6272. func (s Bucket) GoString() string {
  6273. return s.String()
  6274. }
  6275. // SetCreationDate sets the CreationDate field's value.
  6276. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6277. s.CreationDate = &v
  6278. return s
  6279. }
  6280. // SetName sets the Name field's value.
  6281. func (s *Bucket) SetName(v string) *Bucket {
  6282. s.Name = &v
  6283. return s
  6284. }
  6285. type BucketLifecycleConfiguration struct {
  6286. _ struct{} `type:"structure"`
  6287. // Rules is a required field
  6288. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6289. }
  6290. // String returns the string representation
  6291. func (s BucketLifecycleConfiguration) String() string {
  6292. return awsutil.Prettify(s)
  6293. }
  6294. // GoString returns the string representation
  6295. func (s BucketLifecycleConfiguration) GoString() string {
  6296. return s.String()
  6297. }
  6298. // Validate inspects the fields of the type to determine if they are valid.
  6299. func (s *BucketLifecycleConfiguration) Validate() error {
  6300. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6301. if s.Rules == nil {
  6302. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6303. }
  6304. if s.Rules != nil {
  6305. for i, v := range s.Rules {
  6306. if v == nil {
  6307. continue
  6308. }
  6309. if err := v.Validate(); err != nil {
  6310. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6311. }
  6312. }
  6313. }
  6314. if invalidParams.Len() > 0 {
  6315. return invalidParams
  6316. }
  6317. return nil
  6318. }
  6319. // SetRules sets the Rules field's value.
  6320. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6321. s.Rules = v
  6322. return s
  6323. }
  6324. type BucketLoggingStatus struct {
  6325. _ struct{} `type:"structure"`
  6326. // Container for logging information. Presence of this element indicates that
  6327. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  6328. // in this case.
  6329. LoggingEnabled *LoggingEnabled `type:"structure"`
  6330. }
  6331. // String returns the string representation
  6332. func (s BucketLoggingStatus) String() string {
  6333. return awsutil.Prettify(s)
  6334. }
  6335. // GoString returns the string representation
  6336. func (s BucketLoggingStatus) GoString() string {
  6337. return s.String()
  6338. }
  6339. // Validate inspects the fields of the type to determine if they are valid.
  6340. func (s *BucketLoggingStatus) Validate() error {
  6341. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  6342. if s.LoggingEnabled != nil {
  6343. if err := s.LoggingEnabled.Validate(); err != nil {
  6344. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  6345. }
  6346. }
  6347. if invalidParams.Len() > 0 {
  6348. return invalidParams
  6349. }
  6350. return nil
  6351. }
  6352. // SetLoggingEnabled sets the LoggingEnabled field's value.
  6353. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  6354. s.LoggingEnabled = v
  6355. return s
  6356. }
  6357. type CORSConfiguration struct {
  6358. _ struct{} `type:"structure"`
  6359. // CORSRules is a required field
  6360. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  6361. }
  6362. // String returns the string representation
  6363. func (s CORSConfiguration) String() string {
  6364. return awsutil.Prettify(s)
  6365. }
  6366. // GoString returns the string representation
  6367. func (s CORSConfiguration) GoString() string {
  6368. return s.String()
  6369. }
  6370. // Validate inspects the fields of the type to determine if they are valid.
  6371. func (s *CORSConfiguration) Validate() error {
  6372. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  6373. if s.CORSRules == nil {
  6374. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  6375. }
  6376. if s.CORSRules != nil {
  6377. for i, v := range s.CORSRules {
  6378. if v == nil {
  6379. continue
  6380. }
  6381. if err := v.Validate(); err != nil {
  6382. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  6383. }
  6384. }
  6385. }
  6386. if invalidParams.Len() > 0 {
  6387. return invalidParams
  6388. }
  6389. return nil
  6390. }
  6391. // SetCORSRules sets the CORSRules field's value.
  6392. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  6393. s.CORSRules = v
  6394. return s
  6395. }
  6396. type CORSRule struct {
  6397. _ struct{} `type:"structure"`
  6398. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  6399. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  6400. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  6401. // to execute.
  6402. //
  6403. // AllowedMethods is a required field
  6404. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  6405. // One or more origins you want customers to be able to access the bucket from.
  6406. //
  6407. // AllowedOrigins is a required field
  6408. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  6409. // One or more headers in the response that you want customers to be able to
  6410. // access from their applications (for example, from a JavaScript XMLHttpRequest
  6411. // object).
  6412. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  6413. // The time in seconds that your browser is to cache the preflight response
  6414. // for the specified resource.
  6415. MaxAgeSeconds *int64 `type:"integer"`
  6416. }
  6417. // String returns the string representation
  6418. func (s CORSRule) String() string {
  6419. return awsutil.Prettify(s)
  6420. }
  6421. // GoString returns the string representation
  6422. func (s CORSRule) GoString() string {
  6423. return s.String()
  6424. }
  6425. // Validate inspects the fields of the type to determine if they are valid.
  6426. func (s *CORSRule) Validate() error {
  6427. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  6428. if s.AllowedMethods == nil {
  6429. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  6430. }
  6431. if s.AllowedOrigins == nil {
  6432. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  6433. }
  6434. if invalidParams.Len() > 0 {
  6435. return invalidParams
  6436. }
  6437. return nil
  6438. }
  6439. // SetAllowedHeaders sets the AllowedHeaders field's value.
  6440. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  6441. s.AllowedHeaders = v
  6442. return s
  6443. }
  6444. // SetAllowedMethods sets the AllowedMethods field's value.
  6445. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  6446. s.AllowedMethods = v
  6447. return s
  6448. }
  6449. // SetAllowedOrigins sets the AllowedOrigins field's value.
  6450. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  6451. s.AllowedOrigins = v
  6452. return s
  6453. }
  6454. // SetExposeHeaders sets the ExposeHeaders field's value.
  6455. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  6456. s.ExposeHeaders = v
  6457. return s
  6458. }
  6459. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  6460. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  6461. s.MaxAgeSeconds = &v
  6462. return s
  6463. }
  6464. // Describes how a CSV-formatted input object is formatted.
  6465. type CSVInput struct {
  6466. _ struct{} `type:"structure"`
  6467. // Specifies that CSV field values may contain quoted record delimiters and
  6468. // such records should be allowed. Default value is FALSE. Setting this value
  6469. // to TRUE may lower performance.
  6470. AllowQuotedRecordDelimiter *bool `type:"boolean"`
  6471. // Single character used to indicate a row should be ignored when present at
  6472. // the start of a row.
  6473. Comments *string `type:"string"`
  6474. // Value used to separate individual fields in a record.
  6475. FieldDelimiter *string `type:"string"`
  6476. // Describes the first line of input. Valid values: None, Ignore, Use.
  6477. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  6478. // Value used for escaping where the field delimiter is part of the value.
  6479. QuoteCharacter *string `type:"string"`
  6480. // Single character used for escaping the quote character inside an already
  6481. // escaped value.
  6482. QuoteEscapeCharacter *string `type:"string"`
  6483. // Value used to separate individual records.
  6484. RecordDelimiter *string `type:"string"`
  6485. }
  6486. // String returns the string representation
  6487. func (s CSVInput) String() string {
  6488. return awsutil.Prettify(s)
  6489. }
  6490. // GoString returns the string representation
  6491. func (s CSVInput) GoString() string {
  6492. return s.String()
  6493. }
  6494. // SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
  6495. func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
  6496. s.AllowQuotedRecordDelimiter = &v
  6497. return s
  6498. }
  6499. // SetComments sets the Comments field's value.
  6500. func (s *CSVInput) SetComments(v string) *CSVInput {
  6501. s.Comments = &v
  6502. return s
  6503. }
  6504. // SetFieldDelimiter sets the FieldDelimiter field's value.
  6505. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  6506. s.FieldDelimiter = &v
  6507. return s
  6508. }
  6509. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  6510. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  6511. s.FileHeaderInfo = &v
  6512. return s
  6513. }
  6514. // SetQuoteCharacter sets the QuoteCharacter field's value.
  6515. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  6516. s.QuoteCharacter = &v
  6517. return s
  6518. }
  6519. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  6520. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  6521. s.QuoteEscapeCharacter = &v
  6522. return s
  6523. }
  6524. // SetRecordDelimiter sets the RecordDelimiter field's value.
  6525. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  6526. s.RecordDelimiter = &v
  6527. return s
  6528. }
  6529. // Describes how CSV-formatted results are formatted.
  6530. type CSVOutput struct {
  6531. _ struct{} `type:"structure"`
  6532. // Value used to separate individual fields in a record.
  6533. FieldDelimiter *string `type:"string"`
  6534. // Value used for escaping where the field delimiter is part of the value.
  6535. QuoteCharacter *string `type:"string"`
  6536. // Single character used for escaping the quote character inside an already
  6537. // escaped value.
  6538. QuoteEscapeCharacter *string `type:"string"`
  6539. // Indicates whether or not all output fields should be quoted.
  6540. QuoteFields *string `type:"string" enum:"QuoteFields"`
  6541. // Value used to separate individual records.
  6542. RecordDelimiter *string `type:"string"`
  6543. }
  6544. // String returns the string representation
  6545. func (s CSVOutput) String() string {
  6546. return awsutil.Prettify(s)
  6547. }
  6548. // GoString returns the string representation
  6549. func (s CSVOutput) GoString() string {
  6550. return s.String()
  6551. }
  6552. // SetFieldDelimiter sets the FieldDelimiter field's value.
  6553. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  6554. s.FieldDelimiter = &v
  6555. return s
  6556. }
  6557. // SetQuoteCharacter sets the QuoteCharacter field's value.
  6558. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  6559. s.QuoteCharacter = &v
  6560. return s
  6561. }
  6562. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  6563. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  6564. s.QuoteEscapeCharacter = &v
  6565. return s
  6566. }
  6567. // SetQuoteFields sets the QuoteFields field's value.
  6568. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  6569. s.QuoteFields = &v
  6570. return s
  6571. }
  6572. // SetRecordDelimiter sets the RecordDelimiter field's value.
  6573. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  6574. s.RecordDelimiter = &v
  6575. return s
  6576. }
  6577. type CloudFunctionConfiguration struct {
  6578. _ struct{} `type:"structure"`
  6579. CloudFunction *string `type:"string"`
  6580. // Bucket event for which to send notifications.
  6581. //
  6582. // Deprecated: Event has been deprecated
  6583. Event *string `deprecated:"true" type:"string" enum:"Event"`
  6584. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  6585. // Optional unique identifier for configurations in a notification configuration.
  6586. // If you don't provide one, Amazon S3 will assign an ID.
  6587. Id *string `type:"string"`
  6588. InvocationRole *string `type:"string"`
  6589. }
  6590. // String returns the string representation
  6591. func (s CloudFunctionConfiguration) String() string {
  6592. return awsutil.Prettify(s)
  6593. }
  6594. // GoString returns the string representation
  6595. func (s CloudFunctionConfiguration) GoString() string {
  6596. return s.String()
  6597. }
  6598. // SetCloudFunction sets the CloudFunction field's value.
  6599. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  6600. s.CloudFunction = &v
  6601. return s
  6602. }
  6603. // SetEvent sets the Event field's value.
  6604. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  6605. s.Event = &v
  6606. return s
  6607. }
  6608. // SetEvents sets the Events field's value.
  6609. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  6610. s.Events = v
  6611. return s
  6612. }
  6613. // SetId sets the Id field's value.
  6614. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  6615. s.Id = &v
  6616. return s
  6617. }
  6618. // SetInvocationRole sets the InvocationRole field's value.
  6619. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  6620. s.InvocationRole = &v
  6621. return s
  6622. }
  6623. type CommonPrefix struct {
  6624. _ struct{} `type:"structure"`
  6625. Prefix *string `type:"string"`
  6626. }
  6627. // String returns the string representation
  6628. func (s CommonPrefix) String() string {
  6629. return awsutil.Prettify(s)
  6630. }
  6631. // GoString returns the string representation
  6632. func (s CommonPrefix) GoString() string {
  6633. return s.String()
  6634. }
  6635. // SetPrefix sets the Prefix field's value.
  6636. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  6637. s.Prefix = &v
  6638. return s
  6639. }
  6640. type CompleteMultipartUploadInput struct {
  6641. _ struct{} `type:"structure" payload:"MultipartUpload"`
  6642. // Bucket is a required field
  6643. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6644. // Key is a required field
  6645. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6646. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  6647. // Confirms that the requester knows that she or he will be charged for the
  6648. // request. Bucket owners need not specify this parameter in their requests.
  6649. // Documentation on downloading objects from requester pays buckets can be found
  6650. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6651. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6652. // UploadId is a required field
  6653. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6654. }
  6655. // String returns the string representation
  6656. func (s CompleteMultipartUploadInput) String() string {
  6657. return awsutil.Prettify(s)
  6658. }
  6659. // GoString returns the string representation
  6660. func (s CompleteMultipartUploadInput) GoString() string {
  6661. return s.String()
  6662. }
  6663. // Validate inspects the fields of the type to determine if they are valid.
  6664. func (s *CompleteMultipartUploadInput) Validate() error {
  6665. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  6666. if s.Bucket == nil {
  6667. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6668. }
  6669. if s.Key == nil {
  6670. invalidParams.Add(request.NewErrParamRequired("Key"))
  6671. }
  6672. if s.Key != nil && len(*s.Key) < 1 {
  6673. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6674. }
  6675. if s.UploadId == nil {
  6676. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6677. }
  6678. if invalidParams.Len() > 0 {
  6679. return invalidParams
  6680. }
  6681. return nil
  6682. }
  6683. // SetBucket sets the Bucket field's value.
  6684. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  6685. s.Bucket = &v
  6686. return s
  6687. }
  6688. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  6689. if s.Bucket == nil {
  6690. return v
  6691. }
  6692. return *s.Bucket
  6693. }
  6694. // SetKey sets the Key field's value.
  6695. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  6696. s.Key = &v
  6697. return s
  6698. }
  6699. // SetMultipartUpload sets the MultipartUpload field's value.
  6700. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  6701. s.MultipartUpload = v
  6702. return s
  6703. }
  6704. // SetRequestPayer sets the RequestPayer field's value.
  6705. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  6706. s.RequestPayer = &v
  6707. return s
  6708. }
  6709. // SetUploadId sets the UploadId field's value.
  6710. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  6711. s.UploadId = &v
  6712. return s
  6713. }
  6714. type CompleteMultipartUploadOutput struct {
  6715. _ struct{} `type:"structure"`
  6716. Bucket *string `type:"string"`
  6717. // Entity tag of the object.
  6718. ETag *string `type:"string"`
  6719. // If the object expiration is configured, this will contain the expiration
  6720. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  6721. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6722. Key *string `min:"1" type:"string"`
  6723. Location *string `type:"string"`
  6724. // If present, indicates that the requester was successfully charged for the
  6725. // request.
  6726. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6727. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6728. // encryption key that was used for the object.
  6729. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6730. // The Server-side encryption algorithm used when storing this object in S3
  6731. // (e.g., AES256, aws:kms).
  6732. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6733. // Version of the object.
  6734. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6735. }
  6736. // String returns the string representation
  6737. func (s CompleteMultipartUploadOutput) String() string {
  6738. return awsutil.Prettify(s)
  6739. }
  6740. // GoString returns the string representation
  6741. func (s CompleteMultipartUploadOutput) GoString() string {
  6742. return s.String()
  6743. }
  6744. // SetBucket sets the Bucket field's value.
  6745. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  6746. s.Bucket = &v
  6747. return s
  6748. }
  6749. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  6750. if s.Bucket == nil {
  6751. return v
  6752. }
  6753. return *s.Bucket
  6754. }
  6755. // SetETag sets the ETag field's value.
  6756. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  6757. s.ETag = &v
  6758. return s
  6759. }
  6760. // SetExpiration sets the Expiration field's value.
  6761. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  6762. s.Expiration = &v
  6763. return s
  6764. }
  6765. // SetKey sets the Key field's value.
  6766. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  6767. s.Key = &v
  6768. return s
  6769. }
  6770. // SetLocation sets the Location field's value.
  6771. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  6772. s.Location = &v
  6773. return s
  6774. }
  6775. // SetRequestCharged sets the RequestCharged field's value.
  6776. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  6777. s.RequestCharged = &v
  6778. return s
  6779. }
  6780. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6781. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  6782. s.SSEKMSKeyId = &v
  6783. return s
  6784. }
  6785. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6786. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  6787. s.ServerSideEncryption = &v
  6788. return s
  6789. }
  6790. // SetVersionId sets the VersionId field's value.
  6791. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  6792. s.VersionId = &v
  6793. return s
  6794. }
  6795. type CompletedMultipartUpload struct {
  6796. _ struct{} `type:"structure"`
  6797. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  6798. }
  6799. // String returns the string representation
  6800. func (s CompletedMultipartUpload) String() string {
  6801. return awsutil.Prettify(s)
  6802. }
  6803. // GoString returns the string representation
  6804. func (s CompletedMultipartUpload) GoString() string {
  6805. return s.String()
  6806. }
  6807. // SetParts sets the Parts field's value.
  6808. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  6809. s.Parts = v
  6810. return s
  6811. }
  6812. type CompletedPart struct {
  6813. _ struct{} `type:"structure"`
  6814. // Entity tag returned when the part was uploaded.
  6815. ETag *string `type:"string"`
  6816. // Part number that identifies the part. This is a positive integer between
  6817. // 1 and 10,000.
  6818. PartNumber *int64 `type:"integer"`
  6819. }
  6820. // String returns the string representation
  6821. func (s CompletedPart) String() string {
  6822. return awsutil.Prettify(s)
  6823. }
  6824. // GoString returns the string representation
  6825. func (s CompletedPart) GoString() string {
  6826. return s.String()
  6827. }
  6828. // SetETag sets the ETag field's value.
  6829. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  6830. s.ETag = &v
  6831. return s
  6832. }
  6833. // SetPartNumber sets the PartNumber field's value.
  6834. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  6835. s.PartNumber = &v
  6836. return s
  6837. }
  6838. type Condition struct {
  6839. _ struct{} `type:"structure"`
  6840. // The HTTP error code when the redirect is applied. In the event of an error,
  6841. // if the error code equals this value, then the specified redirect is applied.
  6842. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  6843. // is not specified. If both are specified, then both must be true for the redirect
  6844. // to be applied.
  6845. HttpErrorCodeReturnedEquals *string `type:"string"`
  6846. // The object key name prefix when the redirect is applied. For example, to
  6847. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  6848. // To redirect request for all pages with the prefix docs/, the key prefix will
  6849. // be /docs, which identifies all objects in the docs/ folder. Required when
  6850. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  6851. // is not specified. If both conditions are specified, both must be true for
  6852. // the redirect to be applied.
  6853. KeyPrefixEquals *string `type:"string"`
  6854. }
  6855. // String returns the string representation
  6856. func (s Condition) String() string {
  6857. return awsutil.Prettify(s)
  6858. }
  6859. // GoString returns the string representation
  6860. func (s Condition) GoString() string {
  6861. return s.String()
  6862. }
  6863. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  6864. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  6865. s.HttpErrorCodeReturnedEquals = &v
  6866. return s
  6867. }
  6868. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  6869. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  6870. s.KeyPrefixEquals = &v
  6871. return s
  6872. }
  6873. type ContinuationEvent struct {
  6874. _ struct{} `locationName:"ContinuationEvent" type:"structure"`
  6875. }
  6876. // String returns the string representation
  6877. func (s ContinuationEvent) String() string {
  6878. return awsutil.Prettify(s)
  6879. }
  6880. // GoString returns the string representation
  6881. func (s ContinuationEvent) GoString() string {
  6882. return s.String()
  6883. }
  6884. // The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
  6885. func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
  6886. // UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
  6887. // This method is only used internally within the SDK's EventStream handling.
  6888. func (s *ContinuationEvent) UnmarshalEvent(
  6889. payloadUnmarshaler protocol.PayloadUnmarshaler,
  6890. msg eventstream.Message,
  6891. ) error {
  6892. return nil
  6893. }
  6894. type CopyObjectInput struct {
  6895. _ struct{} `type:"structure"`
  6896. // The canned ACL to apply to the object.
  6897. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  6898. // Bucket is a required field
  6899. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6900. // Specifies caching behavior along the request/reply chain.
  6901. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  6902. // Specifies presentational information for the object.
  6903. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  6904. // Specifies what content encodings have been applied to the object and thus
  6905. // what decoding mechanisms must be applied to obtain the media-type referenced
  6906. // by the Content-Type header field.
  6907. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  6908. // The language the content is in.
  6909. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  6910. // A standard MIME type describing the format of the object data.
  6911. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  6912. // The name of the source bucket and key name of the source object, separated
  6913. // by a slash (/). Must be URL-encoded.
  6914. //
  6915. // CopySource is a required field
  6916. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  6917. // Copies the object if its entity tag (ETag) matches the specified tag.
  6918. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  6919. // Copies the object if it has been modified since the specified time.
  6920. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  6921. // Copies the object if its entity tag (ETag) is different than the specified
  6922. // ETag.
  6923. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  6924. // Copies the object if it hasn't been modified since the specified time.
  6925. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  6926. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  6927. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  6928. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  6929. // the source object. The encryption key provided in this header must be one
  6930. // that was used when the source object was created.
  6931. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  6932. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6933. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6934. // key was transmitted without error.
  6935. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  6936. // The date and time at which the object is no longer cacheable.
  6937. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  6938. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  6939. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6940. // Allows grantee to read the object data and its metadata.
  6941. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6942. // Allows grantee to read the object ACL.
  6943. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6944. // Allows grantee to write the ACL for the applicable object.
  6945. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6946. // Key is a required field
  6947. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6948. // A map of metadata to store with the object in S3.
  6949. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  6950. // Specifies whether the metadata is copied from the source object or replaced
  6951. // with metadata provided in the request.
  6952. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  6953. // Confirms that the requester knows that she or he will be charged for the
  6954. // request. Bucket owners need not specify this parameter in their requests.
  6955. // Documentation on downloading objects from requester pays buckets can be found
  6956. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6957. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6958. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  6959. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6960. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  6961. // data. This value is used to store the object and then it is discarded; Amazon
  6962. // does not store the encryption key. The key must be appropriate for use with
  6963. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  6964. // header.
  6965. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  6966. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6967. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6968. // key was transmitted without error.
  6969. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6970. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  6971. // requests for an object protected by AWS KMS will fail if not made via SSL
  6972. // or using SigV4. Documentation on configuring any of the officially supported
  6973. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  6974. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6975. // The Server-side encryption algorithm used when storing this object in S3
  6976. // (e.g., AES256, aws:kms).
  6977. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6978. // The type of storage to use for the object. Defaults to 'STANDARD'.
  6979. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  6980. // The tag-set for the object destination object this value must be used in
  6981. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  6982. // Query parameters
  6983. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  6984. // Specifies whether the object tag-set are copied from the source object or
  6985. // replaced with tag-set provided in the request.
  6986. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  6987. // If the bucket is configured as a website, redirects requests for this object
  6988. // to another object in the same bucket or to an external URL. Amazon S3 stores
  6989. // the value of this header in the object metadata.
  6990. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  6991. }
  6992. // String returns the string representation
  6993. func (s CopyObjectInput) String() string {
  6994. return awsutil.Prettify(s)
  6995. }
  6996. // GoString returns the string representation
  6997. func (s CopyObjectInput) GoString() string {
  6998. return s.String()
  6999. }
  7000. // Validate inspects the fields of the type to determine if they are valid.
  7001. func (s *CopyObjectInput) Validate() error {
  7002. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  7003. if s.Bucket == nil {
  7004. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7005. }
  7006. if s.CopySource == nil {
  7007. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  7008. }
  7009. if s.Key == nil {
  7010. invalidParams.Add(request.NewErrParamRequired("Key"))
  7011. }
  7012. if s.Key != nil && len(*s.Key) < 1 {
  7013. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7014. }
  7015. if invalidParams.Len() > 0 {
  7016. return invalidParams
  7017. }
  7018. return nil
  7019. }
  7020. // SetACL sets the ACL field's value.
  7021. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  7022. s.ACL = &v
  7023. return s
  7024. }
  7025. // SetBucket sets the Bucket field's value.
  7026. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  7027. s.Bucket = &v
  7028. return s
  7029. }
  7030. func (s *CopyObjectInput) getBucket() (v string) {
  7031. if s.Bucket == nil {
  7032. return v
  7033. }
  7034. return *s.Bucket
  7035. }
  7036. // SetCacheControl sets the CacheControl field's value.
  7037. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  7038. s.CacheControl = &v
  7039. return s
  7040. }
  7041. // SetContentDisposition sets the ContentDisposition field's value.
  7042. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  7043. s.ContentDisposition = &v
  7044. return s
  7045. }
  7046. // SetContentEncoding sets the ContentEncoding field's value.
  7047. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  7048. s.ContentEncoding = &v
  7049. return s
  7050. }
  7051. // SetContentLanguage sets the ContentLanguage field's value.
  7052. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  7053. s.ContentLanguage = &v
  7054. return s
  7055. }
  7056. // SetContentType sets the ContentType field's value.
  7057. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  7058. s.ContentType = &v
  7059. return s
  7060. }
  7061. // SetCopySource sets the CopySource field's value.
  7062. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  7063. s.CopySource = &v
  7064. return s
  7065. }
  7066. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  7067. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  7068. s.CopySourceIfMatch = &v
  7069. return s
  7070. }
  7071. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  7072. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  7073. s.CopySourceIfModifiedSince = &v
  7074. return s
  7075. }
  7076. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  7077. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  7078. s.CopySourceIfNoneMatch = &v
  7079. return s
  7080. }
  7081. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  7082. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  7083. s.CopySourceIfUnmodifiedSince = &v
  7084. return s
  7085. }
  7086. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  7087. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  7088. s.CopySourceSSECustomerAlgorithm = &v
  7089. return s
  7090. }
  7091. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  7092. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  7093. s.CopySourceSSECustomerKey = &v
  7094. return s
  7095. }
  7096. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  7097. if s.CopySourceSSECustomerKey == nil {
  7098. return v
  7099. }
  7100. return *s.CopySourceSSECustomerKey
  7101. }
  7102. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  7103. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  7104. s.CopySourceSSECustomerKeyMD5 = &v
  7105. return s
  7106. }
  7107. // SetExpires sets the Expires field's value.
  7108. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  7109. s.Expires = &v
  7110. return s
  7111. }
  7112. // SetGrantFullControl sets the GrantFullControl field's value.
  7113. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  7114. s.GrantFullControl = &v
  7115. return s
  7116. }
  7117. // SetGrantRead sets the GrantRead field's value.
  7118. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  7119. s.GrantRead = &v
  7120. return s
  7121. }
  7122. // SetGrantReadACP sets the GrantReadACP field's value.
  7123. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  7124. s.GrantReadACP = &v
  7125. return s
  7126. }
  7127. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7128. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  7129. s.GrantWriteACP = &v
  7130. return s
  7131. }
  7132. // SetKey sets the Key field's value.
  7133. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  7134. s.Key = &v
  7135. return s
  7136. }
  7137. // SetMetadata sets the Metadata field's value.
  7138. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  7139. s.Metadata = v
  7140. return s
  7141. }
  7142. // SetMetadataDirective sets the MetadataDirective field's value.
  7143. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  7144. s.MetadataDirective = &v
  7145. return s
  7146. }
  7147. // SetRequestPayer sets the RequestPayer field's value.
  7148. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  7149. s.RequestPayer = &v
  7150. return s
  7151. }
  7152. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7153. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  7154. s.SSECustomerAlgorithm = &v
  7155. return s
  7156. }
  7157. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7158. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  7159. s.SSECustomerKey = &v
  7160. return s
  7161. }
  7162. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  7163. if s.SSECustomerKey == nil {
  7164. return v
  7165. }
  7166. return *s.SSECustomerKey
  7167. }
  7168. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7169. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  7170. s.SSECustomerKeyMD5 = &v
  7171. return s
  7172. }
  7173. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7174. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  7175. s.SSEKMSKeyId = &v
  7176. return s
  7177. }
  7178. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7179. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  7180. s.ServerSideEncryption = &v
  7181. return s
  7182. }
  7183. // SetStorageClass sets the StorageClass field's value.
  7184. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  7185. s.StorageClass = &v
  7186. return s
  7187. }
  7188. // SetTagging sets the Tagging field's value.
  7189. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  7190. s.Tagging = &v
  7191. return s
  7192. }
  7193. // SetTaggingDirective sets the TaggingDirective field's value.
  7194. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  7195. s.TaggingDirective = &v
  7196. return s
  7197. }
  7198. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7199. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  7200. s.WebsiteRedirectLocation = &v
  7201. return s
  7202. }
  7203. type CopyObjectOutput struct {
  7204. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  7205. CopyObjectResult *CopyObjectResult `type:"structure"`
  7206. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  7207. // If the object expiration is configured, the response includes this header.
  7208. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7209. // If present, indicates that the requester was successfully charged for the
  7210. // request.
  7211. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7212. // If server-side encryption with a customer-provided encryption key was requested,
  7213. // the response will include this header confirming the encryption algorithm
  7214. // used.
  7215. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7216. // If server-side encryption with a customer-provided encryption key was requested,
  7217. // the response will include this header to provide round trip message integrity
  7218. // verification of the customer-provided encryption key.
  7219. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7220. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7221. // encryption key that was used for the object.
  7222. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7223. // The Server-side encryption algorithm used when storing this object in S3
  7224. // (e.g., AES256, aws:kms).
  7225. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7226. // Version ID of the newly created copy.
  7227. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7228. }
  7229. // String returns the string representation
  7230. func (s CopyObjectOutput) String() string {
  7231. return awsutil.Prettify(s)
  7232. }
  7233. // GoString returns the string representation
  7234. func (s CopyObjectOutput) GoString() string {
  7235. return s.String()
  7236. }
  7237. // SetCopyObjectResult sets the CopyObjectResult field's value.
  7238. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  7239. s.CopyObjectResult = v
  7240. return s
  7241. }
  7242. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  7243. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  7244. s.CopySourceVersionId = &v
  7245. return s
  7246. }
  7247. // SetExpiration sets the Expiration field's value.
  7248. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  7249. s.Expiration = &v
  7250. return s
  7251. }
  7252. // SetRequestCharged sets the RequestCharged field's value.
  7253. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  7254. s.RequestCharged = &v
  7255. return s
  7256. }
  7257. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7258. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  7259. s.SSECustomerAlgorithm = &v
  7260. return s
  7261. }
  7262. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7263. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  7264. s.SSECustomerKeyMD5 = &v
  7265. return s
  7266. }
  7267. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7268. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  7269. s.SSEKMSKeyId = &v
  7270. return s
  7271. }
  7272. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7273. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  7274. s.ServerSideEncryption = &v
  7275. return s
  7276. }
  7277. // SetVersionId sets the VersionId field's value.
  7278. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  7279. s.VersionId = &v
  7280. return s
  7281. }
  7282. type CopyObjectResult struct {
  7283. _ struct{} `type:"structure"`
  7284. ETag *string `type:"string"`
  7285. LastModified *time.Time `type:"timestamp"`
  7286. }
  7287. // String returns the string representation
  7288. func (s CopyObjectResult) String() string {
  7289. return awsutil.Prettify(s)
  7290. }
  7291. // GoString returns the string representation
  7292. func (s CopyObjectResult) GoString() string {
  7293. return s.String()
  7294. }
  7295. // SetETag sets the ETag field's value.
  7296. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  7297. s.ETag = &v
  7298. return s
  7299. }
  7300. // SetLastModified sets the LastModified field's value.
  7301. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  7302. s.LastModified = &v
  7303. return s
  7304. }
  7305. type CopyPartResult struct {
  7306. _ struct{} `type:"structure"`
  7307. // Entity tag of the object.
  7308. ETag *string `type:"string"`
  7309. // Date and time at which the object was uploaded.
  7310. LastModified *time.Time `type:"timestamp"`
  7311. }
  7312. // String returns the string representation
  7313. func (s CopyPartResult) String() string {
  7314. return awsutil.Prettify(s)
  7315. }
  7316. // GoString returns the string representation
  7317. func (s CopyPartResult) GoString() string {
  7318. return s.String()
  7319. }
  7320. // SetETag sets the ETag field's value.
  7321. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  7322. s.ETag = &v
  7323. return s
  7324. }
  7325. // SetLastModified sets the LastModified field's value.
  7326. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  7327. s.LastModified = &v
  7328. return s
  7329. }
  7330. type CreateBucketConfiguration struct {
  7331. _ struct{} `type:"structure"`
  7332. // Specifies the region where the bucket will be created. If you don't specify
  7333. // a region, the bucket will be created in US Standard.
  7334. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  7335. }
  7336. // String returns the string representation
  7337. func (s CreateBucketConfiguration) String() string {
  7338. return awsutil.Prettify(s)
  7339. }
  7340. // GoString returns the string representation
  7341. func (s CreateBucketConfiguration) GoString() string {
  7342. return s.String()
  7343. }
  7344. // SetLocationConstraint sets the LocationConstraint field's value.
  7345. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  7346. s.LocationConstraint = &v
  7347. return s
  7348. }
  7349. type CreateBucketInput struct {
  7350. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  7351. // The canned ACL to apply to the bucket.
  7352. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  7353. // Bucket is a required field
  7354. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7355. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  7356. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  7357. // bucket.
  7358. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7359. // Allows grantee to list the objects in the bucket.
  7360. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7361. // Allows grantee to read the bucket ACL.
  7362. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7363. // Allows grantee to create, overwrite, and delete any object in the bucket.
  7364. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  7365. // Allows grantee to write the ACL for the applicable bucket.
  7366. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7367. }
  7368. // String returns the string representation
  7369. func (s CreateBucketInput) String() string {
  7370. return awsutil.Prettify(s)
  7371. }
  7372. // GoString returns the string representation
  7373. func (s CreateBucketInput) GoString() string {
  7374. return s.String()
  7375. }
  7376. // Validate inspects the fields of the type to determine if they are valid.
  7377. func (s *CreateBucketInput) Validate() error {
  7378. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  7379. if s.Bucket == nil {
  7380. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7381. }
  7382. if invalidParams.Len() > 0 {
  7383. return invalidParams
  7384. }
  7385. return nil
  7386. }
  7387. // SetACL sets the ACL field's value.
  7388. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  7389. s.ACL = &v
  7390. return s
  7391. }
  7392. // SetBucket sets the Bucket field's value.
  7393. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  7394. s.Bucket = &v
  7395. return s
  7396. }
  7397. func (s *CreateBucketInput) getBucket() (v string) {
  7398. if s.Bucket == nil {
  7399. return v
  7400. }
  7401. return *s.Bucket
  7402. }
  7403. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  7404. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  7405. s.CreateBucketConfiguration = v
  7406. return s
  7407. }
  7408. // SetGrantFullControl sets the GrantFullControl field's value.
  7409. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  7410. s.GrantFullControl = &v
  7411. return s
  7412. }
  7413. // SetGrantRead sets the GrantRead field's value.
  7414. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  7415. s.GrantRead = &v
  7416. return s
  7417. }
  7418. // SetGrantReadACP sets the GrantReadACP field's value.
  7419. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  7420. s.GrantReadACP = &v
  7421. return s
  7422. }
  7423. // SetGrantWrite sets the GrantWrite field's value.
  7424. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  7425. s.GrantWrite = &v
  7426. return s
  7427. }
  7428. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7429. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  7430. s.GrantWriteACP = &v
  7431. return s
  7432. }
  7433. type CreateBucketOutput struct {
  7434. _ struct{} `type:"structure"`
  7435. Location *string `location:"header" locationName:"Location" type:"string"`
  7436. }
  7437. // String returns the string representation
  7438. func (s CreateBucketOutput) String() string {
  7439. return awsutil.Prettify(s)
  7440. }
  7441. // GoString returns the string representation
  7442. func (s CreateBucketOutput) GoString() string {
  7443. return s.String()
  7444. }
  7445. // SetLocation sets the Location field's value.
  7446. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  7447. s.Location = &v
  7448. return s
  7449. }
  7450. type CreateMultipartUploadInput struct {
  7451. _ struct{} `type:"structure"`
  7452. // The canned ACL to apply to the object.
  7453. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7454. // Bucket is a required field
  7455. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7456. // Specifies caching behavior along the request/reply chain.
  7457. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7458. // Specifies presentational information for the object.
  7459. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7460. // Specifies what content encodings have been applied to the object and thus
  7461. // what decoding mechanisms must be applied to obtain the media-type referenced
  7462. // by the Content-Type header field.
  7463. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7464. // The language the content is in.
  7465. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7466. // A standard MIME type describing the format of the object data.
  7467. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7468. // The date and time at which the object is no longer cacheable.
  7469. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  7470. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7471. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7472. // Allows grantee to read the object data and its metadata.
  7473. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7474. // Allows grantee to read the object ACL.
  7475. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7476. // Allows grantee to write the ACL for the applicable object.
  7477. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7478. // Key is a required field
  7479. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7480. // A map of metadata to store with the object in S3.
  7481. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7482. // Confirms that the requester knows that she or he will be charged for the
  7483. // request. Bucket owners need not specify this parameter in their requests.
  7484. // Documentation on downloading objects from requester pays buckets can be found
  7485. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7486. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7487. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7488. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7489. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7490. // data. This value is used to store the object and then it is discarded; Amazon
  7491. // does not store the encryption key. The key must be appropriate for use with
  7492. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7493. // header.
  7494. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7495. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7496. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7497. // key was transmitted without error.
  7498. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7499. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7500. // requests for an object protected by AWS KMS will fail if not made via SSL
  7501. // or using SigV4. Documentation on configuring any of the officially supported
  7502. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7503. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7504. // The Server-side encryption algorithm used when storing this object in S3
  7505. // (e.g., AES256, aws:kms).
  7506. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7507. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7508. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7509. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  7510. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7511. // If the bucket is configured as a website, redirects requests for this object
  7512. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7513. // the value of this header in the object metadata.
  7514. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7515. }
  7516. // String returns the string representation
  7517. func (s CreateMultipartUploadInput) String() string {
  7518. return awsutil.Prettify(s)
  7519. }
  7520. // GoString returns the string representation
  7521. func (s CreateMultipartUploadInput) GoString() string {
  7522. return s.String()
  7523. }
  7524. // Validate inspects the fields of the type to determine if they are valid.
  7525. func (s *CreateMultipartUploadInput) Validate() error {
  7526. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  7527. if s.Bucket == nil {
  7528. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7529. }
  7530. if s.Key == nil {
  7531. invalidParams.Add(request.NewErrParamRequired("Key"))
  7532. }
  7533. if s.Key != nil && len(*s.Key) < 1 {
  7534. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7535. }
  7536. if invalidParams.Len() > 0 {
  7537. return invalidParams
  7538. }
  7539. return nil
  7540. }
  7541. // SetACL sets the ACL field's value.
  7542. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  7543. s.ACL = &v
  7544. return s
  7545. }
  7546. // SetBucket sets the Bucket field's value.
  7547. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  7548. s.Bucket = &v
  7549. return s
  7550. }
  7551. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  7552. if s.Bucket == nil {
  7553. return v
  7554. }
  7555. return *s.Bucket
  7556. }
  7557. // SetCacheControl sets the CacheControl field's value.
  7558. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  7559. s.CacheControl = &v
  7560. return s
  7561. }
  7562. // SetContentDisposition sets the ContentDisposition field's value.
  7563. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  7564. s.ContentDisposition = &v
  7565. return s
  7566. }
  7567. // SetContentEncoding sets the ContentEncoding field's value.
  7568. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  7569. s.ContentEncoding = &v
  7570. return s
  7571. }
  7572. // SetContentLanguage sets the ContentLanguage field's value.
  7573. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  7574. s.ContentLanguage = &v
  7575. return s
  7576. }
  7577. // SetContentType sets the ContentType field's value.
  7578. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  7579. s.ContentType = &v
  7580. return s
  7581. }
  7582. // SetExpires sets the Expires field's value.
  7583. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  7584. s.Expires = &v
  7585. return s
  7586. }
  7587. // SetGrantFullControl sets the GrantFullControl field's value.
  7588. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  7589. s.GrantFullControl = &v
  7590. return s
  7591. }
  7592. // SetGrantRead sets the GrantRead field's value.
  7593. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  7594. s.GrantRead = &v
  7595. return s
  7596. }
  7597. // SetGrantReadACP sets the GrantReadACP field's value.
  7598. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  7599. s.GrantReadACP = &v
  7600. return s
  7601. }
  7602. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7603. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  7604. s.GrantWriteACP = &v
  7605. return s
  7606. }
  7607. // SetKey sets the Key field's value.
  7608. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  7609. s.Key = &v
  7610. return s
  7611. }
  7612. // SetMetadata sets the Metadata field's value.
  7613. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  7614. s.Metadata = v
  7615. return s
  7616. }
  7617. // SetRequestPayer sets the RequestPayer field's value.
  7618. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  7619. s.RequestPayer = &v
  7620. return s
  7621. }
  7622. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7623. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  7624. s.SSECustomerAlgorithm = &v
  7625. return s
  7626. }
  7627. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7628. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  7629. s.SSECustomerKey = &v
  7630. return s
  7631. }
  7632. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  7633. if s.SSECustomerKey == nil {
  7634. return v
  7635. }
  7636. return *s.SSECustomerKey
  7637. }
  7638. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7639. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  7640. s.SSECustomerKeyMD5 = &v
  7641. return s
  7642. }
  7643. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7644. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  7645. s.SSEKMSKeyId = &v
  7646. return s
  7647. }
  7648. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7649. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  7650. s.ServerSideEncryption = &v
  7651. return s
  7652. }
  7653. // SetStorageClass sets the StorageClass field's value.
  7654. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  7655. s.StorageClass = &v
  7656. return s
  7657. }
  7658. // SetTagging sets the Tagging field's value.
  7659. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  7660. s.Tagging = &v
  7661. return s
  7662. }
  7663. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7664. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  7665. s.WebsiteRedirectLocation = &v
  7666. return s
  7667. }
  7668. type CreateMultipartUploadOutput struct {
  7669. _ struct{} `type:"structure"`
  7670. // Date when multipart upload will become eligible for abort operation by lifecycle.
  7671. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  7672. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  7673. // operation.
  7674. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  7675. // Name of the bucket to which the multipart upload was initiated.
  7676. Bucket *string `locationName:"Bucket" type:"string"`
  7677. // Object key for which the multipart upload was initiated.
  7678. Key *string `min:"1" type:"string"`
  7679. // If present, indicates that the requester was successfully charged for the
  7680. // request.
  7681. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7682. // If server-side encryption with a customer-provided encryption key was requested,
  7683. // the response will include this header confirming the encryption algorithm
  7684. // used.
  7685. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7686. // If server-side encryption with a customer-provided encryption key was requested,
  7687. // the response will include this header to provide round trip message integrity
  7688. // verification of the customer-provided encryption key.
  7689. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7690. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7691. // encryption key that was used for the object.
  7692. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7693. // The Server-side encryption algorithm used when storing this object in S3
  7694. // (e.g., AES256, aws:kms).
  7695. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7696. // ID for the initiated multipart upload.
  7697. UploadId *string `type:"string"`
  7698. }
  7699. // String returns the string representation
  7700. func (s CreateMultipartUploadOutput) String() string {
  7701. return awsutil.Prettify(s)
  7702. }
  7703. // GoString returns the string representation
  7704. func (s CreateMultipartUploadOutput) GoString() string {
  7705. return s.String()
  7706. }
  7707. // SetAbortDate sets the AbortDate field's value.
  7708. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  7709. s.AbortDate = &v
  7710. return s
  7711. }
  7712. // SetAbortRuleId sets the AbortRuleId field's value.
  7713. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  7714. s.AbortRuleId = &v
  7715. return s
  7716. }
  7717. // SetBucket sets the Bucket field's value.
  7718. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  7719. s.Bucket = &v
  7720. return s
  7721. }
  7722. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  7723. if s.Bucket == nil {
  7724. return v
  7725. }
  7726. return *s.Bucket
  7727. }
  7728. // SetKey sets the Key field's value.
  7729. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  7730. s.Key = &v
  7731. return s
  7732. }
  7733. // SetRequestCharged sets the RequestCharged field's value.
  7734. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  7735. s.RequestCharged = &v
  7736. return s
  7737. }
  7738. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7739. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  7740. s.SSECustomerAlgorithm = &v
  7741. return s
  7742. }
  7743. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7744. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  7745. s.SSECustomerKeyMD5 = &v
  7746. return s
  7747. }
  7748. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7749. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  7750. s.SSEKMSKeyId = &v
  7751. return s
  7752. }
  7753. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7754. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  7755. s.ServerSideEncryption = &v
  7756. return s
  7757. }
  7758. // SetUploadId sets the UploadId field's value.
  7759. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  7760. s.UploadId = &v
  7761. return s
  7762. }
  7763. type Delete struct {
  7764. _ struct{} `type:"structure"`
  7765. // Objects is a required field
  7766. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  7767. // Element to enable quiet mode for the request. When you add this element,
  7768. // you must set its value to true.
  7769. Quiet *bool `type:"boolean"`
  7770. }
  7771. // String returns the string representation
  7772. func (s Delete) String() string {
  7773. return awsutil.Prettify(s)
  7774. }
  7775. // GoString returns the string representation
  7776. func (s Delete) GoString() string {
  7777. return s.String()
  7778. }
  7779. // Validate inspects the fields of the type to determine if they are valid.
  7780. func (s *Delete) Validate() error {
  7781. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  7782. if s.Objects == nil {
  7783. invalidParams.Add(request.NewErrParamRequired("Objects"))
  7784. }
  7785. if s.Objects != nil {
  7786. for i, v := range s.Objects {
  7787. if v == nil {
  7788. continue
  7789. }
  7790. if err := v.Validate(); err != nil {
  7791. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  7792. }
  7793. }
  7794. }
  7795. if invalidParams.Len() > 0 {
  7796. return invalidParams
  7797. }
  7798. return nil
  7799. }
  7800. // SetObjects sets the Objects field's value.
  7801. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  7802. s.Objects = v
  7803. return s
  7804. }
  7805. // SetQuiet sets the Quiet field's value.
  7806. func (s *Delete) SetQuiet(v bool) *Delete {
  7807. s.Quiet = &v
  7808. return s
  7809. }
  7810. type DeleteBucketAnalyticsConfigurationInput struct {
  7811. _ struct{} `type:"structure"`
  7812. // The name of the bucket from which an analytics configuration is deleted.
  7813. //
  7814. // Bucket is a required field
  7815. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7816. // The identifier used to represent an analytics configuration.
  7817. //
  7818. // Id is a required field
  7819. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7820. }
  7821. // String returns the string representation
  7822. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  7823. return awsutil.Prettify(s)
  7824. }
  7825. // GoString returns the string representation
  7826. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  7827. return s.String()
  7828. }
  7829. // Validate inspects the fields of the type to determine if they are valid.
  7830. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  7831. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  7832. if s.Bucket == nil {
  7833. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7834. }
  7835. if s.Id == nil {
  7836. invalidParams.Add(request.NewErrParamRequired("Id"))
  7837. }
  7838. if invalidParams.Len() > 0 {
  7839. return invalidParams
  7840. }
  7841. return nil
  7842. }
  7843. // SetBucket sets the Bucket field's value.
  7844. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  7845. s.Bucket = &v
  7846. return s
  7847. }
  7848. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  7849. if s.Bucket == nil {
  7850. return v
  7851. }
  7852. return *s.Bucket
  7853. }
  7854. // SetId sets the Id field's value.
  7855. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  7856. s.Id = &v
  7857. return s
  7858. }
  7859. type DeleteBucketAnalyticsConfigurationOutput struct {
  7860. _ struct{} `type:"structure"`
  7861. }
  7862. // String returns the string representation
  7863. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  7864. return awsutil.Prettify(s)
  7865. }
  7866. // GoString returns the string representation
  7867. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  7868. return s.String()
  7869. }
  7870. type DeleteBucketCorsInput struct {
  7871. _ struct{} `type:"structure"`
  7872. // Bucket is a required field
  7873. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7874. }
  7875. // String returns the string representation
  7876. func (s DeleteBucketCorsInput) String() string {
  7877. return awsutil.Prettify(s)
  7878. }
  7879. // GoString returns the string representation
  7880. func (s DeleteBucketCorsInput) GoString() string {
  7881. return s.String()
  7882. }
  7883. // Validate inspects the fields of the type to determine if they are valid.
  7884. func (s *DeleteBucketCorsInput) Validate() error {
  7885. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  7886. if s.Bucket == nil {
  7887. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7888. }
  7889. if invalidParams.Len() > 0 {
  7890. return invalidParams
  7891. }
  7892. return nil
  7893. }
  7894. // SetBucket sets the Bucket field's value.
  7895. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  7896. s.Bucket = &v
  7897. return s
  7898. }
  7899. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  7900. if s.Bucket == nil {
  7901. return v
  7902. }
  7903. return *s.Bucket
  7904. }
  7905. type DeleteBucketCorsOutput struct {
  7906. _ struct{} `type:"structure"`
  7907. }
  7908. // String returns the string representation
  7909. func (s DeleteBucketCorsOutput) String() string {
  7910. return awsutil.Prettify(s)
  7911. }
  7912. // GoString returns the string representation
  7913. func (s DeleteBucketCorsOutput) GoString() string {
  7914. return s.String()
  7915. }
  7916. type DeleteBucketEncryptionInput struct {
  7917. _ struct{} `type:"structure"`
  7918. // The name of the bucket containing the server-side encryption configuration
  7919. // to delete.
  7920. //
  7921. // Bucket is a required field
  7922. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7923. }
  7924. // String returns the string representation
  7925. func (s DeleteBucketEncryptionInput) String() string {
  7926. return awsutil.Prettify(s)
  7927. }
  7928. // GoString returns the string representation
  7929. func (s DeleteBucketEncryptionInput) GoString() string {
  7930. return s.String()
  7931. }
  7932. // Validate inspects the fields of the type to determine if they are valid.
  7933. func (s *DeleteBucketEncryptionInput) Validate() error {
  7934. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  7935. if s.Bucket == nil {
  7936. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7937. }
  7938. if invalidParams.Len() > 0 {
  7939. return invalidParams
  7940. }
  7941. return nil
  7942. }
  7943. // SetBucket sets the Bucket field's value.
  7944. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  7945. s.Bucket = &v
  7946. return s
  7947. }
  7948. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  7949. if s.Bucket == nil {
  7950. return v
  7951. }
  7952. return *s.Bucket
  7953. }
  7954. type DeleteBucketEncryptionOutput struct {
  7955. _ struct{} `type:"structure"`
  7956. }
  7957. // String returns the string representation
  7958. func (s DeleteBucketEncryptionOutput) String() string {
  7959. return awsutil.Prettify(s)
  7960. }
  7961. // GoString returns the string representation
  7962. func (s DeleteBucketEncryptionOutput) GoString() string {
  7963. return s.String()
  7964. }
  7965. type DeleteBucketInput struct {
  7966. _ struct{} `type:"structure"`
  7967. // Bucket is a required field
  7968. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7969. }
  7970. // String returns the string representation
  7971. func (s DeleteBucketInput) String() string {
  7972. return awsutil.Prettify(s)
  7973. }
  7974. // GoString returns the string representation
  7975. func (s DeleteBucketInput) GoString() string {
  7976. return s.String()
  7977. }
  7978. // Validate inspects the fields of the type to determine if they are valid.
  7979. func (s *DeleteBucketInput) Validate() error {
  7980. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  7981. if s.Bucket == nil {
  7982. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7983. }
  7984. if invalidParams.Len() > 0 {
  7985. return invalidParams
  7986. }
  7987. return nil
  7988. }
  7989. // SetBucket sets the Bucket field's value.
  7990. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  7991. s.Bucket = &v
  7992. return s
  7993. }
  7994. func (s *DeleteBucketInput) getBucket() (v string) {
  7995. if s.Bucket == nil {
  7996. return v
  7997. }
  7998. return *s.Bucket
  7999. }
  8000. type DeleteBucketInventoryConfigurationInput struct {
  8001. _ struct{} `type:"structure"`
  8002. // The name of the bucket containing the inventory configuration to delete.
  8003. //
  8004. // Bucket is a required field
  8005. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8006. // The ID used to identify the inventory configuration.
  8007. //
  8008. // Id is a required field
  8009. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8010. }
  8011. // String returns the string representation
  8012. func (s DeleteBucketInventoryConfigurationInput) String() string {
  8013. return awsutil.Prettify(s)
  8014. }
  8015. // GoString returns the string representation
  8016. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  8017. return s.String()
  8018. }
  8019. // Validate inspects the fields of the type to determine if they are valid.
  8020. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  8021. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  8022. if s.Bucket == nil {
  8023. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8024. }
  8025. if s.Id == nil {
  8026. invalidParams.Add(request.NewErrParamRequired("Id"))
  8027. }
  8028. if invalidParams.Len() > 0 {
  8029. return invalidParams
  8030. }
  8031. return nil
  8032. }
  8033. // SetBucket sets the Bucket field's value.
  8034. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  8035. s.Bucket = &v
  8036. return s
  8037. }
  8038. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  8039. if s.Bucket == nil {
  8040. return v
  8041. }
  8042. return *s.Bucket
  8043. }
  8044. // SetId sets the Id field's value.
  8045. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  8046. s.Id = &v
  8047. return s
  8048. }
  8049. type DeleteBucketInventoryConfigurationOutput struct {
  8050. _ struct{} `type:"structure"`
  8051. }
  8052. // String returns the string representation
  8053. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  8054. return awsutil.Prettify(s)
  8055. }
  8056. // GoString returns the string representation
  8057. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  8058. return s.String()
  8059. }
  8060. type DeleteBucketLifecycleInput struct {
  8061. _ struct{} `type:"structure"`
  8062. // Bucket is a required field
  8063. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8064. }
  8065. // String returns the string representation
  8066. func (s DeleteBucketLifecycleInput) String() string {
  8067. return awsutil.Prettify(s)
  8068. }
  8069. // GoString returns the string representation
  8070. func (s DeleteBucketLifecycleInput) GoString() string {
  8071. return s.String()
  8072. }
  8073. // Validate inspects the fields of the type to determine if they are valid.
  8074. func (s *DeleteBucketLifecycleInput) Validate() error {
  8075. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  8076. if s.Bucket == nil {
  8077. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8078. }
  8079. if invalidParams.Len() > 0 {
  8080. return invalidParams
  8081. }
  8082. return nil
  8083. }
  8084. // SetBucket sets the Bucket field's value.
  8085. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  8086. s.Bucket = &v
  8087. return s
  8088. }
  8089. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  8090. if s.Bucket == nil {
  8091. return v
  8092. }
  8093. return *s.Bucket
  8094. }
  8095. type DeleteBucketLifecycleOutput struct {
  8096. _ struct{} `type:"structure"`
  8097. }
  8098. // String returns the string representation
  8099. func (s DeleteBucketLifecycleOutput) String() string {
  8100. return awsutil.Prettify(s)
  8101. }
  8102. // GoString returns the string representation
  8103. func (s DeleteBucketLifecycleOutput) GoString() string {
  8104. return s.String()
  8105. }
  8106. type DeleteBucketMetricsConfigurationInput struct {
  8107. _ struct{} `type:"structure"`
  8108. // The name of the bucket containing the metrics configuration to delete.
  8109. //
  8110. // Bucket is a required field
  8111. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8112. // The ID used to identify the metrics configuration.
  8113. //
  8114. // Id is a required field
  8115. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8116. }
  8117. // String returns the string representation
  8118. func (s DeleteBucketMetricsConfigurationInput) String() string {
  8119. return awsutil.Prettify(s)
  8120. }
  8121. // GoString returns the string representation
  8122. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  8123. return s.String()
  8124. }
  8125. // Validate inspects the fields of the type to determine if they are valid.
  8126. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  8127. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  8128. if s.Bucket == nil {
  8129. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8130. }
  8131. if s.Id == nil {
  8132. invalidParams.Add(request.NewErrParamRequired("Id"))
  8133. }
  8134. if invalidParams.Len() > 0 {
  8135. return invalidParams
  8136. }
  8137. return nil
  8138. }
  8139. // SetBucket sets the Bucket field's value.
  8140. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  8141. s.Bucket = &v
  8142. return s
  8143. }
  8144. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  8145. if s.Bucket == nil {
  8146. return v
  8147. }
  8148. return *s.Bucket
  8149. }
  8150. // SetId sets the Id field's value.
  8151. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  8152. s.Id = &v
  8153. return s
  8154. }
  8155. type DeleteBucketMetricsConfigurationOutput struct {
  8156. _ struct{} `type:"structure"`
  8157. }
  8158. // String returns the string representation
  8159. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  8160. return awsutil.Prettify(s)
  8161. }
  8162. // GoString returns the string representation
  8163. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  8164. return s.String()
  8165. }
  8166. type DeleteBucketOutput struct {
  8167. _ struct{} `type:"structure"`
  8168. }
  8169. // String returns the string representation
  8170. func (s DeleteBucketOutput) String() string {
  8171. return awsutil.Prettify(s)
  8172. }
  8173. // GoString returns the string representation
  8174. func (s DeleteBucketOutput) GoString() string {
  8175. return s.String()
  8176. }
  8177. type DeleteBucketPolicyInput struct {
  8178. _ struct{} `type:"structure"`
  8179. // Bucket is a required field
  8180. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8181. }
  8182. // String returns the string representation
  8183. func (s DeleteBucketPolicyInput) String() string {
  8184. return awsutil.Prettify(s)
  8185. }
  8186. // GoString returns the string representation
  8187. func (s DeleteBucketPolicyInput) GoString() string {
  8188. return s.String()
  8189. }
  8190. // Validate inspects the fields of the type to determine if they are valid.
  8191. func (s *DeleteBucketPolicyInput) Validate() error {
  8192. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  8193. if s.Bucket == nil {
  8194. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8195. }
  8196. if invalidParams.Len() > 0 {
  8197. return invalidParams
  8198. }
  8199. return nil
  8200. }
  8201. // SetBucket sets the Bucket field's value.
  8202. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  8203. s.Bucket = &v
  8204. return s
  8205. }
  8206. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  8207. if s.Bucket == nil {
  8208. return v
  8209. }
  8210. return *s.Bucket
  8211. }
  8212. type DeleteBucketPolicyOutput struct {
  8213. _ struct{} `type:"structure"`
  8214. }
  8215. // String returns the string representation
  8216. func (s DeleteBucketPolicyOutput) String() string {
  8217. return awsutil.Prettify(s)
  8218. }
  8219. // GoString returns the string representation
  8220. func (s DeleteBucketPolicyOutput) GoString() string {
  8221. return s.String()
  8222. }
  8223. type DeleteBucketReplicationInput struct {
  8224. _ struct{} `type:"structure"`
  8225. // Deletes the replication subresource associated with the specified bucket.
  8226. //
  8227. // There is usually some time lag before replication configuration deletion
  8228. // is fully propagated to all the Amazon S3 systems.
  8229. //
  8230. // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  8231. // in the Amazon S3 Developer Guide.
  8232. //
  8233. // Bucket is a required field
  8234. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8235. }
  8236. // String returns the string representation
  8237. func (s DeleteBucketReplicationInput) String() string {
  8238. return awsutil.Prettify(s)
  8239. }
  8240. // GoString returns the string representation
  8241. func (s DeleteBucketReplicationInput) GoString() string {
  8242. return s.String()
  8243. }
  8244. // Validate inspects the fields of the type to determine if they are valid.
  8245. func (s *DeleteBucketReplicationInput) Validate() error {
  8246. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  8247. if s.Bucket == nil {
  8248. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8249. }
  8250. if invalidParams.Len() > 0 {
  8251. return invalidParams
  8252. }
  8253. return nil
  8254. }
  8255. // SetBucket sets the Bucket field's value.
  8256. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  8257. s.Bucket = &v
  8258. return s
  8259. }
  8260. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  8261. if s.Bucket == nil {
  8262. return v
  8263. }
  8264. return *s.Bucket
  8265. }
  8266. type DeleteBucketReplicationOutput struct {
  8267. _ struct{} `type:"structure"`
  8268. }
  8269. // String returns the string representation
  8270. func (s DeleteBucketReplicationOutput) String() string {
  8271. return awsutil.Prettify(s)
  8272. }
  8273. // GoString returns the string representation
  8274. func (s DeleteBucketReplicationOutput) GoString() string {
  8275. return s.String()
  8276. }
  8277. type DeleteBucketTaggingInput struct {
  8278. _ struct{} `type:"structure"`
  8279. // Bucket is a required field
  8280. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8281. }
  8282. // String returns the string representation
  8283. func (s DeleteBucketTaggingInput) String() string {
  8284. return awsutil.Prettify(s)
  8285. }
  8286. // GoString returns the string representation
  8287. func (s DeleteBucketTaggingInput) GoString() string {
  8288. return s.String()
  8289. }
  8290. // Validate inspects the fields of the type to determine if they are valid.
  8291. func (s *DeleteBucketTaggingInput) Validate() error {
  8292. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  8293. if s.Bucket == nil {
  8294. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8295. }
  8296. if invalidParams.Len() > 0 {
  8297. return invalidParams
  8298. }
  8299. return nil
  8300. }
  8301. // SetBucket sets the Bucket field's value.
  8302. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  8303. s.Bucket = &v
  8304. return s
  8305. }
  8306. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  8307. if s.Bucket == nil {
  8308. return v
  8309. }
  8310. return *s.Bucket
  8311. }
  8312. type DeleteBucketTaggingOutput struct {
  8313. _ struct{} `type:"structure"`
  8314. }
  8315. // String returns the string representation
  8316. func (s DeleteBucketTaggingOutput) String() string {
  8317. return awsutil.Prettify(s)
  8318. }
  8319. // GoString returns the string representation
  8320. func (s DeleteBucketTaggingOutput) GoString() string {
  8321. return s.String()
  8322. }
  8323. type DeleteBucketWebsiteInput struct {
  8324. _ struct{} `type:"structure"`
  8325. // Bucket is a required field
  8326. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8327. }
  8328. // String returns the string representation
  8329. func (s DeleteBucketWebsiteInput) String() string {
  8330. return awsutil.Prettify(s)
  8331. }
  8332. // GoString returns the string representation
  8333. func (s DeleteBucketWebsiteInput) GoString() string {
  8334. return s.String()
  8335. }
  8336. // Validate inspects the fields of the type to determine if they are valid.
  8337. func (s *DeleteBucketWebsiteInput) Validate() error {
  8338. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  8339. if s.Bucket == nil {
  8340. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8341. }
  8342. if invalidParams.Len() > 0 {
  8343. return invalidParams
  8344. }
  8345. return nil
  8346. }
  8347. // SetBucket sets the Bucket field's value.
  8348. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  8349. s.Bucket = &v
  8350. return s
  8351. }
  8352. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  8353. if s.Bucket == nil {
  8354. return v
  8355. }
  8356. return *s.Bucket
  8357. }
  8358. type DeleteBucketWebsiteOutput struct {
  8359. _ struct{} `type:"structure"`
  8360. }
  8361. // String returns the string representation
  8362. func (s DeleteBucketWebsiteOutput) String() string {
  8363. return awsutil.Prettify(s)
  8364. }
  8365. // GoString returns the string representation
  8366. func (s DeleteBucketWebsiteOutput) GoString() string {
  8367. return s.String()
  8368. }
  8369. type DeleteMarkerEntry struct {
  8370. _ struct{} `type:"structure"`
  8371. // Specifies whether the object is (true) or is not (false) the latest version
  8372. // of an object.
  8373. IsLatest *bool `type:"boolean"`
  8374. // The object key.
  8375. Key *string `min:"1" type:"string"`
  8376. // Date and time the object was last modified.
  8377. LastModified *time.Time `type:"timestamp"`
  8378. Owner *Owner `type:"structure"`
  8379. // Version ID of an object.
  8380. VersionId *string `type:"string"`
  8381. }
  8382. // String returns the string representation
  8383. func (s DeleteMarkerEntry) String() string {
  8384. return awsutil.Prettify(s)
  8385. }
  8386. // GoString returns the string representation
  8387. func (s DeleteMarkerEntry) GoString() string {
  8388. return s.String()
  8389. }
  8390. // SetIsLatest sets the IsLatest field's value.
  8391. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  8392. s.IsLatest = &v
  8393. return s
  8394. }
  8395. // SetKey sets the Key field's value.
  8396. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  8397. s.Key = &v
  8398. return s
  8399. }
  8400. // SetLastModified sets the LastModified field's value.
  8401. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  8402. s.LastModified = &v
  8403. return s
  8404. }
  8405. // SetOwner sets the Owner field's value.
  8406. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  8407. s.Owner = v
  8408. return s
  8409. }
  8410. // SetVersionId sets the VersionId field's value.
  8411. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  8412. s.VersionId = &v
  8413. return s
  8414. }
  8415. // Specifies whether Amazon S3 should replicate delete makers.
  8416. type DeleteMarkerReplication struct {
  8417. _ struct{} `type:"structure"`
  8418. // The status of the delete marker replication.
  8419. //
  8420. // In the current implementation, Amazon S3 does not replicate the delete markers.
  8421. // Therefore, the status must be Disabled.
  8422. Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
  8423. }
  8424. // String returns the string representation
  8425. func (s DeleteMarkerReplication) String() string {
  8426. return awsutil.Prettify(s)
  8427. }
  8428. // GoString returns the string representation
  8429. func (s DeleteMarkerReplication) GoString() string {
  8430. return s.String()
  8431. }
  8432. // SetStatus sets the Status field's value.
  8433. func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
  8434. s.Status = &v
  8435. return s
  8436. }
  8437. type DeleteObjectInput struct {
  8438. _ struct{} `type:"structure"`
  8439. // Bucket is a required field
  8440. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8441. // Key is a required field
  8442. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8443. // The concatenation of the authentication device's serial number, a space,
  8444. // and the value that is displayed on your authentication device.
  8445. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8446. // Confirms that the requester knows that she or he will be charged for the
  8447. // request. Bucket owners need not specify this parameter in their requests.
  8448. // Documentation on downloading objects from requester pays buckets can be found
  8449. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8450. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8451. // VersionId used to reference a specific version of the object.
  8452. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8453. }
  8454. // String returns the string representation
  8455. func (s DeleteObjectInput) String() string {
  8456. return awsutil.Prettify(s)
  8457. }
  8458. // GoString returns the string representation
  8459. func (s DeleteObjectInput) GoString() string {
  8460. return s.String()
  8461. }
  8462. // Validate inspects the fields of the type to determine if they are valid.
  8463. func (s *DeleteObjectInput) Validate() error {
  8464. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  8465. if s.Bucket == nil {
  8466. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8467. }
  8468. if s.Key == nil {
  8469. invalidParams.Add(request.NewErrParamRequired("Key"))
  8470. }
  8471. if s.Key != nil && len(*s.Key) < 1 {
  8472. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8473. }
  8474. if invalidParams.Len() > 0 {
  8475. return invalidParams
  8476. }
  8477. return nil
  8478. }
  8479. // SetBucket sets the Bucket field's value.
  8480. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  8481. s.Bucket = &v
  8482. return s
  8483. }
  8484. func (s *DeleteObjectInput) getBucket() (v string) {
  8485. if s.Bucket == nil {
  8486. return v
  8487. }
  8488. return *s.Bucket
  8489. }
  8490. // SetKey sets the Key field's value.
  8491. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  8492. s.Key = &v
  8493. return s
  8494. }
  8495. // SetMFA sets the MFA field's value.
  8496. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  8497. s.MFA = &v
  8498. return s
  8499. }
  8500. // SetRequestPayer sets the RequestPayer field's value.
  8501. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  8502. s.RequestPayer = &v
  8503. return s
  8504. }
  8505. // SetVersionId sets the VersionId field's value.
  8506. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  8507. s.VersionId = &v
  8508. return s
  8509. }
  8510. type DeleteObjectOutput struct {
  8511. _ struct{} `type:"structure"`
  8512. // Specifies whether the versioned object that was permanently deleted was (true)
  8513. // or was not (false) a delete marker.
  8514. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  8515. // If present, indicates that the requester was successfully charged for the
  8516. // request.
  8517. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8518. // Returns the version ID of the delete marker created as a result of the DELETE
  8519. // operation.
  8520. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8521. }
  8522. // String returns the string representation
  8523. func (s DeleteObjectOutput) String() string {
  8524. return awsutil.Prettify(s)
  8525. }
  8526. // GoString returns the string representation
  8527. func (s DeleteObjectOutput) GoString() string {
  8528. return s.String()
  8529. }
  8530. // SetDeleteMarker sets the DeleteMarker field's value.
  8531. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  8532. s.DeleteMarker = &v
  8533. return s
  8534. }
  8535. // SetRequestCharged sets the RequestCharged field's value.
  8536. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  8537. s.RequestCharged = &v
  8538. return s
  8539. }
  8540. // SetVersionId sets the VersionId field's value.
  8541. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  8542. s.VersionId = &v
  8543. return s
  8544. }
  8545. type DeleteObjectTaggingInput struct {
  8546. _ struct{} `type:"structure"`
  8547. // Bucket is a required field
  8548. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8549. // Key is a required field
  8550. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8551. // The versionId of the object that the tag-set will be removed from.
  8552. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8553. }
  8554. // String returns the string representation
  8555. func (s DeleteObjectTaggingInput) String() string {
  8556. return awsutil.Prettify(s)
  8557. }
  8558. // GoString returns the string representation
  8559. func (s DeleteObjectTaggingInput) GoString() string {
  8560. return s.String()
  8561. }
  8562. // Validate inspects the fields of the type to determine if they are valid.
  8563. func (s *DeleteObjectTaggingInput) Validate() error {
  8564. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  8565. if s.Bucket == nil {
  8566. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8567. }
  8568. if s.Key == nil {
  8569. invalidParams.Add(request.NewErrParamRequired("Key"))
  8570. }
  8571. if s.Key != nil && len(*s.Key) < 1 {
  8572. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8573. }
  8574. if invalidParams.Len() > 0 {
  8575. return invalidParams
  8576. }
  8577. return nil
  8578. }
  8579. // SetBucket sets the Bucket field's value.
  8580. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  8581. s.Bucket = &v
  8582. return s
  8583. }
  8584. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  8585. if s.Bucket == nil {
  8586. return v
  8587. }
  8588. return *s.Bucket
  8589. }
  8590. // SetKey sets the Key field's value.
  8591. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  8592. s.Key = &v
  8593. return s
  8594. }
  8595. // SetVersionId sets the VersionId field's value.
  8596. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  8597. s.VersionId = &v
  8598. return s
  8599. }
  8600. type DeleteObjectTaggingOutput struct {
  8601. _ struct{} `type:"structure"`
  8602. // The versionId of the object the tag-set was removed from.
  8603. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8604. }
  8605. // String returns the string representation
  8606. func (s DeleteObjectTaggingOutput) String() string {
  8607. return awsutil.Prettify(s)
  8608. }
  8609. // GoString returns the string representation
  8610. func (s DeleteObjectTaggingOutput) GoString() string {
  8611. return s.String()
  8612. }
  8613. // SetVersionId sets the VersionId field's value.
  8614. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  8615. s.VersionId = &v
  8616. return s
  8617. }
  8618. type DeleteObjectsInput struct {
  8619. _ struct{} `type:"structure" payload:"Delete"`
  8620. // Bucket is a required field
  8621. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8622. // Delete is a required field
  8623. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8624. // The concatenation of the authentication device's serial number, a space,
  8625. // and the value that is displayed on your authentication device.
  8626. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8627. // Confirms that the requester knows that she or he will be charged for the
  8628. // request. Bucket owners need not specify this parameter in their requests.
  8629. // Documentation on downloading objects from requester pays buckets can be found
  8630. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8631. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8632. }
  8633. // String returns the string representation
  8634. func (s DeleteObjectsInput) String() string {
  8635. return awsutil.Prettify(s)
  8636. }
  8637. // GoString returns the string representation
  8638. func (s DeleteObjectsInput) GoString() string {
  8639. return s.String()
  8640. }
  8641. // Validate inspects the fields of the type to determine if they are valid.
  8642. func (s *DeleteObjectsInput) Validate() error {
  8643. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  8644. if s.Bucket == nil {
  8645. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8646. }
  8647. if s.Delete == nil {
  8648. invalidParams.Add(request.NewErrParamRequired("Delete"))
  8649. }
  8650. if s.Delete != nil {
  8651. if err := s.Delete.Validate(); err != nil {
  8652. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  8653. }
  8654. }
  8655. if invalidParams.Len() > 0 {
  8656. return invalidParams
  8657. }
  8658. return nil
  8659. }
  8660. // SetBucket sets the Bucket field's value.
  8661. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  8662. s.Bucket = &v
  8663. return s
  8664. }
  8665. func (s *DeleteObjectsInput) getBucket() (v string) {
  8666. if s.Bucket == nil {
  8667. return v
  8668. }
  8669. return *s.Bucket
  8670. }
  8671. // SetDelete sets the Delete field's value.
  8672. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  8673. s.Delete = v
  8674. return s
  8675. }
  8676. // SetMFA sets the MFA field's value.
  8677. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  8678. s.MFA = &v
  8679. return s
  8680. }
  8681. // SetRequestPayer sets the RequestPayer field's value.
  8682. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  8683. s.RequestPayer = &v
  8684. return s
  8685. }
  8686. type DeleteObjectsOutput struct {
  8687. _ struct{} `type:"structure"`
  8688. Deleted []*DeletedObject `type:"list" flattened:"true"`
  8689. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  8690. // If present, indicates that the requester was successfully charged for the
  8691. // request.
  8692. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8693. }
  8694. // String returns the string representation
  8695. func (s DeleteObjectsOutput) String() string {
  8696. return awsutil.Prettify(s)
  8697. }
  8698. // GoString returns the string representation
  8699. func (s DeleteObjectsOutput) GoString() string {
  8700. return s.String()
  8701. }
  8702. // SetDeleted sets the Deleted field's value.
  8703. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  8704. s.Deleted = v
  8705. return s
  8706. }
  8707. // SetErrors sets the Errors field's value.
  8708. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  8709. s.Errors = v
  8710. return s
  8711. }
  8712. // SetRequestCharged sets the RequestCharged field's value.
  8713. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  8714. s.RequestCharged = &v
  8715. return s
  8716. }
  8717. type DeletedObject struct {
  8718. _ struct{} `type:"structure"`
  8719. DeleteMarker *bool `type:"boolean"`
  8720. DeleteMarkerVersionId *string `type:"string"`
  8721. Key *string `min:"1" type:"string"`
  8722. VersionId *string `type:"string"`
  8723. }
  8724. // String returns the string representation
  8725. func (s DeletedObject) String() string {
  8726. return awsutil.Prettify(s)
  8727. }
  8728. // GoString returns the string representation
  8729. func (s DeletedObject) GoString() string {
  8730. return s.String()
  8731. }
  8732. // SetDeleteMarker sets the DeleteMarker field's value.
  8733. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  8734. s.DeleteMarker = &v
  8735. return s
  8736. }
  8737. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  8738. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  8739. s.DeleteMarkerVersionId = &v
  8740. return s
  8741. }
  8742. // SetKey sets the Key field's value.
  8743. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  8744. s.Key = &v
  8745. return s
  8746. }
  8747. // SetVersionId sets the VersionId field's value.
  8748. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  8749. s.VersionId = &v
  8750. return s
  8751. }
  8752. // Container for replication destination information.
  8753. type Destination struct {
  8754. _ struct{} `type:"structure"`
  8755. // Container for information regarding the access control for replicas.
  8756. //
  8757. // Use only in a cross-account scenario, where source and destination bucket
  8758. // owners are not the same, when you want to change replica ownership to the
  8759. // AWS account that owns the destination bucket. If you don't add this element
  8760. // to the replication configuration, the replicas are owned by same AWS account
  8761. // that owns the source object.
  8762. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  8763. // Account ID of the destination bucket. Currently Amazon S3 verifies this value
  8764. // only if Access Control Translation is enabled.
  8765. //
  8766. // In a cross-account scenario, if you tell Amazon S3 to change replica ownership
  8767. // to the AWS account that owns the destination bucket by adding the AccessControlTranslation
  8768. // element, this is the account ID of the destination bucket owner.
  8769. Account *string `type:"string"`
  8770. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  8771. // replicas of the object identified by the rule.
  8772. //
  8773. // If you have multiple rules in your replication configuration, all rules must
  8774. // specify the same bucket as the destination. A replication configuration can
  8775. // replicate objects only to one destination bucket.
  8776. //
  8777. // Bucket is a required field
  8778. Bucket *string `type:"string" required:"true"`
  8779. // Container that provides encryption-related information. You must specify
  8780. // this element if the SourceSelectionCriteria is specified.
  8781. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  8782. // The class of storage used to store the object.
  8783. StorageClass *string `type:"string" enum:"StorageClass"`
  8784. }
  8785. // String returns the string representation
  8786. func (s Destination) String() string {
  8787. return awsutil.Prettify(s)
  8788. }
  8789. // GoString returns the string representation
  8790. func (s Destination) GoString() string {
  8791. return s.String()
  8792. }
  8793. // Validate inspects the fields of the type to determine if they are valid.
  8794. func (s *Destination) Validate() error {
  8795. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  8796. if s.Bucket == nil {
  8797. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8798. }
  8799. if s.AccessControlTranslation != nil {
  8800. if err := s.AccessControlTranslation.Validate(); err != nil {
  8801. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  8802. }
  8803. }
  8804. if invalidParams.Len() > 0 {
  8805. return invalidParams
  8806. }
  8807. return nil
  8808. }
  8809. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  8810. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  8811. s.AccessControlTranslation = v
  8812. return s
  8813. }
  8814. // SetAccount sets the Account field's value.
  8815. func (s *Destination) SetAccount(v string) *Destination {
  8816. s.Account = &v
  8817. return s
  8818. }
  8819. // SetBucket sets the Bucket field's value.
  8820. func (s *Destination) SetBucket(v string) *Destination {
  8821. s.Bucket = &v
  8822. return s
  8823. }
  8824. func (s *Destination) getBucket() (v string) {
  8825. if s.Bucket == nil {
  8826. return v
  8827. }
  8828. return *s.Bucket
  8829. }
  8830. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  8831. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  8832. s.EncryptionConfiguration = v
  8833. return s
  8834. }
  8835. // SetStorageClass sets the StorageClass field's value.
  8836. func (s *Destination) SetStorageClass(v string) *Destination {
  8837. s.StorageClass = &v
  8838. return s
  8839. }
  8840. // Describes the server-side encryption that will be applied to the restore
  8841. // results.
  8842. type Encryption struct {
  8843. _ struct{} `type:"structure"`
  8844. // The server-side encryption algorithm used when storing job results in Amazon
  8845. // S3 (e.g., AES256, aws:kms).
  8846. //
  8847. // EncryptionType is a required field
  8848. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  8849. // If the encryption type is aws:kms, this optional value can be used to specify
  8850. // the encryption context for the restore results.
  8851. KMSContext *string `type:"string"`
  8852. // If the encryption type is aws:kms, this optional value specifies the AWS
  8853. // KMS key ID to use for encryption of job results.
  8854. KMSKeyId *string `type:"string"`
  8855. }
  8856. // String returns the string representation
  8857. func (s Encryption) String() string {
  8858. return awsutil.Prettify(s)
  8859. }
  8860. // GoString returns the string representation
  8861. func (s Encryption) GoString() string {
  8862. return s.String()
  8863. }
  8864. // Validate inspects the fields of the type to determine if they are valid.
  8865. func (s *Encryption) Validate() error {
  8866. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  8867. if s.EncryptionType == nil {
  8868. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  8869. }
  8870. if invalidParams.Len() > 0 {
  8871. return invalidParams
  8872. }
  8873. return nil
  8874. }
  8875. // SetEncryptionType sets the EncryptionType field's value.
  8876. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  8877. s.EncryptionType = &v
  8878. return s
  8879. }
  8880. // SetKMSContext sets the KMSContext field's value.
  8881. func (s *Encryption) SetKMSContext(v string) *Encryption {
  8882. s.KMSContext = &v
  8883. return s
  8884. }
  8885. // SetKMSKeyId sets the KMSKeyId field's value.
  8886. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  8887. s.KMSKeyId = &v
  8888. return s
  8889. }
  8890. // Container for information regarding encryption based configuration for replicas.
  8891. type EncryptionConfiguration struct {
  8892. _ struct{} `type:"structure"`
  8893. // The ID of the AWS KMS key for the region where the destination bucket resides.
  8894. // Amazon S3 uses this key to encrypt the replica object.
  8895. ReplicaKmsKeyID *string `type:"string"`
  8896. }
  8897. // String returns the string representation
  8898. func (s EncryptionConfiguration) String() string {
  8899. return awsutil.Prettify(s)
  8900. }
  8901. // GoString returns the string representation
  8902. func (s EncryptionConfiguration) GoString() string {
  8903. return s.String()
  8904. }
  8905. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  8906. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  8907. s.ReplicaKmsKeyID = &v
  8908. return s
  8909. }
  8910. type EndEvent struct {
  8911. _ struct{} `locationName:"EndEvent" type:"structure"`
  8912. }
  8913. // String returns the string representation
  8914. func (s EndEvent) String() string {
  8915. return awsutil.Prettify(s)
  8916. }
  8917. // GoString returns the string representation
  8918. func (s EndEvent) GoString() string {
  8919. return s.String()
  8920. }
  8921. // The EndEvent is and event in the SelectObjectContentEventStream group of events.
  8922. func (s *EndEvent) eventSelectObjectContentEventStream() {}
  8923. // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
  8924. // This method is only used internally within the SDK's EventStream handling.
  8925. func (s *EndEvent) UnmarshalEvent(
  8926. payloadUnmarshaler protocol.PayloadUnmarshaler,
  8927. msg eventstream.Message,
  8928. ) error {
  8929. return nil
  8930. }
  8931. type Error struct {
  8932. _ struct{} `type:"structure"`
  8933. Code *string `type:"string"`
  8934. Key *string `min:"1" type:"string"`
  8935. Message *string `type:"string"`
  8936. VersionId *string `type:"string"`
  8937. }
  8938. // String returns the string representation
  8939. func (s Error) String() string {
  8940. return awsutil.Prettify(s)
  8941. }
  8942. // GoString returns the string representation
  8943. func (s Error) GoString() string {
  8944. return s.String()
  8945. }
  8946. // SetCode sets the Code field's value.
  8947. func (s *Error) SetCode(v string) *Error {
  8948. s.Code = &v
  8949. return s
  8950. }
  8951. // SetKey sets the Key field's value.
  8952. func (s *Error) SetKey(v string) *Error {
  8953. s.Key = &v
  8954. return s
  8955. }
  8956. // SetMessage sets the Message field's value.
  8957. func (s *Error) SetMessage(v string) *Error {
  8958. s.Message = &v
  8959. return s
  8960. }
  8961. // SetVersionId sets the VersionId field's value.
  8962. func (s *Error) SetVersionId(v string) *Error {
  8963. s.VersionId = &v
  8964. return s
  8965. }
  8966. type ErrorDocument struct {
  8967. _ struct{} `type:"structure"`
  8968. // The object key name to use when a 4XX class error occurs.
  8969. //
  8970. // Key is a required field
  8971. Key *string `min:"1" type:"string" required:"true"`
  8972. }
  8973. // String returns the string representation
  8974. func (s ErrorDocument) String() string {
  8975. return awsutil.Prettify(s)
  8976. }
  8977. // GoString returns the string representation
  8978. func (s ErrorDocument) GoString() string {
  8979. return s.String()
  8980. }
  8981. // Validate inspects the fields of the type to determine if they are valid.
  8982. func (s *ErrorDocument) Validate() error {
  8983. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  8984. if s.Key == nil {
  8985. invalidParams.Add(request.NewErrParamRequired("Key"))
  8986. }
  8987. if s.Key != nil && len(*s.Key) < 1 {
  8988. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8989. }
  8990. if invalidParams.Len() > 0 {
  8991. return invalidParams
  8992. }
  8993. return nil
  8994. }
  8995. // SetKey sets the Key field's value.
  8996. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  8997. s.Key = &v
  8998. return s
  8999. }
  9000. // Container for key value pair that defines the criteria for the filter rule.
  9001. type FilterRule struct {
  9002. _ struct{} `type:"structure"`
  9003. // Object key name prefix or suffix identifying one or more objects to which
  9004. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  9005. // Overlapping prefixes and suffixes are not supported. For more information,
  9006. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  9007. // in the Amazon Simple Storage Service Developer Guide.
  9008. Name *string `type:"string" enum:"FilterRuleName"`
  9009. Value *string `type:"string"`
  9010. }
  9011. // String returns the string representation
  9012. func (s FilterRule) String() string {
  9013. return awsutil.Prettify(s)
  9014. }
  9015. // GoString returns the string representation
  9016. func (s FilterRule) GoString() string {
  9017. return s.String()
  9018. }
  9019. // SetName sets the Name field's value.
  9020. func (s *FilterRule) SetName(v string) *FilterRule {
  9021. s.Name = &v
  9022. return s
  9023. }
  9024. // SetValue sets the Value field's value.
  9025. func (s *FilterRule) SetValue(v string) *FilterRule {
  9026. s.Value = &v
  9027. return s
  9028. }
  9029. type GetBucketAccelerateConfigurationInput struct {
  9030. _ struct{} `type:"structure"`
  9031. // Name of the bucket for which the accelerate configuration is retrieved.
  9032. //
  9033. // Bucket is a required field
  9034. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9035. }
  9036. // String returns the string representation
  9037. func (s GetBucketAccelerateConfigurationInput) String() string {
  9038. return awsutil.Prettify(s)
  9039. }
  9040. // GoString returns the string representation
  9041. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  9042. return s.String()
  9043. }
  9044. // Validate inspects the fields of the type to determine if they are valid.
  9045. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  9046. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  9047. if s.Bucket == nil {
  9048. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9049. }
  9050. if invalidParams.Len() > 0 {
  9051. return invalidParams
  9052. }
  9053. return nil
  9054. }
  9055. // SetBucket sets the Bucket field's value.
  9056. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  9057. s.Bucket = &v
  9058. return s
  9059. }
  9060. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  9061. if s.Bucket == nil {
  9062. return v
  9063. }
  9064. return *s.Bucket
  9065. }
  9066. type GetBucketAccelerateConfigurationOutput struct {
  9067. _ struct{} `type:"structure"`
  9068. // The accelerate configuration of the bucket.
  9069. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  9070. }
  9071. // String returns the string representation
  9072. func (s GetBucketAccelerateConfigurationOutput) String() string {
  9073. return awsutil.Prettify(s)
  9074. }
  9075. // GoString returns the string representation
  9076. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  9077. return s.String()
  9078. }
  9079. // SetStatus sets the Status field's value.
  9080. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  9081. s.Status = &v
  9082. return s
  9083. }
  9084. type GetBucketAclInput struct {
  9085. _ struct{} `type:"structure"`
  9086. // Bucket is a required field
  9087. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9088. }
  9089. // String returns the string representation
  9090. func (s GetBucketAclInput) String() string {
  9091. return awsutil.Prettify(s)
  9092. }
  9093. // GoString returns the string representation
  9094. func (s GetBucketAclInput) GoString() string {
  9095. return s.String()
  9096. }
  9097. // Validate inspects the fields of the type to determine if they are valid.
  9098. func (s *GetBucketAclInput) Validate() error {
  9099. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  9100. if s.Bucket == nil {
  9101. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9102. }
  9103. if invalidParams.Len() > 0 {
  9104. return invalidParams
  9105. }
  9106. return nil
  9107. }
  9108. // SetBucket sets the Bucket field's value.
  9109. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  9110. s.Bucket = &v
  9111. return s
  9112. }
  9113. func (s *GetBucketAclInput) getBucket() (v string) {
  9114. if s.Bucket == nil {
  9115. return v
  9116. }
  9117. return *s.Bucket
  9118. }
  9119. type GetBucketAclOutput struct {
  9120. _ struct{} `type:"structure"`
  9121. // A list of grants.
  9122. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  9123. Owner *Owner `type:"structure"`
  9124. }
  9125. // String returns the string representation
  9126. func (s GetBucketAclOutput) String() string {
  9127. return awsutil.Prettify(s)
  9128. }
  9129. // GoString returns the string representation
  9130. func (s GetBucketAclOutput) GoString() string {
  9131. return s.String()
  9132. }
  9133. // SetGrants sets the Grants field's value.
  9134. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  9135. s.Grants = v
  9136. return s
  9137. }
  9138. // SetOwner sets the Owner field's value.
  9139. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  9140. s.Owner = v
  9141. return s
  9142. }
  9143. type GetBucketAnalyticsConfigurationInput struct {
  9144. _ struct{} `type:"structure"`
  9145. // The name of the bucket from which an analytics configuration is retrieved.
  9146. //
  9147. // Bucket is a required field
  9148. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9149. // The identifier used to represent an analytics configuration.
  9150. //
  9151. // Id is a required field
  9152. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9153. }
  9154. // String returns the string representation
  9155. func (s GetBucketAnalyticsConfigurationInput) String() string {
  9156. return awsutil.Prettify(s)
  9157. }
  9158. // GoString returns the string representation
  9159. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  9160. return s.String()
  9161. }
  9162. // Validate inspects the fields of the type to determine if they are valid.
  9163. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  9164. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  9165. if s.Bucket == nil {
  9166. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9167. }
  9168. if s.Id == nil {
  9169. invalidParams.Add(request.NewErrParamRequired("Id"))
  9170. }
  9171. if invalidParams.Len() > 0 {
  9172. return invalidParams
  9173. }
  9174. return nil
  9175. }
  9176. // SetBucket sets the Bucket field's value.
  9177. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  9178. s.Bucket = &v
  9179. return s
  9180. }
  9181. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  9182. if s.Bucket == nil {
  9183. return v
  9184. }
  9185. return *s.Bucket
  9186. }
  9187. // SetId sets the Id field's value.
  9188. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  9189. s.Id = &v
  9190. return s
  9191. }
  9192. type GetBucketAnalyticsConfigurationOutput struct {
  9193. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  9194. // The configuration and any analyses for the analytics filter.
  9195. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  9196. }
  9197. // String returns the string representation
  9198. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  9199. return awsutil.Prettify(s)
  9200. }
  9201. // GoString returns the string representation
  9202. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  9203. return s.String()
  9204. }
  9205. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  9206. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  9207. s.AnalyticsConfiguration = v
  9208. return s
  9209. }
  9210. type GetBucketCorsInput struct {
  9211. _ struct{} `type:"structure"`
  9212. // Bucket is a required field
  9213. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9214. }
  9215. // String returns the string representation
  9216. func (s GetBucketCorsInput) String() string {
  9217. return awsutil.Prettify(s)
  9218. }
  9219. // GoString returns the string representation
  9220. func (s GetBucketCorsInput) GoString() string {
  9221. return s.String()
  9222. }
  9223. // Validate inspects the fields of the type to determine if they are valid.
  9224. func (s *GetBucketCorsInput) Validate() error {
  9225. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  9226. if s.Bucket == nil {
  9227. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9228. }
  9229. if invalidParams.Len() > 0 {
  9230. return invalidParams
  9231. }
  9232. return nil
  9233. }
  9234. // SetBucket sets the Bucket field's value.
  9235. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  9236. s.Bucket = &v
  9237. return s
  9238. }
  9239. func (s *GetBucketCorsInput) getBucket() (v string) {
  9240. if s.Bucket == nil {
  9241. return v
  9242. }
  9243. return *s.Bucket
  9244. }
  9245. type GetBucketCorsOutput struct {
  9246. _ struct{} `type:"structure"`
  9247. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  9248. }
  9249. // String returns the string representation
  9250. func (s GetBucketCorsOutput) String() string {
  9251. return awsutil.Prettify(s)
  9252. }
  9253. // GoString returns the string representation
  9254. func (s GetBucketCorsOutput) GoString() string {
  9255. return s.String()
  9256. }
  9257. // SetCORSRules sets the CORSRules field's value.
  9258. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  9259. s.CORSRules = v
  9260. return s
  9261. }
  9262. type GetBucketEncryptionInput struct {
  9263. _ struct{} `type:"structure"`
  9264. // The name of the bucket from which the server-side encryption configuration
  9265. // is retrieved.
  9266. //
  9267. // Bucket is a required field
  9268. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9269. }
  9270. // String returns the string representation
  9271. func (s GetBucketEncryptionInput) String() string {
  9272. return awsutil.Prettify(s)
  9273. }
  9274. // GoString returns the string representation
  9275. func (s GetBucketEncryptionInput) GoString() string {
  9276. return s.String()
  9277. }
  9278. // Validate inspects the fields of the type to determine if they are valid.
  9279. func (s *GetBucketEncryptionInput) Validate() error {
  9280. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  9281. if s.Bucket == nil {
  9282. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9283. }
  9284. if invalidParams.Len() > 0 {
  9285. return invalidParams
  9286. }
  9287. return nil
  9288. }
  9289. // SetBucket sets the Bucket field's value.
  9290. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  9291. s.Bucket = &v
  9292. return s
  9293. }
  9294. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  9295. if s.Bucket == nil {
  9296. return v
  9297. }
  9298. return *s.Bucket
  9299. }
  9300. type GetBucketEncryptionOutput struct {
  9301. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  9302. // Container for server-side encryption configuration rules. Currently S3 supports
  9303. // one rule only.
  9304. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  9305. }
  9306. // String returns the string representation
  9307. func (s GetBucketEncryptionOutput) String() string {
  9308. return awsutil.Prettify(s)
  9309. }
  9310. // GoString returns the string representation
  9311. func (s GetBucketEncryptionOutput) GoString() string {
  9312. return s.String()
  9313. }
  9314. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  9315. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  9316. s.ServerSideEncryptionConfiguration = v
  9317. return s
  9318. }
  9319. type GetBucketInventoryConfigurationInput struct {
  9320. _ struct{} `type:"structure"`
  9321. // The name of the bucket containing the inventory configuration to retrieve.
  9322. //
  9323. // Bucket is a required field
  9324. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9325. // The ID used to identify the inventory configuration.
  9326. //
  9327. // Id is a required field
  9328. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9329. }
  9330. // String returns the string representation
  9331. func (s GetBucketInventoryConfigurationInput) String() string {
  9332. return awsutil.Prettify(s)
  9333. }
  9334. // GoString returns the string representation
  9335. func (s GetBucketInventoryConfigurationInput) GoString() string {
  9336. return s.String()
  9337. }
  9338. // Validate inspects the fields of the type to determine if they are valid.
  9339. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  9340. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  9341. if s.Bucket == nil {
  9342. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9343. }
  9344. if s.Id == nil {
  9345. invalidParams.Add(request.NewErrParamRequired("Id"))
  9346. }
  9347. if invalidParams.Len() > 0 {
  9348. return invalidParams
  9349. }
  9350. return nil
  9351. }
  9352. // SetBucket sets the Bucket field's value.
  9353. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  9354. s.Bucket = &v
  9355. return s
  9356. }
  9357. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  9358. if s.Bucket == nil {
  9359. return v
  9360. }
  9361. return *s.Bucket
  9362. }
  9363. // SetId sets the Id field's value.
  9364. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  9365. s.Id = &v
  9366. return s
  9367. }
  9368. type GetBucketInventoryConfigurationOutput struct {
  9369. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  9370. // Specifies the inventory configuration.
  9371. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  9372. }
  9373. // String returns the string representation
  9374. func (s GetBucketInventoryConfigurationOutput) String() string {
  9375. return awsutil.Prettify(s)
  9376. }
  9377. // GoString returns the string representation
  9378. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  9379. return s.String()
  9380. }
  9381. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  9382. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  9383. s.InventoryConfiguration = v
  9384. return s
  9385. }
  9386. type GetBucketLifecycleConfigurationInput struct {
  9387. _ struct{} `type:"structure"`
  9388. // Bucket is a required field
  9389. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9390. }
  9391. // String returns the string representation
  9392. func (s GetBucketLifecycleConfigurationInput) String() string {
  9393. return awsutil.Prettify(s)
  9394. }
  9395. // GoString returns the string representation
  9396. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  9397. return s.String()
  9398. }
  9399. // Validate inspects the fields of the type to determine if they are valid.
  9400. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  9401. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  9402. if s.Bucket == nil {
  9403. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9404. }
  9405. if invalidParams.Len() > 0 {
  9406. return invalidParams
  9407. }
  9408. return nil
  9409. }
  9410. // SetBucket sets the Bucket field's value.
  9411. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  9412. s.Bucket = &v
  9413. return s
  9414. }
  9415. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  9416. if s.Bucket == nil {
  9417. return v
  9418. }
  9419. return *s.Bucket
  9420. }
  9421. type GetBucketLifecycleConfigurationOutput struct {
  9422. _ struct{} `type:"structure"`
  9423. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  9424. }
  9425. // String returns the string representation
  9426. func (s GetBucketLifecycleConfigurationOutput) String() string {
  9427. return awsutil.Prettify(s)
  9428. }
  9429. // GoString returns the string representation
  9430. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  9431. return s.String()
  9432. }
  9433. // SetRules sets the Rules field's value.
  9434. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  9435. s.Rules = v
  9436. return s
  9437. }
  9438. type GetBucketLifecycleInput struct {
  9439. _ struct{} `type:"structure"`
  9440. // Bucket is a required field
  9441. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9442. }
  9443. // String returns the string representation
  9444. func (s GetBucketLifecycleInput) String() string {
  9445. return awsutil.Prettify(s)
  9446. }
  9447. // GoString returns the string representation
  9448. func (s GetBucketLifecycleInput) GoString() string {
  9449. return s.String()
  9450. }
  9451. // Validate inspects the fields of the type to determine if they are valid.
  9452. func (s *GetBucketLifecycleInput) Validate() error {
  9453. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  9454. if s.Bucket == nil {
  9455. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9456. }
  9457. if invalidParams.Len() > 0 {
  9458. return invalidParams
  9459. }
  9460. return nil
  9461. }
  9462. // SetBucket sets the Bucket field's value.
  9463. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  9464. s.Bucket = &v
  9465. return s
  9466. }
  9467. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  9468. if s.Bucket == nil {
  9469. return v
  9470. }
  9471. return *s.Bucket
  9472. }
  9473. type GetBucketLifecycleOutput struct {
  9474. _ struct{} `type:"structure"`
  9475. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  9476. }
  9477. // String returns the string representation
  9478. func (s GetBucketLifecycleOutput) String() string {
  9479. return awsutil.Prettify(s)
  9480. }
  9481. // GoString returns the string representation
  9482. func (s GetBucketLifecycleOutput) GoString() string {
  9483. return s.String()
  9484. }
  9485. // SetRules sets the Rules field's value.
  9486. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  9487. s.Rules = v
  9488. return s
  9489. }
  9490. type GetBucketLocationInput struct {
  9491. _ struct{} `type:"structure"`
  9492. // Bucket is a required field
  9493. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9494. }
  9495. // String returns the string representation
  9496. func (s GetBucketLocationInput) String() string {
  9497. return awsutil.Prettify(s)
  9498. }
  9499. // GoString returns the string representation
  9500. func (s GetBucketLocationInput) GoString() string {
  9501. return s.String()
  9502. }
  9503. // Validate inspects the fields of the type to determine if they are valid.
  9504. func (s *GetBucketLocationInput) Validate() error {
  9505. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  9506. if s.Bucket == nil {
  9507. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9508. }
  9509. if invalidParams.Len() > 0 {
  9510. return invalidParams
  9511. }
  9512. return nil
  9513. }
  9514. // SetBucket sets the Bucket field's value.
  9515. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  9516. s.Bucket = &v
  9517. return s
  9518. }
  9519. func (s *GetBucketLocationInput) getBucket() (v string) {
  9520. if s.Bucket == nil {
  9521. return v
  9522. }
  9523. return *s.Bucket
  9524. }
  9525. type GetBucketLocationOutput struct {
  9526. _ struct{} `type:"structure"`
  9527. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  9528. }
  9529. // String returns the string representation
  9530. func (s GetBucketLocationOutput) String() string {
  9531. return awsutil.Prettify(s)
  9532. }
  9533. // GoString returns the string representation
  9534. func (s GetBucketLocationOutput) GoString() string {
  9535. return s.String()
  9536. }
  9537. // SetLocationConstraint sets the LocationConstraint field's value.
  9538. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  9539. s.LocationConstraint = &v
  9540. return s
  9541. }
  9542. type GetBucketLoggingInput struct {
  9543. _ struct{} `type:"structure"`
  9544. // Bucket is a required field
  9545. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9546. }
  9547. // String returns the string representation
  9548. func (s GetBucketLoggingInput) String() string {
  9549. return awsutil.Prettify(s)
  9550. }
  9551. // GoString returns the string representation
  9552. func (s GetBucketLoggingInput) GoString() string {
  9553. return s.String()
  9554. }
  9555. // Validate inspects the fields of the type to determine if they are valid.
  9556. func (s *GetBucketLoggingInput) Validate() error {
  9557. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  9558. if s.Bucket == nil {
  9559. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9560. }
  9561. if invalidParams.Len() > 0 {
  9562. return invalidParams
  9563. }
  9564. return nil
  9565. }
  9566. // SetBucket sets the Bucket field's value.
  9567. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  9568. s.Bucket = &v
  9569. return s
  9570. }
  9571. func (s *GetBucketLoggingInput) getBucket() (v string) {
  9572. if s.Bucket == nil {
  9573. return v
  9574. }
  9575. return *s.Bucket
  9576. }
  9577. type GetBucketLoggingOutput struct {
  9578. _ struct{} `type:"structure"`
  9579. // Container for logging information. Presence of this element indicates that
  9580. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  9581. // in this case.
  9582. LoggingEnabled *LoggingEnabled `type:"structure"`
  9583. }
  9584. // String returns the string representation
  9585. func (s GetBucketLoggingOutput) String() string {
  9586. return awsutil.Prettify(s)
  9587. }
  9588. // GoString returns the string representation
  9589. func (s GetBucketLoggingOutput) GoString() string {
  9590. return s.String()
  9591. }
  9592. // SetLoggingEnabled sets the LoggingEnabled field's value.
  9593. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  9594. s.LoggingEnabled = v
  9595. return s
  9596. }
  9597. type GetBucketMetricsConfigurationInput struct {
  9598. _ struct{} `type:"structure"`
  9599. // The name of the bucket containing the metrics configuration to retrieve.
  9600. //
  9601. // Bucket is a required field
  9602. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9603. // The ID used to identify the metrics configuration.
  9604. //
  9605. // Id is a required field
  9606. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9607. }
  9608. // String returns the string representation
  9609. func (s GetBucketMetricsConfigurationInput) String() string {
  9610. return awsutil.Prettify(s)
  9611. }
  9612. // GoString returns the string representation
  9613. func (s GetBucketMetricsConfigurationInput) GoString() string {
  9614. return s.String()
  9615. }
  9616. // Validate inspects the fields of the type to determine if they are valid.
  9617. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  9618. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  9619. if s.Bucket == nil {
  9620. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9621. }
  9622. if s.Id == nil {
  9623. invalidParams.Add(request.NewErrParamRequired("Id"))
  9624. }
  9625. if invalidParams.Len() > 0 {
  9626. return invalidParams
  9627. }
  9628. return nil
  9629. }
  9630. // SetBucket sets the Bucket field's value.
  9631. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  9632. s.Bucket = &v
  9633. return s
  9634. }
  9635. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  9636. if s.Bucket == nil {
  9637. return v
  9638. }
  9639. return *s.Bucket
  9640. }
  9641. // SetId sets the Id field's value.
  9642. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  9643. s.Id = &v
  9644. return s
  9645. }
  9646. type GetBucketMetricsConfigurationOutput struct {
  9647. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  9648. // Specifies the metrics configuration.
  9649. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  9650. }
  9651. // String returns the string representation
  9652. func (s GetBucketMetricsConfigurationOutput) String() string {
  9653. return awsutil.Prettify(s)
  9654. }
  9655. // GoString returns the string representation
  9656. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  9657. return s.String()
  9658. }
  9659. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  9660. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  9661. s.MetricsConfiguration = v
  9662. return s
  9663. }
  9664. type GetBucketNotificationConfigurationRequest struct {
  9665. _ struct{} `type:"structure"`
  9666. // Name of the bucket to get the notification configuration for.
  9667. //
  9668. // Bucket is a required field
  9669. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9670. }
  9671. // String returns the string representation
  9672. func (s GetBucketNotificationConfigurationRequest) String() string {
  9673. return awsutil.Prettify(s)
  9674. }
  9675. // GoString returns the string representation
  9676. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  9677. return s.String()
  9678. }
  9679. // Validate inspects the fields of the type to determine if they are valid.
  9680. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  9681. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  9682. if s.Bucket == nil {
  9683. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9684. }
  9685. if invalidParams.Len() > 0 {
  9686. return invalidParams
  9687. }
  9688. return nil
  9689. }
  9690. // SetBucket sets the Bucket field's value.
  9691. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  9692. s.Bucket = &v
  9693. return s
  9694. }
  9695. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  9696. if s.Bucket == nil {
  9697. return v
  9698. }
  9699. return *s.Bucket
  9700. }
  9701. type GetBucketPolicyInput struct {
  9702. _ struct{} `type:"structure"`
  9703. // Bucket is a required field
  9704. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9705. }
  9706. // String returns the string representation
  9707. func (s GetBucketPolicyInput) String() string {
  9708. return awsutil.Prettify(s)
  9709. }
  9710. // GoString returns the string representation
  9711. func (s GetBucketPolicyInput) GoString() string {
  9712. return s.String()
  9713. }
  9714. // Validate inspects the fields of the type to determine if they are valid.
  9715. func (s *GetBucketPolicyInput) Validate() error {
  9716. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  9717. if s.Bucket == nil {
  9718. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9719. }
  9720. if invalidParams.Len() > 0 {
  9721. return invalidParams
  9722. }
  9723. return nil
  9724. }
  9725. // SetBucket sets the Bucket field's value.
  9726. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  9727. s.Bucket = &v
  9728. return s
  9729. }
  9730. func (s *GetBucketPolicyInput) getBucket() (v string) {
  9731. if s.Bucket == nil {
  9732. return v
  9733. }
  9734. return *s.Bucket
  9735. }
  9736. type GetBucketPolicyOutput struct {
  9737. _ struct{} `type:"structure" payload:"Policy"`
  9738. // The bucket policy as a JSON document.
  9739. Policy *string `type:"string"`
  9740. }
  9741. // String returns the string representation
  9742. func (s GetBucketPolicyOutput) String() string {
  9743. return awsutil.Prettify(s)
  9744. }
  9745. // GoString returns the string representation
  9746. func (s GetBucketPolicyOutput) GoString() string {
  9747. return s.String()
  9748. }
  9749. // SetPolicy sets the Policy field's value.
  9750. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  9751. s.Policy = &v
  9752. return s
  9753. }
  9754. type GetBucketReplicationInput struct {
  9755. _ struct{} `type:"structure"`
  9756. // Bucket is a required field
  9757. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9758. }
  9759. // String returns the string representation
  9760. func (s GetBucketReplicationInput) String() string {
  9761. return awsutil.Prettify(s)
  9762. }
  9763. // GoString returns the string representation
  9764. func (s GetBucketReplicationInput) GoString() string {
  9765. return s.String()
  9766. }
  9767. // Validate inspects the fields of the type to determine if they are valid.
  9768. func (s *GetBucketReplicationInput) Validate() error {
  9769. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  9770. if s.Bucket == nil {
  9771. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9772. }
  9773. if invalidParams.Len() > 0 {
  9774. return invalidParams
  9775. }
  9776. return nil
  9777. }
  9778. // SetBucket sets the Bucket field's value.
  9779. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  9780. s.Bucket = &v
  9781. return s
  9782. }
  9783. func (s *GetBucketReplicationInput) getBucket() (v string) {
  9784. if s.Bucket == nil {
  9785. return v
  9786. }
  9787. return *s.Bucket
  9788. }
  9789. type GetBucketReplicationOutput struct {
  9790. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  9791. // Container for replication rules. You can add as many as 1,000 rules. Total
  9792. // replication configuration size can be up to 2 MB.
  9793. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  9794. }
  9795. // String returns the string representation
  9796. func (s GetBucketReplicationOutput) String() string {
  9797. return awsutil.Prettify(s)
  9798. }
  9799. // GoString returns the string representation
  9800. func (s GetBucketReplicationOutput) GoString() string {
  9801. return s.String()
  9802. }
  9803. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  9804. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  9805. s.ReplicationConfiguration = v
  9806. return s
  9807. }
  9808. type GetBucketRequestPaymentInput struct {
  9809. _ struct{} `type:"structure"`
  9810. // Bucket is a required field
  9811. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9812. }
  9813. // String returns the string representation
  9814. func (s GetBucketRequestPaymentInput) String() string {
  9815. return awsutil.Prettify(s)
  9816. }
  9817. // GoString returns the string representation
  9818. func (s GetBucketRequestPaymentInput) GoString() string {
  9819. return s.String()
  9820. }
  9821. // Validate inspects the fields of the type to determine if they are valid.
  9822. func (s *GetBucketRequestPaymentInput) Validate() error {
  9823. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  9824. if s.Bucket == nil {
  9825. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9826. }
  9827. if invalidParams.Len() > 0 {
  9828. return invalidParams
  9829. }
  9830. return nil
  9831. }
  9832. // SetBucket sets the Bucket field's value.
  9833. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  9834. s.Bucket = &v
  9835. return s
  9836. }
  9837. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  9838. if s.Bucket == nil {
  9839. return v
  9840. }
  9841. return *s.Bucket
  9842. }
  9843. type GetBucketRequestPaymentOutput struct {
  9844. _ struct{} `type:"structure"`
  9845. // Specifies who pays for the download and request fees.
  9846. Payer *string `type:"string" enum:"Payer"`
  9847. }
  9848. // String returns the string representation
  9849. func (s GetBucketRequestPaymentOutput) String() string {
  9850. return awsutil.Prettify(s)
  9851. }
  9852. // GoString returns the string representation
  9853. func (s GetBucketRequestPaymentOutput) GoString() string {
  9854. return s.String()
  9855. }
  9856. // SetPayer sets the Payer field's value.
  9857. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  9858. s.Payer = &v
  9859. return s
  9860. }
  9861. type GetBucketTaggingInput struct {
  9862. _ struct{} `type:"structure"`
  9863. // Bucket is a required field
  9864. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9865. }
  9866. // String returns the string representation
  9867. func (s GetBucketTaggingInput) String() string {
  9868. return awsutil.Prettify(s)
  9869. }
  9870. // GoString returns the string representation
  9871. func (s GetBucketTaggingInput) GoString() string {
  9872. return s.String()
  9873. }
  9874. // Validate inspects the fields of the type to determine if they are valid.
  9875. func (s *GetBucketTaggingInput) Validate() error {
  9876. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  9877. if s.Bucket == nil {
  9878. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9879. }
  9880. if invalidParams.Len() > 0 {
  9881. return invalidParams
  9882. }
  9883. return nil
  9884. }
  9885. // SetBucket sets the Bucket field's value.
  9886. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  9887. s.Bucket = &v
  9888. return s
  9889. }
  9890. func (s *GetBucketTaggingInput) getBucket() (v string) {
  9891. if s.Bucket == nil {
  9892. return v
  9893. }
  9894. return *s.Bucket
  9895. }
  9896. type GetBucketTaggingOutput struct {
  9897. _ struct{} `type:"structure"`
  9898. // TagSet is a required field
  9899. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  9900. }
  9901. // String returns the string representation
  9902. func (s GetBucketTaggingOutput) String() string {
  9903. return awsutil.Prettify(s)
  9904. }
  9905. // GoString returns the string representation
  9906. func (s GetBucketTaggingOutput) GoString() string {
  9907. return s.String()
  9908. }
  9909. // SetTagSet sets the TagSet field's value.
  9910. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  9911. s.TagSet = v
  9912. return s
  9913. }
  9914. type GetBucketVersioningInput struct {
  9915. _ struct{} `type:"structure"`
  9916. // Bucket is a required field
  9917. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9918. }
  9919. // String returns the string representation
  9920. func (s GetBucketVersioningInput) String() string {
  9921. return awsutil.Prettify(s)
  9922. }
  9923. // GoString returns the string representation
  9924. func (s GetBucketVersioningInput) GoString() string {
  9925. return s.String()
  9926. }
  9927. // Validate inspects the fields of the type to determine if they are valid.
  9928. func (s *GetBucketVersioningInput) Validate() error {
  9929. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  9930. if s.Bucket == nil {
  9931. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9932. }
  9933. if invalidParams.Len() > 0 {
  9934. return invalidParams
  9935. }
  9936. return nil
  9937. }
  9938. // SetBucket sets the Bucket field's value.
  9939. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  9940. s.Bucket = &v
  9941. return s
  9942. }
  9943. func (s *GetBucketVersioningInput) getBucket() (v string) {
  9944. if s.Bucket == nil {
  9945. return v
  9946. }
  9947. return *s.Bucket
  9948. }
  9949. type GetBucketVersioningOutput struct {
  9950. _ struct{} `type:"structure"`
  9951. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  9952. // This element is only returned if the bucket has been configured with MFA
  9953. // delete. If the bucket has never been so configured, this element is not returned.
  9954. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  9955. // The versioning state of the bucket.
  9956. Status *string `type:"string" enum:"BucketVersioningStatus"`
  9957. }
  9958. // String returns the string representation
  9959. func (s GetBucketVersioningOutput) String() string {
  9960. return awsutil.Prettify(s)
  9961. }
  9962. // GoString returns the string representation
  9963. func (s GetBucketVersioningOutput) GoString() string {
  9964. return s.String()
  9965. }
  9966. // SetMFADelete sets the MFADelete field's value.
  9967. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  9968. s.MFADelete = &v
  9969. return s
  9970. }
  9971. // SetStatus sets the Status field's value.
  9972. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  9973. s.Status = &v
  9974. return s
  9975. }
  9976. type GetBucketWebsiteInput struct {
  9977. _ struct{} `type:"structure"`
  9978. // Bucket is a required field
  9979. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9980. }
  9981. // String returns the string representation
  9982. func (s GetBucketWebsiteInput) String() string {
  9983. return awsutil.Prettify(s)
  9984. }
  9985. // GoString returns the string representation
  9986. func (s GetBucketWebsiteInput) GoString() string {
  9987. return s.String()
  9988. }
  9989. // Validate inspects the fields of the type to determine if they are valid.
  9990. func (s *GetBucketWebsiteInput) Validate() error {
  9991. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  9992. if s.Bucket == nil {
  9993. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9994. }
  9995. if invalidParams.Len() > 0 {
  9996. return invalidParams
  9997. }
  9998. return nil
  9999. }
  10000. // SetBucket sets the Bucket field's value.
  10001. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  10002. s.Bucket = &v
  10003. return s
  10004. }
  10005. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  10006. if s.Bucket == nil {
  10007. return v
  10008. }
  10009. return *s.Bucket
  10010. }
  10011. type GetBucketWebsiteOutput struct {
  10012. _ struct{} `type:"structure"`
  10013. ErrorDocument *ErrorDocument `type:"structure"`
  10014. IndexDocument *IndexDocument `type:"structure"`
  10015. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  10016. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  10017. }
  10018. // String returns the string representation
  10019. func (s GetBucketWebsiteOutput) String() string {
  10020. return awsutil.Prettify(s)
  10021. }
  10022. // GoString returns the string representation
  10023. func (s GetBucketWebsiteOutput) GoString() string {
  10024. return s.String()
  10025. }
  10026. // SetErrorDocument sets the ErrorDocument field's value.
  10027. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  10028. s.ErrorDocument = v
  10029. return s
  10030. }
  10031. // SetIndexDocument sets the IndexDocument field's value.
  10032. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  10033. s.IndexDocument = v
  10034. return s
  10035. }
  10036. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  10037. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  10038. s.RedirectAllRequestsTo = v
  10039. return s
  10040. }
  10041. // SetRoutingRules sets the RoutingRules field's value.
  10042. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  10043. s.RoutingRules = v
  10044. return s
  10045. }
  10046. type GetObjectAclInput struct {
  10047. _ struct{} `type:"structure"`
  10048. // Bucket is a required field
  10049. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10050. // Key is a required field
  10051. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10052. // Confirms that the requester knows that she or he will be charged for the
  10053. // request. Bucket owners need not specify this parameter in their requests.
  10054. // Documentation on downloading objects from requester pays buckets can be found
  10055. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10056. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10057. // VersionId used to reference a specific version of the object.
  10058. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10059. }
  10060. // String returns the string representation
  10061. func (s GetObjectAclInput) String() string {
  10062. return awsutil.Prettify(s)
  10063. }
  10064. // GoString returns the string representation
  10065. func (s GetObjectAclInput) GoString() string {
  10066. return s.String()
  10067. }
  10068. // Validate inspects the fields of the type to determine if they are valid.
  10069. func (s *GetObjectAclInput) Validate() error {
  10070. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  10071. if s.Bucket == nil {
  10072. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10073. }
  10074. if s.Key == nil {
  10075. invalidParams.Add(request.NewErrParamRequired("Key"))
  10076. }
  10077. if s.Key != nil && len(*s.Key) < 1 {
  10078. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10079. }
  10080. if invalidParams.Len() > 0 {
  10081. return invalidParams
  10082. }
  10083. return nil
  10084. }
  10085. // SetBucket sets the Bucket field's value.
  10086. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  10087. s.Bucket = &v
  10088. return s
  10089. }
  10090. func (s *GetObjectAclInput) getBucket() (v string) {
  10091. if s.Bucket == nil {
  10092. return v
  10093. }
  10094. return *s.Bucket
  10095. }
  10096. // SetKey sets the Key field's value.
  10097. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  10098. s.Key = &v
  10099. return s
  10100. }
  10101. // SetRequestPayer sets the RequestPayer field's value.
  10102. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  10103. s.RequestPayer = &v
  10104. return s
  10105. }
  10106. // SetVersionId sets the VersionId field's value.
  10107. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  10108. s.VersionId = &v
  10109. return s
  10110. }
  10111. type GetObjectAclOutput struct {
  10112. _ struct{} `type:"structure"`
  10113. // A list of grants.
  10114. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  10115. Owner *Owner `type:"structure"`
  10116. // If present, indicates that the requester was successfully charged for the
  10117. // request.
  10118. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10119. }
  10120. // String returns the string representation
  10121. func (s GetObjectAclOutput) String() string {
  10122. return awsutil.Prettify(s)
  10123. }
  10124. // GoString returns the string representation
  10125. func (s GetObjectAclOutput) GoString() string {
  10126. return s.String()
  10127. }
  10128. // SetGrants sets the Grants field's value.
  10129. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  10130. s.Grants = v
  10131. return s
  10132. }
  10133. // SetOwner sets the Owner field's value.
  10134. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  10135. s.Owner = v
  10136. return s
  10137. }
  10138. // SetRequestCharged sets the RequestCharged field's value.
  10139. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  10140. s.RequestCharged = &v
  10141. return s
  10142. }
  10143. type GetObjectInput struct {
  10144. _ struct{} `type:"structure"`
  10145. // Bucket is a required field
  10146. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10147. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10148. // otherwise return a 412 (precondition failed).
  10149. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10150. // Return the object only if it has been modified since the specified time,
  10151. // otherwise return a 304 (not modified).
  10152. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  10153. // Return the object only if its entity tag (ETag) is different from the one
  10154. // specified, otherwise return a 304 (not modified).
  10155. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10156. // Return the object only if it has not been modified since the specified time,
  10157. // otherwise return a 412 (precondition failed).
  10158. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  10159. // Key is a required field
  10160. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10161. // Part number of the object being read. This is a positive integer between
  10162. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  10163. // Useful for downloading just a part of an object.
  10164. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10165. // Downloads the specified range bytes of an object. For more information about
  10166. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10167. Range *string `location:"header" locationName:"Range" type:"string"`
  10168. // Confirms that the requester knows that she or he will be charged for the
  10169. // request. Bucket owners need not specify this parameter in their requests.
  10170. // Documentation on downloading objects from requester pays buckets can be found
  10171. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10172. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10173. // Sets the Cache-Control header of the response.
  10174. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  10175. // Sets the Content-Disposition header of the response
  10176. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  10177. // Sets the Content-Encoding header of the response.
  10178. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  10179. // Sets the Content-Language header of the response.
  10180. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  10181. // Sets the Content-Type header of the response.
  10182. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  10183. // Sets the Expires header of the response.
  10184. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`
  10185. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10186. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10187. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10188. // data. This value is used to store the object and then it is discarded; Amazon
  10189. // does not store the encryption key. The key must be appropriate for use with
  10190. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10191. // header.
  10192. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10193. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10194. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10195. // key was transmitted without error.
  10196. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10197. // VersionId used to reference a specific version of the object.
  10198. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10199. }
  10200. // String returns the string representation
  10201. func (s GetObjectInput) String() string {
  10202. return awsutil.Prettify(s)
  10203. }
  10204. // GoString returns the string representation
  10205. func (s GetObjectInput) GoString() string {
  10206. return s.String()
  10207. }
  10208. // Validate inspects the fields of the type to determine if they are valid.
  10209. func (s *GetObjectInput) Validate() error {
  10210. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  10211. if s.Bucket == nil {
  10212. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10213. }
  10214. if s.Key == nil {
  10215. invalidParams.Add(request.NewErrParamRequired("Key"))
  10216. }
  10217. if s.Key != nil && len(*s.Key) < 1 {
  10218. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10219. }
  10220. if invalidParams.Len() > 0 {
  10221. return invalidParams
  10222. }
  10223. return nil
  10224. }
  10225. // SetBucket sets the Bucket field's value.
  10226. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  10227. s.Bucket = &v
  10228. return s
  10229. }
  10230. func (s *GetObjectInput) getBucket() (v string) {
  10231. if s.Bucket == nil {
  10232. return v
  10233. }
  10234. return *s.Bucket
  10235. }
  10236. // SetIfMatch sets the IfMatch field's value.
  10237. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  10238. s.IfMatch = &v
  10239. return s
  10240. }
  10241. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10242. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  10243. s.IfModifiedSince = &v
  10244. return s
  10245. }
  10246. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10247. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  10248. s.IfNoneMatch = &v
  10249. return s
  10250. }
  10251. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10252. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  10253. s.IfUnmodifiedSince = &v
  10254. return s
  10255. }
  10256. // SetKey sets the Key field's value.
  10257. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  10258. s.Key = &v
  10259. return s
  10260. }
  10261. // SetPartNumber sets the PartNumber field's value.
  10262. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  10263. s.PartNumber = &v
  10264. return s
  10265. }
  10266. // SetRange sets the Range field's value.
  10267. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  10268. s.Range = &v
  10269. return s
  10270. }
  10271. // SetRequestPayer sets the RequestPayer field's value.
  10272. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  10273. s.RequestPayer = &v
  10274. return s
  10275. }
  10276. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  10277. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  10278. s.ResponseCacheControl = &v
  10279. return s
  10280. }
  10281. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  10282. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  10283. s.ResponseContentDisposition = &v
  10284. return s
  10285. }
  10286. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  10287. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  10288. s.ResponseContentEncoding = &v
  10289. return s
  10290. }
  10291. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  10292. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  10293. s.ResponseContentLanguage = &v
  10294. return s
  10295. }
  10296. // SetResponseContentType sets the ResponseContentType field's value.
  10297. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  10298. s.ResponseContentType = &v
  10299. return s
  10300. }
  10301. // SetResponseExpires sets the ResponseExpires field's value.
  10302. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  10303. s.ResponseExpires = &v
  10304. return s
  10305. }
  10306. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10307. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  10308. s.SSECustomerAlgorithm = &v
  10309. return s
  10310. }
  10311. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10312. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  10313. s.SSECustomerKey = &v
  10314. return s
  10315. }
  10316. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  10317. if s.SSECustomerKey == nil {
  10318. return v
  10319. }
  10320. return *s.SSECustomerKey
  10321. }
  10322. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10323. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  10324. s.SSECustomerKeyMD5 = &v
  10325. return s
  10326. }
  10327. // SetVersionId sets the VersionId field's value.
  10328. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  10329. s.VersionId = &v
  10330. return s
  10331. }
  10332. type GetObjectOutput struct {
  10333. _ struct{} `type:"structure" payload:"Body"`
  10334. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10335. // Object data.
  10336. Body io.ReadCloser `type:"blob"`
  10337. // Specifies caching behavior along the request/reply chain.
  10338. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10339. // Specifies presentational information for the object.
  10340. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10341. // Specifies what content encodings have been applied to the object and thus
  10342. // what decoding mechanisms must be applied to obtain the media-type referenced
  10343. // by the Content-Type header field.
  10344. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10345. // The language the content is in.
  10346. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10347. // Size of the body in bytes.
  10348. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10349. // The portion of the object returned in the response.
  10350. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  10351. // A standard MIME type describing the format of the object data.
  10352. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10353. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10354. // Marker. If false, this response header does not appear in the response.
  10355. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10356. // An ETag is an opaque identifier assigned by a web server to a specific version
  10357. // of a resource found at a URL
  10358. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10359. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10360. // includes this header. It includes the expiry-date and rule-id key value pairs
  10361. // providing object expiration information. The value of the rule-id is URL
  10362. // encoded.
  10363. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10364. // The date and time at which the object is no longer cacheable.
  10365. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10366. // Last modified date of the object
  10367. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  10368. // A map of metadata to store with the object in S3.
  10369. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10370. // This is set to the number of metadata entries not returned in x-amz-meta
  10371. // headers. This can happen if you create metadata using an API like SOAP that
  10372. // supports more flexible metadata than the REST API. For example, using SOAP,
  10373. // you can create metadata whose values are not legal HTTP headers.
  10374. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10375. // The count of parts this object has.
  10376. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10377. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10378. // If present, indicates that the requester was successfully charged for the
  10379. // request.
  10380. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10381. // Provides information about object restoration operation and expiration time
  10382. // of the restored object copy.
  10383. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  10384. // If server-side encryption with a customer-provided encryption key was requested,
  10385. // the response will include this header confirming the encryption algorithm
  10386. // used.
  10387. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10388. // If server-side encryption with a customer-provided encryption key was requested,
  10389. // the response will include this header to provide round trip message integrity
  10390. // verification of the customer-provided encryption key.
  10391. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10392. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10393. // encryption key that was used for the object.
  10394. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10395. // The Server-side encryption algorithm used when storing this object in S3
  10396. // (e.g., AES256, aws:kms).
  10397. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10398. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10399. // The number of tags, if any, on the object.
  10400. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  10401. // Version of the object.
  10402. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10403. // If the bucket is configured as a website, redirects requests for this object
  10404. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10405. // the value of this header in the object metadata.
  10406. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10407. }
  10408. // String returns the string representation
  10409. func (s GetObjectOutput) String() string {
  10410. return awsutil.Prettify(s)
  10411. }
  10412. // GoString returns the string representation
  10413. func (s GetObjectOutput) GoString() string {
  10414. return s.String()
  10415. }
  10416. // SetAcceptRanges sets the AcceptRanges field's value.
  10417. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  10418. s.AcceptRanges = &v
  10419. return s
  10420. }
  10421. // SetBody sets the Body field's value.
  10422. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  10423. s.Body = v
  10424. return s
  10425. }
  10426. // SetCacheControl sets the CacheControl field's value.
  10427. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  10428. s.CacheControl = &v
  10429. return s
  10430. }
  10431. // SetContentDisposition sets the ContentDisposition field's value.
  10432. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  10433. s.ContentDisposition = &v
  10434. return s
  10435. }
  10436. // SetContentEncoding sets the ContentEncoding field's value.
  10437. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  10438. s.ContentEncoding = &v
  10439. return s
  10440. }
  10441. // SetContentLanguage sets the ContentLanguage field's value.
  10442. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  10443. s.ContentLanguage = &v
  10444. return s
  10445. }
  10446. // SetContentLength sets the ContentLength field's value.
  10447. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  10448. s.ContentLength = &v
  10449. return s
  10450. }
  10451. // SetContentRange sets the ContentRange field's value.
  10452. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  10453. s.ContentRange = &v
  10454. return s
  10455. }
  10456. // SetContentType sets the ContentType field's value.
  10457. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  10458. s.ContentType = &v
  10459. return s
  10460. }
  10461. // SetDeleteMarker sets the DeleteMarker field's value.
  10462. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  10463. s.DeleteMarker = &v
  10464. return s
  10465. }
  10466. // SetETag sets the ETag field's value.
  10467. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  10468. s.ETag = &v
  10469. return s
  10470. }
  10471. // SetExpiration sets the Expiration field's value.
  10472. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  10473. s.Expiration = &v
  10474. return s
  10475. }
  10476. // SetExpires sets the Expires field's value.
  10477. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  10478. s.Expires = &v
  10479. return s
  10480. }
  10481. // SetLastModified sets the LastModified field's value.
  10482. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  10483. s.LastModified = &v
  10484. return s
  10485. }
  10486. // SetMetadata sets the Metadata field's value.
  10487. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  10488. s.Metadata = v
  10489. return s
  10490. }
  10491. // SetMissingMeta sets the MissingMeta field's value.
  10492. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  10493. s.MissingMeta = &v
  10494. return s
  10495. }
  10496. // SetPartsCount sets the PartsCount field's value.
  10497. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  10498. s.PartsCount = &v
  10499. return s
  10500. }
  10501. // SetReplicationStatus sets the ReplicationStatus field's value.
  10502. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  10503. s.ReplicationStatus = &v
  10504. return s
  10505. }
  10506. // SetRequestCharged sets the RequestCharged field's value.
  10507. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  10508. s.RequestCharged = &v
  10509. return s
  10510. }
  10511. // SetRestore sets the Restore field's value.
  10512. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  10513. s.Restore = &v
  10514. return s
  10515. }
  10516. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10517. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  10518. s.SSECustomerAlgorithm = &v
  10519. return s
  10520. }
  10521. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10522. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  10523. s.SSECustomerKeyMD5 = &v
  10524. return s
  10525. }
  10526. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10527. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  10528. s.SSEKMSKeyId = &v
  10529. return s
  10530. }
  10531. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10532. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  10533. s.ServerSideEncryption = &v
  10534. return s
  10535. }
  10536. // SetStorageClass sets the StorageClass field's value.
  10537. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  10538. s.StorageClass = &v
  10539. return s
  10540. }
  10541. // SetTagCount sets the TagCount field's value.
  10542. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  10543. s.TagCount = &v
  10544. return s
  10545. }
  10546. // SetVersionId sets the VersionId field's value.
  10547. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  10548. s.VersionId = &v
  10549. return s
  10550. }
  10551. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  10552. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  10553. s.WebsiteRedirectLocation = &v
  10554. return s
  10555. }
  10556. type GetObjectTaggingInput struct {
  10557. _ struct{} `type:"structure"`
  10558. // Bucket is a required field
  10559. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10560. // Key is a required field
  10561. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10562. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10563. }
  10564. // String returns the string representation
  10565. func (s GetObjectTaggingInput) String() string {
  10566. return awsutil.Prettify(s)
  10567. }
  10568. // GoString returns the string representation
  10569. func (s GetObjectTaggingInput) GoString() string {
  10570. return s.String()
  10571. }
  10572. // Validate inspects the fields of the type to determine if they are valid.
  10573. func (s *GetObjectTaggingInput) Validate() error {
  10574. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  10575. if s.Bucket == nil {
  10576. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10577. }
  10578. if s.Key == nil {
  10579. invalidParams.Add(request.NewErrParamRequired("Key"))
  10580. }
  10581. if s.Key != nil && len(*s.Key) < 1 {
  10582. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10583. }
  10584. if invalidParams.Len() > 0 {
  10585. return invalidParams
  10586. }
  10587. return nil
  10588. }
  10589. // SetBucket sets the Bucket field's value.
  10590. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  10591. s.Bucket = &v
  10592. return s
  10593. }
  10594. func (s *GetObjectTaggingInput) getBucket() (v string) {
  10595. if s.Bucket == nil {
  10596. return v
  10597. }
  10598. return *s.Bucket
  10599. }
  10600. // SetKey sets the Key field's value.
  10601. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  10602. s.Key = &v
  10603. return s
  10604. }
  10605. // SetVersionId sets the VersionId field's value.
  10606. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  10607. s.VersionId = &v
  10608. return s
  10609. }
  10610. type GetObjectTaggingOutput struct {
  10611. _ struct{} `type:"structure"`
  10612. // TagSet is a required field
  10613. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10614. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10615. }
  10616. // String returns the string representation
  10617. func (s GetObjectTaggingOutput) String() string {
  10618. return awsutil.Prettify(s)
  10619. }
  10620. // GoString returns the string representation
  10621. func (s GetObjectTaggingOutput) GoString() string {
  10622. return s.String()
  10623. }
  10624. // SetTagSet sets the TagSet field's value.
  10625. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  10626. s.TagSet = v
  10627. return s
  10628. }
  10629. // SetVersionId sets the VersionId field's value.
  10630. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  10631. s.VersionId = &v
  10632. return s
  10633. }
  10634. type GetObjectTorrentInput struct {
  10635. _ struct{} `type:"structure"`
  10636. // Bucket is a required field
  10637. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10638. // Key is a required field
  10639. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10640. // Confirms that the requester knows that she or he will be charged for the
  10641. // request. Bucket owners need not specify this parameter in their requests.
  10642. // Documentation on downloading objects from requester pays buckets can be found
  10643. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10644. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10645. }
  10646. // String returns the string representation
  10647. func (s GetObjectTorrentInput) String() string {
  10648. return awsutil.Prettify(s)
  10649. }
  10650. // GoString returns the string representation
  10651. func (s GetObjectTorrentInput) GoString() string {
  10652. return s.String()
  10653. }
  10654. // Validate inspects the fields of the type to determine if they are valid.
  10655. func (s *GetObjectTorrentInput) Validate() error {
  10656. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  10657. if s.Bucket == nil {
  10658. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10659. }
  10660. if s.Key == nil {
  10661. invalidParams.Add(request.NewErrParamRequired("Key"))
  10662. }
  10663. if s.Key != nil && len(*s.Key) < 1 {
  10664. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10665. }
  10666. if invalidParams.Len() > 0 {
  10667. return invalidParams
  10668. }
  10669. return nil
  10670. }
  10671. // SetBucket sets the Bucket field's value.
  10672. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  10673. s.Bucket = &v
  10674. return s
  10675. }
  10676. func (s *GetObjectTorrentInput) getBucket() (v string) {
  10677. if s.Bucket == nil {
  10678. return v
  10679. }
  10680. return *s.Bucket
  10681. }
  10682. // SetKey sets the Key field's value.
  10683. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  10684. s.Key = &v
  10685. return s
  10686. }
  10687. // SetRequestPayer sets the RequestPayer field's value.
  10688. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  10689. s.RequestPayer = &v
  10690. return s
  10691. }
  10692. type GetObjectTorrentOutput struct {
  10693. _ struct{} `type:"structure" payload:"Body"`
  10694. Body io.ReadCloser `type:"blob"`
  10695. // If present, indicates that the requester was successfully charged for the
  10696. // request.
  10697. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10698. }
  10699. // String returns the string representation
  10700. func (s GetObjectTorrentOutput) String() string {
  10701. return awsutil.Prettify(s)
  10702. }
  10703. // GoString returns the string representation
  10704. func (s GetObjectTorrentOutput) GoString() string {
  10705. return s.String()
  10706. }
  10707. // SetBody sets the Body field's value.
  10708. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  10709. s.Body = v
  10710. return s
  10711. }
  10712. // SetRequestCharged sets the RequestCharged field's value.
  10713. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  10714. s.RequestCharged = &v
  10715. return s
  10716. }
  10717. type GlacierJobParameters struct {
  10718. _ struct{} `type:"structure"`
  10719. // Glacier retrieval tier at which the restore will be processed.
  10720. //
  10721. // Tier is a required field
  10722. Tier *string `type:"string" required:"true" enum:"Tier"`
  10723. }
  10724. // String returns the string representation
  10725. func (s GlacierJobParameters) String() string {
  10726. return awsutil.Prettify(s)
  10727. }
  10728. // GoString returns the string representation
  10729. func (s GlacierJobParameters) GoString() string {
  10730. return s.String()
  10731. }
  10732. // Validate inspects the fields of the type to determine if they are valid.
  10733. func (s *GlacierJobParameters) Validate() error {
  10734. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  10735. if s.Tier == nil {
  10736. invalidParams.Add(request.NewErrParamRequired("Tier"))
  10737. }
  10738. if invalidParams.Len() > 0 {
  10739. return invalidParams
  10740. }
  10741. return nil
  10742. }
  10743. // SetTier sets the Tier field's value.
  10744. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  10745. s.Tier = &v
  10746. return s
  10747. }
  10748. type Grant struct {
  10749. _ struct{} `type:"structure"`
  10750. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10751. // Specifies the permission given to the grantee.
  10752. Permission *string `type:"string" enum:"Permission"`
  10753. }
  10754. // String returns the string representation
  10755. func (s Grant) String() string {
  10756. return awsutil.Prettify(s)
  10757. }
  10758. // GoString returns the string representation
  10759. func (s Grant) GoString() string {
  10760. return s.String()
  10761. }
  10762. // Validate inspects the fields of the type to determine if they are valid.
  10763. func (s *Grant) Validate() error {
  10764. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  10765. if s.Grantee != nil {
  10766. if err := s.Grantee.Validate(); err != nil {
  10767. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  10768. }
  10769. }
  10770. if invalidParams.Len() > 0 {
  10771. return invalidParams
  10772. }
  10773. return nil
  10774. }
  10775. // SetGrantee sets the Grantee field's value.
  10776. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  10777. s.Grantee = v
  10778. return s
  10779. }
  10780. // SetPermission sets the Permission field's value.
  10781. func (s *Grant) SetPermission(v string) *Grant {
  10782. s.Permission = &v
  10783. return s
  10784. }
  10785. type Grantee struct {
  10786. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10787. // Screen name of the grantee.
  10788. DisplayName *string `type:"string"`
  10789. // Email address of the grantee.
  10790. EmailAddress *string `type:"string"`
  10791. // The canonical user ID of the grantee.
  10792. ID *string `type:"string"`
  10793. // Type of grantee
  10794. //
  10795. // Type is a required field
  10796. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  10797. // URI of the grantee group.
  10798. URI *string `type:"string"`
  10799. }
  10800. // String returns the string representation
  10801. func (s Grantee) String() string {
  10802. return awsutil.Prettify(s)
  10803. }
  10804. // GoString returns the string representation
  10805. func (s Grantee) GoString() string {
  10806. return s.String()
  10807. }
  10808. // Validate inspects the fields of the type to determine if they are valid.
  10809. func (s *Grantee) Validate() error {
  10810. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  10811. if s.Type == nil {
  10812. invalidParams.Add(request.NewErrParamRequired("Type"))
  10813. }
  10814. if invalidParams.Len() > 0 {
  10815. return invalidParams
  10816. }
  10817. return nil
  10818. }
  10819. // SetDisplayName sets the DisplayName field's value.
  10820. func (s *Grantee) SetDisplayName(v string) *Grantee {
  10821. s.DisplayName = &v
  10822. return s
  10823. }
  10824. // SetEmailAddress sets the EmailAddress field's value.
  10825. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  10826. s.EmailAddress = &v
  10827. return s
  10828. }
  10829. // SetID sets the ID field's value.
  10830. func (s *Grantee) SetID(v string) *Grantee {
  10831. s.ID = &v
  10832. return s
  10833. }
  10834. // SetType sets the Type field's value.
  10835. func (s *Grantee) SetType(v string) *Grantee {
  10836. s.Type = &v
  10837. return s
  10838. }
  10839. // SetURI sets the URI field's value.
  10840. func (s *Grantee) SetURI(v string) *Grantee {
  10841. s.URI = &v
  10842. return s
  10843. }
  10844. type HeadBucketInput struct {
  10845. _ struct{} `type:"structure"`
  10846. // Bucket is a required field
  10847. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10848. }
  10849. // String returns the string representation
  10850. func (s HeadBucketInput) String() string {
  10851. return awsutil.Prettify(s)
  10852. }
  10853. // GoString returns the string representation
  10854. func (s HeadBucketInput) GoString() string {
  10855. return s.String()
  10856. }
  10857. // Validate inspects the fields of the type to determine if they are valid.
  10858. func (s *HeadBucketInput) Validate() error {
  10859. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  10860. if s.Bucket == nil {
  10861. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10862. }
  10863. if invalidParams.Len() > 0 {
  10864. return invalidParams
  10865. }
  10866. return nil
  10867. }
  10868. // SetBucket sets the Bucket field's value.
  10869. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  10870. s.Bucket = &v
  10871. return s
  10872. }
  10873. func (s *HeadBucketInput) getBucket() (v string) {
  10874. if s.Bucket == nil {
  10875. return v
  10876. }
  10877. return *s.Bucket
  10878. }
  10879. type HeadBucketOutput struct {
  10880. _ struct{} `type:"structure"`
  10881. }
  10882. // String returns the string representation
  10883. func (s HeadBucketOutput) String() string {
  10884. return awsutil.Prettify(s)
  10885. }
  10886. // GoString returns the string representation
  10887. func (s HeadBucketOutput) GoString() string {
  10888. return s.String()
  10889. }
  10890. type HeadObjectInput struct {
  10891. _ struct{} `type:"structure"`
  10892. // Bucket is a required field
  10893. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10894. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10895. // otherwise return a 412 (precondition failed).
  10896. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10897. // Return the object only if it has been modified since the specified time,
  10898. // otherwise return a 304 (not modified).
  10899. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  10900. // Return the object only if its entity tag (ETag) is different from the one
  10901. // specified, otherwise return a 304 (not modified).
  10902. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10903. // Return the object only if it has not been modified since the specified time,
  10904. // otherwise return a 412 (precondition failed).
  10905. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  10906. // Key is a required field
  10907. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10908. // Part number of the object being read. This is a positive integer between
  10909. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  10910. // Useful querying about the size of the part and the number of parts in this
  10911. // object.
  10912. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10913. // Downloads the specified range bytes of an object. For more information about
  10914. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10915. Range *string `location:"header" locationName:"Range" type:"string"`
  10916. // Confirms that the requester knows that she or he will be charged for the
  10917. // request. Bucket owners need not specify this parameter in their requests.
  10918. // Documentation on downloading objects from requester pays buckets can be found
  10919. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10920. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10921. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10922. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10923. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10924. // data. This value is used to store the object and then it is discarded; Amazon
  10925. // does not store the encryption key. The key must be appropriate for use with
  10926. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10927. // header.
  10928. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10929. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10930. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10931. // key was transmitted without error.
  10932. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10933. // VersionId used to reference a specific version of the object.
  10934. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10935. }
  10936. // String returns the string representation
  10937. func (s HeadObjectInput) String() string {
  10938. return awsutil.Prettify(s)
  10939. }
  10940. // GoString returns the string representation
  10941. func (s HeadObjectInput) GoString() string {
  10942. return s.String()
  10943. }
  10944. // Validate inspects the fields of the type to determine if they are valid.
  10945. func (s *HeadObjectInput) Validate() error {
  10946. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  10947. if s.Bucket == nil {
  10948. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10949. }
  10950. if s.Key == nil {
  10951. invalidParams.Add(request.NewErrParamRequired("Key"))
  10952. }
  10953. if s.Key != nil && len(*s.Key) < 1 {
  10954. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10955. }
  10956. if invalidParams.Len() > 0 {
  10957. return invalidParams
  10958. }
  10959. return nil
  10960. }
  10961. // SetBucket sets the Bucket field's value.
  10962. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  10963. s.Bucket = &v
  10964. return s
  10965. }
  10966. func (s *HeadObjectInput) getBucket() (v string) {
  10967. if s.Bucket == nil {
  10968. return v
  10969. }
  10970. return *s.Bucket
  10971. }
  10972. // SetIfMatch sets the IfMatch field's value.
  10973. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  10974. s.IfMatch = &v
  10975. return s
  10976. }
  10977. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10978. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  10979. s.IfModifiedSince = &v
  10980. return s
  10981. }
  10982. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10983. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  10984. s.IfNoneMatch = &v
  10985. return s
  10986. }
  10987. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10988. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  10989. s.IfUnmodifiedSince = &v
  10990. return s
  10991. }
  10992. // SetKey sets the Key field's value.
  10993. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  10994. s.Key = &v
  10995. return s
  10996. }
  10997. // SetPartNumber sets the PartNumber field's value.
  10998. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  10999. s.PartNumber = &v
  11000. return s
  11001. }
  11002. // SetRange sets the Range field's value.
  11003. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  11004. s.Range = &v
  11005. return s
  11006. }
  11007. // SetRequestPayer sets the RequestPayer field's value.
  11008. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  11009. s.RequestPayer = &v
  11010. return s
  11011. }
  11012. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11013. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  11014. s.SSECustomerAlgorithm = &v
  11015. return s
  11016. }
  11017. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11018. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  11019. s.SSECustomerKey = &v
  11020. return s
  11021. }
  11022. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  11023. if s.SSECustomerKey == nil {
  11024. return v
  11025. }
  11026. return *s.SSECustomerKey
  11027. }
  11028. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11029. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  11030. s.SSECustomerKeyMD5 = &v
  11031. return s
  11032. }
  11033. // SetVersionId sets the VersionId field's value.
  11034. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  11035. s.VersionId = &v
  11036. return s
  11037. }
  11038. type HeadObjectOutput struct {
  11039. _ struct{} `type:"structure"`
  11040. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  11041. // Specifies caching behavior along the request/reply chain.
  11042. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  11043. // Specifies presentational information for the object.
  11044. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  11045. // Specifies what content encodings have been applied to the object and thus
  11046. // what decoding mechanisms must be applied to obtain the media-type referenced
  11047. // by the Content-Type header field.
  11048. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  11049. // The language the content is in.
  11050. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  11051. // Size of the body in bytes.
  11052. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  11053. // A standard MIME type describing the format of the object data.
  11054. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  11055. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  11056. // Marker. If false, this response header does not appear in the response.
  11057. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  11058. // An ETag is an opaque identifier assigned by a web server to a specific version
  11059. // of a resource found at a URL
  11060. ETag *string `location:"header" locationName:"ETag" type:"string"`
  11061. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  11062. // includes this header. It includes the expiry-date and rule-id key value pairs
  11063. // providing object expiration information. The value of the rule-id is URL
  11064. // encoded.
  11065. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  11066. // The date and time at which the object is no longer cacheable.
  11067. Expires *string `location:"header" locationName:"Expires" type:"string"`
  11068. // Last modified date of the object
  11069. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  11070. // A map of metadata to store with the object in S3.
  11071. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  11072. // This is set to the number of metadata entries not returned in x-amz-meta
  11073. // headers. This can happen if you create metadata using an API like SOAP that
  11074. // supports more flexible metadata than the REST API. For example, using SOAP,
  11075. // you can create metadata whose values are not legal HTTP headers.
  11076. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  11077. // The count of parts this object has.
  11078. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  11079. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  11080. // If present, indicates that the requester was successfully charged for the
  11081. // request.
  11082. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11083. // Provides information about object restoration operation and expiration time
  11084. // of the restored object copy.
  11085. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  11086. // If server-side encryption with a customer-provided encryption key was requested,
  11087. // the response will include this header confirming the encryption algorithm
  11088. // used.
  11089. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11090. // If server-side encryption with a customer-provided encryption key was requested,
  11091. // the response will include this header to provide round trip message integrity
  11092. // verification of the customer-provided encryption key.
  11093. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11094. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11095. // encryption key that was used for the object.
  11096. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  11097. // The Server-side encryption algorithm used when storing this object in S3
  11098. // (e.g., AES256, aws:kms).
  11099. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11100. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  11101. // Version of the object.
  11102. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11103. // If the bucket is configured as a website, redirects requests for this object
  11104. // to another object in the same bucket or to an external URL. Amazon S3 stores
  11105. // the value of this header in the object metadata.
  11106. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  11107. }
  11108. // String returns the string representation
  11109. func (s HeadObjectOutput) String() string {
  11110. return awsutil.Prettify(s)
  11111. }
  11112. // GoString returns the string representation
  11113. func (s HeadObjectOutput) GoString() string {
  11114. return s.String()
  11115. }
  11116. // SetAcceptRanges sets the AcceptRanges field's value.
  11117. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  11118. s.AcceptRanges = &v
  11119. return s
  11120. }
  11121. // SetCacheControl sets the CacheControl field's value.
  11122. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  11123. s.CacheControl = &v
  11124. return s
  11125. }
  11126. // SetContentDisposition sets the ContentDisposition field's value.
  11127. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  11128. s.ContentDisposition = &v
  11129. return s
  11130. }
  11131. // SetContentEncoding sets the ContentEncoding field's value.
  11132. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  11133. s.ContentEncoding = &v
  11134. return s
  11135. }
  11136. // SetContentLanguage sets the ContentLanguage field's value.
  11137. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  11138. s.ContentLanguage = &v
  11139. return s
  11140. }
  11141. // SetContentLength sets the ContentLength field's value.
  11142. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  11143. s.ContentLength = &v
  11144. return s
  11145. }
  11146. // SetContentType sets the ContentType field's value.
  11147. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  11148. s.ContentType = &v
  11149. return s
  11150. }
  11151. // SetDeleteMarker sets the DeleteMarker field's value.
  11152. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  11153. s.DeleteMarker = &v
  11154. return s
  11155. }
  11156. // SetETag sets the ETag field's value.
  11157. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  11158. s.ETag = &v
  11159. return s
  11160. }
  11161. // SetExpiration sets the Expiration field's value.
  11162. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  11163. s.Expiration = &v
  11164. return s
  11165. }
  11166. // SetExpires sets the Expires field's value.
  11167. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  11168. s.Expires = &v
  11169. return s
  11170. }
  11171. // SetLastModified sets the LastModified field's value.
  11172. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  11173. s.LastModified = &v
  11174. return s
  11175. }
  11176. // SetMetadata sets the Metadata field's value.
  11177. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  11178. s.Metadata = v
  11179. return s
  11180. }
  11181. // SetMissingMeta sets the MissingMeta field's value.
  11182. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  11183. s.MissingMeta = &v
  11184. return s
  11185. }
  11186. // SetPartsCount sets the PartsCount field's value.
  11187. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  11188. s.PartsCount = &v
  11189. return s
  11190. }
  11191. // SetReplicationStatus sets the ReplicationStatus field's value.
  11192. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  11193. s.ReplicationStatus = &v
  11194. return s
  11195. }
  11196. // SetRequestCharged sets the RequestCharged field's value.
  11197. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  11198. s.RequestCharged = &v
  11199. return s
  11200. }
  11201. // SetRestore sets the Restore field's value.
  11202. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  11203. s.Restore = &v
  11204. return s
  11205. }
  11206. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11207. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  11208. s.SSECustomerAlgorithm = &v
  11209. return s
  11210. }
  11211. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11212. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  11213. s.SSECustomerKeyMD5 = &v
  11214. return s
  11215. }
  11216. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11217. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  11218. s.SSEKMSKeyId = &v
  11219. return s
  11220. }
  11221. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11222. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  11223. s.ServerSideEncryption = &v
  11224. return s
  11225. }
  11226. // SetStorageClass sets the StorageClass field's value.
  11227. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  11228. s.StorageClass = &v
  11229. return s
  11230. }
  11231. // SetVersionId sets the VersionId field's value.
  11232. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  11233. s.VersionId = &v
  11234. return s
  11235. }
  11236. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  11237. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  11238. s.WebsiteRedirectLocation = &v
  11239. return s
  11240. }
  11241. type IndexDocument struct {
  11242. _ struct{} `type:"structure"`
  11243. // A suffix that is appended to a request that is for a directory on the website
  11244. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  11245. // the data that is returned will be for the object with the key name images/index.html)
  11246. // The suffix must not be empty and must not include a slash character.
  11247. //
  11248. // Suffix is a required field
  11249. Suffix *string `type:"string" required:"true"`
  11250. }
  11251. // String returns the string representation
  11252. func (s IndexDocument) String() string {
  11253. return awsutil.Prettify(s)
  11254. }
  11255. // GoString returns the string representation
  11256. func (s IndexDocument) GoString() string {
  11257. return s.String()
  11258. }
  11259. // Validate inspects the fields of the type to determine if they are valid.
  11260. func (s *IndexDocument) Validate() error {
  11261. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  11262. if s.Suffix == nil {
  11263. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  11264. }
  11265. if invalidParams.Len() > 0 {
  11266. return invalidParams
  11267. }
  11268. return nil
  11269. }
  11270. // SetSuffix sets the Suffix field's value.
  11271. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  11272. s.Suffix = &v
  11273. return s
  11274. }
  11275. type Initiator struct {
  11276. _ struct{} `type:"structure"`
  11277. // Name of the Principal.
  11278. DisplayName *string `type:"string"`
  11279. // If the principal is an AWS account, it provides the Canonical User ID. If
  11280. // the principal is an IAM User, it provides a user ARN value.
  11281. ID *string `type:"string"`
  11282. }
  11283. // String returns the string representation
  11284. func (s Initiator) String() string {
  11285. return awsutil.Prettify(s)
  11286. }
  11287. // GoString returns the string representation
  11288. func (s Initiator) GoString() string {
  11289. return s.String()
  11290. }
  11291. // SetDisplayName sets the DisplayName field's value.
  11292. func (s *Initiator) SetDisplayName(v string) *Initiator {
  11293. s.DisplayName = &v
  11294. return s
  11295. }
  11296. // SetID sets the ID field's value.
  11297. func (s *Initiator) SetID(v string) *Initiator {
  11298. s.ID = &v
  11299. return s
  11300. }
  11301. // Describes the serialization format of the object.
  11302. type InputSerialization struct {
  11303. _ struct{} `type:"structure"`
  11304. // Describes the serialization of a CSV-encoded object.
  11305. CSV *CSVInput `type:"structure"`
  11306. // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
  11307. // Value: NONE.
  11308. CompressionType *string `type:"string" enum:"CompressionType"`
  11309. // Specifies JSON as object's input serialization format.
  11310. JSON *JSONInput `type:"structure"`
  11311. // Specifies Parquet as object's input serialization format.
  11312. Parquet *ParquetInput `type:"structure"`
  11313. }
  11314. // String returns the string representation
  11315. func (s InputSerialization) String() string {
  11316. return awsutil.Prettify(s)
  11317. }
  11318. // GoString returns the string representation
  11319. func (s InputSerialization) GoString() string {
  11320. return s.String()
  11321. }
  11322. // SetCSV sets the CSV field's value.
  11323. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  11324. s.CSV = v
  11325. return s
  11326. }
  11327. // SetCompressionType sets the CompressionType field's value.
  11328. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  11329. s.CompressionType = &v
  11330. return s
  11331. }
  11332. // SetJSON sets the JSON field's value.
  11333. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  11334. s.JSON = v
  11335. return s
  11336. }
  11337. // SetParquet sets the Parquet field's value.
  11338. func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
  11339. s.Parquet = v
  11340. return s
  11341. }
  11342. type InventoryConfiguration struct {
  11343. _ struct{} `type:"structure"`
  11344. // Contains information about where to publish the inventory results.
  11345. //
  11346. // Destination is a required field
  11347. Destination *InventoryDestination `type:"structure" required:"true"`
  11348. // Specifies an inventory filter. The inventory only includes objects that meet
  11349. // the filter's criteria.
  11350. Filter *InventoryFilter `type:"structure"`
  11351. // The ID used to identify the inventory configuration.
  11352. //
  11353. // Id is a required field
  11354. Id *string `type:"string" required:"true"`
  11355. // Specifies which object version(s) to included in the inventory results.
  11356. //
  11357. // IncludedObjectVersions is a required field
  11358. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  11359. // Specifies whether the inventory is enabled or disabled.
  11360. //
  11361. // IsEnabled is a required field
  11362. IsEnabled *bool `type:"boolean" required:"true"`
  11363. // Contains the optional fields that are included in the inventory results.
  11364. OptionalFields []*string `locationNameList:"Field" type:"list"`
  11365. // Specifies the schedule for generating inventory results.
  11366. //
  11367. // Schedule is a required field
  11368. Schedule *InventorySchedule `type:"structure" required:"true"`
  11369. }
  11370. // String returns the string representation
  11371. func (s InventoryConfiguration) String() string {
  11372. return awsutil.Prettify(s)
  11373. }
  11374. // GoString returns the string representation
  11375. func (s InventoryConfiguration) GoString() string {
  11376. return s.String()
  11377. }
  11378. // Validate inspects the fields of the type to determine if they are valid.
  11379. func (s *InventoryConfiguration) Validate() error {
  11380. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  11381. if s.Destination == nil {
  11382. invalidParams.Add(request.NewErrParamRequired("Destination"))
  11383. }
  11384. if s.Id == nil {
  11385. invalidParams.Add(request.NewErrParamRequired("Id"))
  11386. }
  11387. if s.IncludedObjectVersions == nil {
  11388. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  11389. }
  11390. if s.IsEnabled == nil {
  11391. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  11392. }
  11393. if s.Schedule == nil {
  11394. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  11395. }
  11396. if s.Destination != nil {
  11397. if err := s.Destination.Validate(); err != nil {
  11398. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  11399. }
  11400. }
  11401. if s.Filter != nil {
  11402. if err := s.Filter.Validate(); err != nil {
  11403. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11404. }
  11405. }
  11406. if s.Schedule != nil {
  11407. if err := s.Schedule.Validate(); err != nil {
  11408. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  11409. }
  11410. }
  11411. if invalidParams.Len() > 0 {
  11412. return invalidParams
  11413. }
  11414. return nil
  11415. }
  11416. // SetDestination sets the Destination field's value.
  11417. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  11418. s.Destination = v
  11419. return s
  11420. }
  11421. // SetFilter sets the Filter field's value.
  11422. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  11423. s.Filter = v
  11424. return s
  11425. }
  11426. // SetId sets the Id field's value.
  11427. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  11428. s.Id = &v
  11429. return s
  11430. }
  11431. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  11432. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  11433. s.IncludedObjectVersions = &v
  11434. return s
  11435. }
  11436. // SetIsEnabled sets the IsEnabled field's value.
  11437. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  11438. s.IsEnabled = &v
  11439. return s
  11440. }
  11441. // SetOptionalFields sets the OptionalFields field's value.
  11442. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  11443. s.OptionalFields = v
  11444. return s
  11445. }
  11446. // SetSchedule sets the Schedule field's value.
  11447. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  11448. s.Schedule = v
  11449. return s
  11450. }
  11451. type InventoryDestination struct {
  11452. _ struct{} `type:"structure"`
  11453. // Contains the bucket name, file format, bucket owner (optional), and prefix
  11454. // (optional) where inventory results are published.
  11455. //
  11456. // S3BucketDestination is a required field
  11457. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  11458. }
  11459. // String returns the string representation
  11460. func (s InventoryDestination) String() string {
  11461. return awsutil.Prettify(s)
  11462. }
  11463. // GoString returns the string representation
  11464. func (s InventoryDestination) GoString() string {
  11465. return s.String()
  11466. }
  11467. // Validate inspects the fields of the type to determine if they are valid.
  11468. func (s *InventoryDestination) Validate() error {
  11469. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  11470. if s.S3BucketDestination == nil {
  11471. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  11472. }
  11473. if s.S3BucketDestination != nil {
  11474. if err := s.S3BucketDestination.Validate(); err != nil {
  11475. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  11476. }
  11477. }
  11478. if invalidParams.Len() > 0 {
  11479. return invalidParams
  11480. }
  11481. return nil
  11482. }
  11483. // SetS3BucketDestination sets the S3BucketDestination field's value.
  11484. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  11485. s.S3BucketDestination = v
  11486. return s
  11487. }
  11488. // Contains the type of server-side encryption used to encrypt the inventory
  11489. // results.
  11490. type InventoryEncryption struct {
  11491. _ struct{} `type:"structure"`
  11492. // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
  11493. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  11494. // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
  11495. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  11496. }
  11497. // String returns the string representation
  11498. func (s InventoryEncryption) String() string {
  11499. return awsutil.Prettify(s)
  11500. }
  11501. // GoString returns the string representation
  11502. func (s InventoryEncryption) GoString() string {
  11503. return s.String()
  11504. }
  11505. // Validate inspects the fields of the type to determine if they are valid.
  11506. func (s *InventoryEncryption) Validate() error {
  11507. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  11508. if s.SSEKMS != nil {
  11509. if err := s.SSEKMS.Validate(); err != nil {
  11510. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  11511. }
  11512. }
  11513. if invalidParams.Len() > 0 {
  11514. return invalidParams
  11515. }
  11516. return nil
  11517. }
  11518. // SetSSEKMS sets the SSEKMS field's value.
  11519. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  11520. s.SSEKMS = v
  11521. return s
  11522. }
  11523. // SetSSES3 sets the SSES3 field's value.
  11524. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  11525. s.SSES3 = v
  11526. return s
  11527. }
  11528. type InventoryFilter struct {
  11529. _ struct{} `type:"structure"`
  11530. // The prefix that an object must have to be included in the inventory results.
  11531. //
  11532. // Prefix is a required field
  11533. Prefix *string `type:"string" required:"true"`
  11534. }
  11535. // String returns the string representation
  11536. func (s InventoryFilter) String() string {
  11537. return awsutil.Prettify(s)
  11538. }
  11539. // GoString returns the string representation
  11540. func (s InventoryFilter) GoString() string {
  11541. return s.String()
  11542. }
  11543. // Validate inspects the fields of the type to determine if they are valid.
  11544. func (s *InventoryFilter) Validate() error {
  11545. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  11546. if s.Prefix == nil {
  11547. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  11548. }
  11549. if invalidParams.Len() > 0 {
  11550. return invalidParams
  11551. }
  11552. return nil
  11553. }
  11554. // SetPrefix sets the Prefix field's value.
  11555. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  11556. s.Prefix = &v
  11557. return s
  11558. }
  11559. type InventoryS3BucketDestination struct {
  11560. _ struct{} `type:"structure"`
  11561. // The ID of the account that owns the destination bucket.
  11562. AccountId *string `type:"string"`
  11563. // The Amazon resource name (ARN) of the bucket where inventory results will
  11564. // be published.
  11565. //
  11566. // Bucket is a required field
  11567. Bucket *string `type:"string" required:"true"`
  11568. // Contains the type of server-side encryption used to encrypt the inventory
  11569. // results.
  11570. Encryption *InventoryEncryption `type:"structure"`
  11571. // Specifies the output format of the inventory results.
  11572. //
  11573. // Format is a required field
  11574. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  11575. // The prefix that is prepended to all inventory results.
  11576. Prefix *string `type:"string"`
  11577. }
  11578. // String returns the string representation
  11579. func (s InventoryS3BucketDestination) String() string {
  11580. return awsutil.Prettify(s)
  11581. }
  11582. // GoString returns the string representation
  11583. func (s InventoryS3BucketDestination) GoString() string {
  11584. return s.String()
  11585. }
  11586. // Validate inspects the fields of the type to determine if they are valid.
  11587. func (s *InventoryS3BucketDestination) Validate() error {
  11588. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  11589. if s.Bucket == nil {
  11590. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11591. }
  11592. if s.Format == nil {
  11593. invalidParams.Add(request.NewErrParamRequired("Format"))
  11594. }
  11595. if s.Encryption != nil {
  11596. if err := s.Encryption.Validate(); err != nil {
  11597. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  11598. }
  11599. }
  11600. if invalidParams.Len() > 0 {
  11601. return invalidParams
  11602. }
  11603. return nil
  11604. }
  11605. // SetAccountId sets the AccountId field's value.
  11606. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  11607. s.AccountId = &v
  11608. return s
  11609. }
  11610. // SetBucket sets the Bucket field's value.
  11611. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  11612. s.Bucket = &v
  11613. return s
  11614. }
  11615. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  11616. if s.Bucket == nil {
  11617. return v
  11618. }
  11619. return *s.Bucket
  11620. }
  11621. // SetEncryption sets the Encryption field's value.
  11622. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  11623. s.Encryption = v
  11624. return s
  11625. }
  11626. // SetFormat sets the Format field's value.
  11627. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  11628. s.Format = &v
  11629. return s
  11630. }
  11631. // SetPrefix sets the Prefix field's value.
  11632. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  11633. s.Prefix = &v
  11634. return s
  11635. }
  11636. type InventorySchedule struct {
  11637. _ struct{} `type:"structure"`
  11638. // Specifies how frequently inventory results are produced.
  11639. //
  11640. // Frequency is a required field
  11641. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  11642. }
  11643. // String returns the string representation
  11644. func (s InventorySchedule) String() string {
  11645. return awsutil.Prettify(s)
  11646. }
  11647. // GoString returns the string representation
  11648. func (s InventorySchedule) GoString() string {
  11649. return s.String()
  11650. }
  11651. // Validate inspects the fields of the type to determine if they are valid.
  11652. func (s *InventorySchedule) Validate() error {
  11653. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  11654. if s.Frequency == nil {
  11655. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  11656. }
  11657. if invalidParams.Len() > 0 {
  11658. return invalidParams
  11659. }
  11660. return nil
  11661. }
  11662. // SetFrequency sets the Frequency field's value.
  11663. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  11664. s.Frequency = &v
  11665. return s
  11666. }
  11667. type JSONInput struct {
  11668. _ struct{} `type:"structure"`
  11669. // The type of JSON. Valid values: Document, Lines.
  11670. Type *string `type:"string" enum:"JSONType"`
  11671. }
  11672. // String returns the string representation
  11673. func (s JSONInput) String() string {
  11674. return awsutil.Prettify(s)
  11675. }
  11676. // GoString returns the string representation
  11677. func (s JSONInput) GoString() string {
  11678. return s.String()
  11679. }
  11680. // SetType sets the Type field's value.
  11681. func (s *JSONInput) SetType(v string) *JSONInput {
  11682. s.Type = &v
  11683. return s
  11684. }
  11685. type JSONOutput struct {
  11686. _ struct{} `type:"structure"`
  11687. // The value used to separate individual records in the output.
  11688. RecordDelimiter *string `type:"string"`
  11689. }
  11690. // String returns the string representation
  11691. func (s JSONOutput) String() string {
  11692. return awsutil.Prettify(s)
  11693. }
  11694. // GoString returns the string representation
  11695. func (s JSONOutput) GoString() string {
  11696. return s.String()
  11697. }
  11698. // SetRecordDelimiter sets the RecordDelimiter field's value.
  11699. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  11700. s.RecordDelimiter = &v
  11701. return s
  11702. }
  11703. // Container for object key name prefix and suffix filtering rules.
  11704. type KeyFilter struct {
  11705. _ struct{} `type:"structure"`
  11706. // A list of containers for key value pair that defines the criteria for the
  11707. // filter rule.
  11708. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  11709. }
  11710. // String returns the string representation
  11711. func (s KeyFilter) String() string {
  11712. return awsutil.Prettify(s)
  11713. }
  11714. // GoString returns the string representation
  11715. func (s KeyFilter) GoString() string {
  11716. return s.String()
  11717. }
  11718. // SetFilterRules sets the FilterRules field's value.
  11719. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  11720. s.FilterRules = v
  11721. return s
  11722. }
  11723. // Container for specifying the AWS Lambda notification configuration.
  11724. type LambdaFunctionConfiguration struct {
  11725. _ struct{} `type:"structure"`
  11726. // Events is a required field
  11727. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  11728. // Container for object key name filtering rules. For information about key
  11729. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  11730. // in the Amazon Simple Storage Service Developer Guide.
  11731. Filter *NotificationConfigurationFilter `type:"structure"`
  11732. // Optional unique identifier for configurations in a notification configuration.
  11733. // If you don't provide one, Amazon S3 will assign an ID.
  11734. Id *string `type:"string"`
  11735. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  11736. // of the specified type.
  11737. //
  11738. // LambdaFunctionArn is a required field
  11739. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  11740. }
  11741. // String returns the string representation
  11742. func (s LambdaFunctionConfiguration) String() string {
  11743. return awsutil.Prettify(s)
  11744. }
  11745. // GoString returns the string representation
  11746. func (s LambdaFunctionConfiguration) GoString() string {
  11747. return s.String()
  11748. }
  11749. // Validate inspects the fields of the type to determine if they are valid.
  11750. func (s *LambdaFunctionConfiguration) Validate() error {
  11751. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  11752. if s.Events == nil {
  11753. invalidParams.Add(request.NewErrParamRequired("Events"))
  11754. }
  11755. if s.LambdaFunctionArn == nil {
  11756. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  11757. }
  11758. if invalidParams.Len() > 0 {
  11759. return invalidParams
  11760. }
  11761. return nil
  11762. }
  11763. // SetEvents sets the Events field's value.
  11764. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  11765. s.Events = v
  11766. return s
  11767. }
  11768. // SetFilter sets the Filter field's value.
  11769. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  11770. s.Filter = v
  11771. return s
  11772. }
  11773. // SetId sets the Id field's value.
  11774. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  11775. s.Id = &v
  11776. return s
  11777. }
  11778. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  11779. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  11780. s.LambdaFunctionArn = &v
  11781. return s
  11782. }
  11783. type LifecycleConfiguration struct {
  11784. _ struct{} `type:"structure"`
  11785. // Rules is a required field
  11786. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  11787. }
  11788. // String returns the string representation
  11789. func (s LifecycleConfiguration) String() string {
  11790. return awsutil.Prettify(s)
  11791. }
  11792. // GoString returns the string representation
  11793. func (s LifecycleConfiguration) GoString() string {
  11794. return s.String()
  11795. }
  11796. // Validate inspects the fields of the type to determine if they are valid.
  11797. func (s *LifecycleConfiguration) Validate() error {
  11798. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  11799. if s.Rules == nil {
  11800. invalidParams.Add(request.NewErrParamRequired("Rules"))
  11801. }
  11802. if s.Rules != nil {
  11803. for i, v := range s.Rules {
  11804. if v == nil {
  11805. continue
  11806. }
  11807. if err := v.Validate(); err != nil {
  11808. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  11809. }
  11810. }
  11811. }
  11812. if invalidParams.Len() > 0 {
  11813. return invalidParams
  11814. }
  11815. return nil
  11816. }
  11817. // SetRules sets the Rules field's value.
  11818. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  11819. s.Rules = v
  11820. return s
  11821. }
  11822. type LifecycleExpiration struct {
  11823. _ struct{} `type:"structure"`
  11824. // Indicates at what date the object is to be moved or deleted. Should be in
  11825. // GMT ISO 8601 Format.
  11826. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  11827. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  11828. // The value must be a non-zero positive integer.
  11829. Days *int64 `type:"integer"`
  11830. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  11831. // versions. If set to true, the delete marker will be expired; if set to false
  11832. // the policy takes no action. This cannot be specified with Days or Date in
  11833. // a Lifecycle Expiration Policy.
  11834. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  11835. }
  11836. // String returns the string representation
  11837. func (s LifecycleExpiration) String() string {
  11838. return awsutil.Prettify(s)
  11839. }
  11840. // GoString returns the string representation
  11841. func (s LifecycleExpiration) GoString() string {
  11842. return s.String()
  11843. }
  11844. // SetDate sets the Date field's value.
  11845. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  11846. s.Date = &v
  11847. return s
  11848. }
  11849. // SetDays sets the Days field's value.
  11850. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  11851. s.Days = &v
  11852. return s
  11853. }
  11854. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  11855. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  11856. s.ExpiredObjectDeleteMarker = &v
  11857. return s
  11858. }
  11859. type LifecycleRule struct {
  11860. _ struct{} `type:"structure"`
  11861. // Specifies the days since the initiation of an Incomplete Multipart Upload
  11862. // that Lifecycle will wait before permanently removing all parts of the upload.
  11863. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  11864. Expiration *LifecycleExpiration `type:"structure"`
  11865. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11866. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11867. Filter *LifecycleRuleFilter `type:"structure"`
  11868. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  11869. ID *string `type:"string"`
  11870. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  11871. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  11872. // configuration action on a bucket that has versioning enabled (or suspended)
  11873. // to request that Amazon S3 delete noncurrent object versions at a specific
  11874. // period in the object's lifetime.
  11875. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  11876. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  11877. // Prefix identifying one or more objects to which the rule applies. This is
  11878. // deprecated; use Filter instead.
  11879. //
  11880. // Deprecated: Prefix has been deprecated
  11881. Prefix *string `deprecated:"true" type:"string"`
  11882. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  11883. // is not currently being applied.
  11884. //
  11885. // Status is a required field
  11886. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  11887. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  11888. }
  11889. // String returns the string representation
  11890. func (s LifecycleRule) String() string {
  11891. return awsutil.Prettify(s)
  11892. }
  11893. // GoString returns the string representation
  11894. func (s LifecycleRule) GoString() string {
  11895. return s.String()
  11896. }
  11897. // Validate inspects the fields of the type to determine if they are valid.
  11898. func (s *LifecycleRule) Validate() error {
  11899. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  11900. if s.Status == nil {
  11901. invalidParams.Add(request.NewErrParamRequired("Status"))
  11902. }
  11903. if s.Filter != nil {
  11904. if err := s.Filter.Validate(); err != nil {
  11905. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11906. }
  11907. }
  11908. if invalidParams.Len() > 0 {
  11909. return invalidParams
  11910. }
  11911. return nil
  11912. }
  11913. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  11914. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  11915. s.AbortIncompleteMultipartUpload = v
  11916. return s
  11917. }
  11918. // SetExpiration sets the Expiration field's value.
  11919. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  11920. s.Expiration = v
  11921. return s
  11922. }
  11923. // SetFilter sets the Filter field's value.
  11924. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  11925. s.Filter = v
  11926. return s
  11927. }
  11928. // SetID sets the ID field's value.
  11929. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  11930. s.ID = &v
  11931. return s
  11932. }
  11933. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  11934. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  11935. s.NoncurrentVersionExpiration = v
  11936. return s
  11937. }
  11938. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  11939. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  11940. s.NoncurrentVersionTransitions = v
  11941. return s
  11942. }
  11943. // SetPrefix sets the Prefix field's value.
  11944. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  11945. s.Prefix = &v
  11946. return s
  11947. }
  11948. // SetStatus sets the Status field's value.
  11949. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  11950. s.Status = &v
  11951. return s
  11952. }
  11953. // SetTransitions sets the Transitions field's value.
  11954. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  11955. s.Transitions = v
  11956. return s
  11957. }
  11958. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11959. // more predicates. The Lifecycle Rule will apply to any object matching all
  11960. // of the predicates configured inside the And operator.
  11961. type LifecycleRuleAndOperator struct {
  11962. _ struct{} `type:"structure"`
  11963. Prefix *string `type:"string"`
  11964. // All of these tags must exist in the object's tag set in order for the rule
  11965. // to apply.
  11966. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  11967. }
  11968. // String returns the string representation
  11969. func (s LifecycleRuleAndOperator) String() string {
  11970. return awsutil.Prettify(s)
  11971. }
  11972. // GoString returns the string representation
  11973. func (s LifecycleRuleAndOperator) GoString() string {
  11974. return s.String()
  11975. }
  11976. // Validate inspects the fields of the type to determine if they are valid.
  11977. func (s *LifecycleRuleAndOperator) Validate() error {
  11978. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  11979. if s.Tags != nil {
  11980. for i, v := range s.Tags {
  11981. if v == nil {
  11982. continue
  11983. }
  11984. if err := v.Validate(); err != nil {
  11985. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  11986. }
  11987. }
  11988. }
  11989. if invalidParams.Len() > 0 {
  11990. return invalidParams
  11991. }
  11992. return nil
  11993. }
  11994. // SetPrefix sets the Prefix field's value.
  11995. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  11996. s.Prefix = &v
  11997. return s
  11998. }
  11999. // SetTags sets the Tags field's value.
  12000. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  12001. s.Tags = v
  12002. return s
  12003. }
  12004. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  12005. // A Filter must have exactly one of Prefix, Tag, or And specified.
  12006. type LifecycleRuleFilter struct {
  12007. _ struct{} `type:"structure"`
  12008. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  12009. // more predicates. The Lifecycle Rule will apply to any object matching all
  12010. // of the predicates configured inside the And operator.
  12011. And *LifecycleRuleAndOperator `type:"structure"`
  12012. // Prefix identifying one or more objects to which the rule applies.
  12013. Prefix *string `type:"string"`
  12014. // This tag must exist in the object's tag set in order for the rule to apply.
  12015. Tag *Tag `type:"structure"`
  12016. }
  12017. // String returns the string representation
  12018. func (s LifecycleRuleFilter) String() string {
  12019. return awsutil.Prettify(s)
  12020. }
  12021. // GoString returns the string representation
  12022. func (s LifecycleRuleFilter) GoString() string {
  12023. return s.String()
  12024. }
  12025. // Validate inspects the fields of the type to determine if they are valid.
  12026. func (s *LifecycleRuleFilter) Validate() error {
  12027. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  12028. if s.And != nil {
  12029. if err := s.And.Validate(); err != nil {
  12030. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  12031. }
  12032. }
  12033. if s.Tag != nil {
  12034. if err := s.Tag.Validate(); err != nil {
  12035. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  12036. }
  12037. }
  12038. if invalidParams.Len() > 0 {
  12039. return invalidParams
  12040. }
  12041. return nil
  12042. }
  12043. // SetAnd sets the And field's value.
  12044. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  12045. s.And = v
  12046. return s
  12047. }
  12048. // SetPrefix sets the Prefix field's value.
  12049. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  12050. s.Prefix = &v
  12051. return s
  12052. }
  12053. // SetTag sets the Tag field's value.
  12054. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  12055. s.Tag = v
  12056. return s
  12057. }
  12058. type ListBucketAnalyticsConfigurationsInput struct {
  12059. _ struct{} `type:"structure"`
  12060. // The name of the bucket from which analytics configurations are retrieved.
  12061. //
  12062. // Bucket is a required field
  12063. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12064. // The ContinuationToken that represents a placeholder from where this request
  12065. // should begin.
  12066. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12067. }
  12068. // String returns the string representation
  12069. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  12070. return awsutil.Prettify(s)
  12071. }
  12072. // GoString returns the string representation
  12073. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  12074. return s.String()
  12075. }
  12076. // Validate inspects the fields of the type to determine if they are valid.
  12077. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  12078. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  12079. if s.Bucket == nil {
  12080. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12081. }
  12082. if invalidParams.Len() > 0 {
  12083. return invalidParams
  12084. }
  12085. return nil
  12086. }
  12087. // SetBucket sets the Bucket field's value.
  12088. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  12089. s.Bucket = &v
  12090. return s
  12091. }
  12092. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  12093. if s.Bucket == nil {
  12094. return v
  12095. }
  12096. return *s.Bucket
  12097. }
  12098. // SetContinuationToken sets the ContinuationToken field's value.
  12099. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  12100. s.ContinuationToken = &v
  12101. return s
  12102. }
  12103. type ListBucketAnalyticsConfigurationsOutput struct {
  12104. _ struct{} `type:"structure"`
  12105. // The list of analytics configurations for a bucket.
  12106. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  12107. // The ContinuationToken that represents where this request began.
  12108. ContinuationToken *string `type:"string"`
  12109. // Indicates whether the returned list of analytics configurations is complete.
  12110. // A value of true indicates that the list is not complete and the NextContinuationToken
  12111. // will be provided for a subsequent request.
  12112. IsTruncated *bool `type:"boolean"`
  12113. // NextContinuationToken is sent when isTruncated is true, which indicates that
  12114. // there are more analytics configurations to list. The next request must include
  12115. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  12116. NextContinuationToken *string `type:"string"`
  12117. }
  12118. // String returns the string representation
  12119. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  12120. return awsutil.Prettify(s)
  12121. }
  12122. // GoString returns the string representation
  12123. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  12124. return s.String()
  12125. }
  12126. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  12127. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  12128. s.AnalyticsConfigurationList = v
  12129. return s
  12130. }
  12131. // SetContinuationToken sets the ContinuationToken field's value.
  12132. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  12133. s.ContinuationToken = &v
  12134. return s
  12135. }
  12136. // SetIsTruncated sets the IsTruncated field's value.
  12137. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  12138. s.IsTruncated = &v
  12139. return s
  12140. }
  12141. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12142. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  12143. s.NextContinuationToken = &v
  12144. return s
  12145. }
  12146. type ListBucketInventoryConfigurationsInput struct {
  12147. _ struct{} `type:"structure"`
  12148. // The name of the bucket containing the inventory configurations to retrieve.
  12149. //
  12150. // Bucket is a required field
  12151. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12152. // The marker used to continue an inventory configuration listing that has been
  12153. // truncated. Use the NextContinuationToken from a previously truncated list
  12154. // response to continue the listing. The continuation token is an opaque value
  12155. // that Amazon S3 understands.
  12156. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12157. }
  12158. // String returns the string representation
  12159. func (s ListBucketInventoryConfigurationsInput) String() string {
  12160. return awsutil.Prettify(s)
  12161. }
  12162. // GoString returns the string representation
  12163. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  12164. return s.String()
  12165. }
  12166. // Validate inspects the fields of the type to determine if they are valid.
  12167. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  12168. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  12169. if s.Bucket == nil {
  12170. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12171. }
  12172. if invalidParams.Len() > 0 {
  12173. return invalidParams
  12174. }
  12175. return nil
  12176. }
  12177. // SetBucket sets the Bucket field's value.
  12178. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  12179. s.Bucket = &v
  12180. return s
  12181. }
  12182. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  12183. if s.Bucket == nil {
  12184. return v
  12185. }
  12186. return *s.Bucket
  12187. }
  12188. // SetContinuationToken sets the ContinuationToken field's value.
  12189. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  12190. s.ContinuationToken = &v
  12191. return s
  12192. }
  12193. type ListBucketInventoryConfigurationsOutput struct {
  12194. _ struct{} `type:"structure"`
  12195. // If sent in the request, the marker that is used as a starting point for this
  12196. // inventory configuration list response.
  12197. ContinuationToken *string `type:"string"`
  12198. // The list of inventory configurations for a bucket.
  12199. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  12200. // Indicates whether the returned list of inventory configurations is truncated
  12201. // in this response. A value of true indicates that the list is truncated.
  12202. IsTruncated *bool `type:"boolean"`
  12203. // The marker used to continue this inventory configuration listing. Use the
  12204. // NextContinuationToken from this response to continue the listing in a subsequent
  12205. // request. The continuation token is an opaque value that Amazon S3 understands.
  12206. NextContinuationToken *string `type:"string"`
  12207. }
  12208. // String returns the string representation
  12209. func (s ListBucketInventoryConfigurationsOutput) String() string {
  12210. return awsutil.Prettify(s)
  12211. }
  12212. // GoString returns the string representation
  12213. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  12214. return s.String()
  12215. }
  12216. // SetContinuationToken sets the ContinuationToken field's value.
  12217. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  12218. s.ContinuationToken = &v
  12219. return s
  12220. }
  12221. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  12222. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  12223. s.InventoryConfigurationList = v
  12224. return s
  12225. }
  12226. // SetIsTruncated sets the IsTruncated field's value.
  12227. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  12228. s.IsTruncated = &v
  12229. return s
  12230. }
  12231. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12232. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  12233. s.NextContinuationToken = &v
  12234. return s
  12235. }
  12236. type ListBucketMetricsConfigurationsInput struct {
  12237. _ struct{} `type:"structure"`
  12238. // The name of the bucket containing the metrics configurations to retrieve.
  12239. //
  12240. // Bucket is a required field
  12241. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12242. // The marker that is used to continue a metrics configuration listing that
  12243. // has been truncated. Use the NextContinuationToken from a previously truncated
  12244. // list response to continue the listing. The continuation token is an opaque
  12245. // value that Amazon S3 understands.
  12246. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12247. }
  12248. // String returns the string representation
  12249. func (s ListBucketMetricsConfigurationsInput) String() string {
  12250. return awsutil.Prettify(s)
  12251. }
  12252. // GoString returns the string representation
  12253. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  12254. return s.String()
  12255. }
  12256. // Validate inspects the fields of the type to determine if they are valid.
  12257. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  12258. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  12259. if s.Bucket == nil {
  12260. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12261. }
  12262. if invalidParams.Len() > 0 {
  12263. return invalidParams
  12264. }
  12265. return nil
  12266. }
  12267. // SetBucket sets the Bucket field's value.
  12268. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  12269. s.Bucket = &v
  12270. return s
  12271. }
  12272. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  12273. if s.Bucket == nil {
  12274. return v
  12275. }
  12276. return *s.Bucket
  12277. }
  12278. // SetContinuationToken sets the ContinuationToken field's value.
  12279. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  12280. s.ContinuationToken = &v
  12281. return s
  12282. }
  12283. type ListBucketMetricsConfigurationsOutput struct {
  12284. _ struct{} `type:"structure"`
  12285. // The marker that is used as a starting point for this metrics configuration
  12286. // list response. This value is present if it was sent in the request.
  12287. ContinuationToken *string `type:"string"`
  12288. // Indicates whether the returned list of metrics configurations is complete.
  12289. // A value of true indicates that the list is not complete and the NextContinuationToken
  12290. // will be provided for a subsequent request.
  12291. IsTruncated *bool `type:"boolean"`
  12292. // The list of metrics configurations for a bucket.
  12293. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  12294. // The marker used to continue a metrics configuration listing that has been
  12295. // truncated. Use the NextContinuationToken from a previously truncated list
  12296. // response to continue the listing. The continuation token is an opaque value
  12297. // that Amazon S3 understands.
  12298. NextContinuationToken *string `type:"string"`
  12299. }
  12300. // String returns the string representation
  12301. func (s ListBucketMetricsConfigurationsOutput) String() string {
  12302. return awsutil.Prettify(s)
  12303. }
  12304. // GoString returns the string representation
  12305. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  12306. return s.String()
  12307. }
  12308. // SetContinuationToken sets the ContinuationToken field's value.
  12309. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  12310. s.ContinuationToken = &v
  12311. return s
  12312. }
  12313. // SetIsTruncated sets the IsTruncated field's value.
  12314. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  12315. s.IsTruncated = &v
  12316. return s
  12317. }
  12318. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  12319. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  12320. s.MetricsConfigurationList = v
  12321. return s
  12322. }
  12323. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12324. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  12325. s.NextContinuationToken = &v
  12326. return s
  12327. }
  12328. type ListBucketsInput struct {
  12329. _ struct{} `type:"structure"`
  12330. }
  12331. // String returns the string representation
  12332. func (s ListBucketsInput) String() string {
  12333. return awsutil.Prettify(s)
  12334. }
  12335. // GoString returns the string representation
  12336. func (s ListBucketsInput) GoString() string {
  12337. return s.String()
  12338. }
  12339. type ListBucketsOutput struct {
  12340. _ struct{} `type:"structure"`
  12341. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  12342. Owner *Owner `type:"structure"`
  12343. }
  12344. // String returns the string representation
  12345. func (s ListBucketsOutput) String() string {
  12346. return awsutil.Prettify(s)
  12347. }
  12348. // GoString returns the string representation
  12349. func (s ListBucketsOutput) GoString() string {
  12350. return s.String()
  12351. }
  12352. // SetBuckets sets the Buckets field's value.
  12353. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  12354. s.Buckets = v
  12355. return s
  12356. }
  12357. // SetOwner sets the Owner field's value.
  12358. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  12359. s.Owner = v
  12360. return s
  12361. }
  12362. type ListMultipartUploadsInput struct {
  12363. _ struct{} `type:"structure"`
  12364. // Bucket is a required field
  12365. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12366. // Character you use to group keys.
  12367. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12368. // Requests Amazon S3 to encode the object keys in the response and specifies
  12369. // the encoding method to use. An object key may contain any Unicode character;
  12370. // however, XML 1.0 parser cannot parse some characters, such as characters
  12371. // with an ASCII value from 0 to 10. For characters that are not supported in
  12372. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12373. // keys in the response.
  12374. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12375. // Together with upload-id-marker, this parameter specifies the multipart upload
  12376. // after which listing should begin.
  12377. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  12378. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  12379. // in the response body. 1,000 is the maximum number of uploads that can be
  12380. // returned in a response.
  12381. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  12382. // Lists in-progress uploads only for those keys that begin with the specified
  12383. // prefix.
  12384. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12385. // Together with key-marker, specifies the multipart upload after which listing
  12386. // should begin. If key-marker is not specified, the upload-id-marker parameter
  12387. // is ignored.
  12388. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  12389. }
  12390. // String returns the string representation
  12391. func (s ListMultipartUploadsInput) String() string {
  12392. return awsutil.Prettify(s)
  12393. }
  12394. // GoString returns the string representation
  12395. func (s ListMultipartUploadsInput) GoString() string {
  12396. return s.String()
  12397. }
  12398. // Validate inspects the fields of the type to determine if they are valid.
  12399. func (s *ListMultipartUploadsInput) Validate() error {
  12400. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  12401. if s.Bucket == nil {
  12402. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12403. }
  12404. if invalidParams.Len() > 0 {
  12405. return invalidParams
  12406. }
  12407. return nil
  12408. }
  12409. // SetBucket sets the Bucket field's value.
  12410. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  12411. s.Bucket = &v
  12412. return s
  12413. }
  12414. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  12415. if s.Bucket == nil {
  12416. return v
  12417. }
  12418. return *s.Bucket
  12419. }
  12420. // SetDelimiter sets the Delimiter field's value.
  12421. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  12422. s.Delimiter = &v
  12423. return s
  12424. }
  12425. // SetEncodingType sets the EncodingType field's value.
  12426. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  12427. s.EncodingType = &v
  12428. return s
  12429. }
  12430. // SetKeyMarker sets the KeyMarker field's value.
  12431. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  12432. s.KeyMarker = &v
  12433. return s
  12434. }
  12435. // SetMaxUploads sets the MaxUploads field's value.
  12436. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  12437. s.MaxUploads = &v
  12438. return s
  12439. }
  12440. // SetPrefix sets the Prefix field's value.
  12441. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  12442. s.Prefix = &v
  12443. return s
  12444. }
  12445. // SetUploadIdMarker sets the UploadIdMarker field's value.
  12446. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  12447. s.UploadIdMarker = &v
  12448. return s
  12449. }
  12450. type ListMultipartUploadsOutput struct {
  12451. _ struct{} `type:"structure"`
  12452. // Name of the bucket to which the multipart upload was initiated.
  12453. Bucket *string `type:"string"`
  12454. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12455. Delimiter *string `type:"string"`
  12456. // Encoding type used by Amazon S3 to encode object keys in the response.
  12457. EncodingType *string `type:"string" enum:"EncodingType"`
  12458. // Indicates whether the returned list of multipart uploads is truncated. A
  12459. // value of true indicates that the list was truncated. The list can be truncated
  12460. // if the number of multipart uploads exceeds the limit allowed or specified
  12461. // by max uploads.
  12462. IsTruncated *bool `type:"boolean"`
  12463. // The key at or after which the listing began.
  12464. KeyMarker *string `type:"string"`
  12465. // Maximum number of multipart uploads that could have been included in the
  12466. // response.
  12467. MaxUploads *int64 `type:"integer"`
  12468. // When a list is truncated, this element specifies the value that should be
  12469. // used for the key-marker request parameter in a subsequent request.
  12470. NextKeyMarker *string `type:"string"`
  12471. // When a list is truncated, this element specifies the value that should be
  12472. // used for the upload-id-marker request parameter in a subsequent request.
  12473. NextUploadIdMarker *string `type:"string"`
  12474. // When a prefix is provided in the request, this field contains the specified
  12475. // prefix. The result contains only keys starting with the specified prefix.
  12476. Prefix *string `type:"string"`
  12477. // Upload ID after which listing began.
  12478. UploadIdMarker *string `type:"string"`
  12479. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  12480. }
  12481. // String returns the string representation
  12482. func (s ListMultipartUploadsOutput) String() string {
  12483. return awsutil.Prettify(s)
  12484. }
  12485. // GoString returns the string representation
  12486. func (s ListMultipartUploadsOutput) GoString() string {
  12487. return s.String()
  12488. }
  12489. // SetBucket sets the Bucket field's value.
  12490. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  12491. s.Bucket = &v
  12492. return s
  12493. }
  12494. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  12495. if s.Bucket == nil {
  12496. return v
  12497. }
  12498. return *s.Bucket
  12499. }
  12500. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12501. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  12502. s.CommonPrefixes = v
  12503. return s
  12504. }
  12505. // SetDelimiter sets the Delimiter field's value.
  12506. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  12507. s.Delimiter = &v
  12508. return s
  12509. }
  12510. // SetEncodingType sets the EncodingType field's value.
  12511. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  12512. s.EncodingType = &v
  12513. return s
  12514. }
  12515. // SetIsTruncated sets the IsTruncated field's value.
  12516. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  12517. s.IsTruncated = &v
  12518. return s
  12519. }
  12520. // SetKeyMarker sets the KeyMarker field's value.
  12521. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  12522. s.KeyMarker = &v
  12523. return s
  12524. }
  12525. // SetMaxUploads sets the MaxUploads field's value.
  12526. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  12527. s.MaxUploads = &v
  12528. return s
  12529. }
  12530. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12531. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  12532. s.NextKeyMarker = &v
  12533. return s
  12534. }
  12535. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  12536. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  12537. s.NextUploadIdMarker = &v
  12538. return s
  12539. }
  12540. // SetPrefix sets the Prefix field's value.
  12541. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  12542. s.Prefix = &v
  12543. return s
  12544. }
  12545. // SetUploadIdMarker sets the UploadIdMarker field's value.
  12546. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  12547. s.UploadIdMarker = &v
  12548. return s
  12549. }
  12550. // SetUploads sets the Uploads field's value.
  12551. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  12552. s.Uploads = v
  12553. return s
  12554. }
  12555. type ListObjectVersionsInput struct {
  12556. _ struct{} `type:"structure"`
  12557. // Bucket is a required field
  12558. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12559. // A delimiter is a character you use to group keys.
  12560. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12561. // Requests Amazon S3 to encode the object keys in the response and specifies
  12562. // the encoding method to use. An object key may contain any Unicode character;
  12563. // however, XML 1.0 parser cannot parse some characters, such as characters
  12564. // with an ASCII value from 0 to 10. For characters that are not supported in
  12565. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12566. // keys in the response.
  12567. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12568. // Specifies the key to start with when listing objects in a bucket.
  12569. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  12570. // Sets the maximum number of keys returned in the response. The response might
  12571. // contain fewer keys but will never contain more.
  12572. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12573. // Limits the response to keys that begin with the specified prefix.
  12574. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12575. // Specifies the object version you want to start listing from.
  12576. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  12577. }
  12578. // String returns the string representation
  12579. func (s ListObjectVersionsInput) String() string {
  12580. return awsutil.Prettify(s)
  12581. }
  12582. // GoString returns the string representation
  12583. func (s ListObjectVersionsInput) GoString() string {
  12584. return s.String()
  12585. }
  12586. // Validate inspects the fields of the type to determine if they are valid.
  12587. func (s *ListObjectVersionsInput) Validate() error {
  12588. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  12589. if s.Bucket == nil {
  12590. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12591. }
  12592. if invalidParams.Len() > 0 {
  12593. return invalidParams
  12594. }
  12595. return nil
  12596. }
  12597. // SetBucket sets the Bucket field's value.
  12598. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  12599. s.Bucket = &v
  12600. return s
  12601. }
  12602. func (s *ListObjectVersionsInput) getBucket() (v string) {
  12603. if s.Bucket == nil {
  12604. return v
  12605. }
  12606. return *s.Bucket
  12607. }
  12608. // SetDelimiter sets the Delimiter field's value.
  12609. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  12610. s.Delimiter = &v
  12611. return s
  12612. }
  12613. // SetEncodingType sets the EncodingType field's value.
  12614. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  12615. s.EncodingType = &v
  12616. return s
  12617. }
  12618. // SetKeyMarker sets the KeyMarker field's value.
  12619. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  12620. s.KeyMarker = &v
  12621. return s
  12622. }
  12623. // SetMaxKeys sets the MaxKeys field's value.
  12624. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  12625. s.MaxKeys = &v
  12626. return s
  12627. }
  12628. // SetPrefix sets the Prefix field's value.
  12629. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  12630. s.Prefix = &v
  12631. return s
  12632. }
  12633. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12634. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  12635. s.VersionIdMarker = &v
  12636. return s
  12637. }
  12638. type ListObjectVersionsOutput struct {
  12639. _ struct{} `type:"structure"`
  12640. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12641. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  12642. Delimiter *string `type:"string"`
  12643. // Encoding type used by Amazon S3 to encode object keys in the response.
  12644. EncodingType *string `type:"string" enum:"EncodingType"`
  12645. // A flag that indicates whether or not Amazon S3 returned all of the results
  12646. // that satisfied the search criteria. If your results were truncated, you can
  12647. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  12648. // response parameters as a starting place in another request to return the
  12649. // rest of the results.
  12650. IsTruncated *bool `type:"boolean"`
  12651. // Marks the last Key returned in a truncated response.
  12652. KeyMarker *string `type:"string"`
  12653. MaxKeys *int64 `type:"integer"`
  12654. Name *string `type:"string"`
  12655. // Use this value for the key marker request parameter in a subsequent request.
  12656. NextKeyMarker *string `type:"string"`
  12657. // Use this value for the next version id marker parameter in a subsequent request.
  12658. NextVersionIdMarker *string `type:"string"`
  12659. Prefix *string `type:"string"`
  12660. VersionIdMarker *string `type:"string"`
  12661. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  12662. }
  12663. // String returns the string representation
  12664. func (s ListObjectVersionsOutput) String() string {
  12665. return awsutil.Prettify(s)
  12666. }
  12667. // GoString returns the string representation
  12668. func (s ListObjectVersionsOutput) GoString() string {
  12669. return s.String()
  12670. }
  12671. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12672. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  12673. s.CommonPrefixes = v
  12674. return s
  12675. }
  12676. // SetDeleteMarkers sets the DeleteMarkers field's value.
  12677. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  12678. s.DeleteMarkers = v
  12679. return s
  12680. }
  12681. // SetDelimiter sets the Delimiter field's value.
  12682. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  12683. s.Delimiter = &v
  12684. return s
  12685. }
  12686. // SetEncodingType sets the EncodingType field's value.
  12687. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  12688. s.EncodingType = &v
  12689. return s
  12690. }
  12691. // SetIsTruncated sets the IsTruncated field's value.
  12692. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  12693. s.IsTruncated = &v
  12694. return s
  12695. }
  12696. // SetKeyMarker sets the KeyMarker field's value.
  12697. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  12698. s.KeyMarker = &v
  12699. return s
  12700. }
  12701. // SetMaxKeys sets the MaxKeys field's value.
  12702. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  12703. s.MaxKeys = &v
  12704. return s
  12705. }
  12706. // SetName sets the Name field's value.
  12707. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  12708. s.Name = &v
  12709. return s
  12710. }
  12711. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12712. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  12713. s.NextKeyMarker = &v
  12714. return s
  12715. }
  12716. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  12717. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  12718. s.NextVersionIdMarker = &v
  12719. return s
  12720. }
  12721. // SetPrefix sets the Prefix field's value.
  12722. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  12723. s.Prefix = &v
  12724. return s
  12725. }
  12726. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12727. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  12728. s.VersionIdMarker = &v
  12729. return s
  12730. }
  12731. // SetVersions sets the Versions field's value.
  12732. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  12733. s.Versions = v
  12734. return s
  12735. }
  12736. type ListObjectsInput struct {
  12737. _ struct{} `type:"structure"`
  12738. // Bucket is a required field
  12739. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12740. // A delimiter is a character you use to group keys.
  12741. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12742. // Requests Amazon S3 to encode the object keys in the response and specifies
  12743. // the encoding method to use. An object key may contain any Unicode character;
  12744. // however, XML 1.0 parser cannot parse some characters, such as characters
  12745. // with an ASCII value from 0 to 10. For characters that are not supported in
  12746. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12747. // keys in the response.
  12748. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12749. // Specifies the key to start with when listing objects in a bucket.
  12750. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  12751. // Sets the maximum number of keys returned in the response. The response might
  12752. // contain fewer keys but will never contain more.
  12753. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12754. // Limits the response to keys that begin with the specified prefix.
  12755. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12756. // Confirms that the requester knows that she or he will be charged for the
  12757. // list objects request. Bucket owners need not specify this parameter in their
  12758. // requests.
  12759. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12760. }
  12761. // String returns the string representation
  12762. func (s ListObjectsInput) String() string {
  12763. return awsutil.Prettify(s)
  12764. }
  12765. // GoString returns the string representation
  12766. func (s ListObjectsInput) GoString() string {
  12767. return s.String()
  12768. }
  12769. // Validate inspects the fields of the type to determine if they are valid.
  12770. func (s *ListObjectsInput) Validate() error {
  12771. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  12772. if s.Bucket == nil {
  12773. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12774. }
  12775. if invalidParams.Len() > 0 {
  12776. return invalidParams
  12777. }
  12778. return nil
  12779. }
  12780. // SetBucket sets the Bucket field's value.
  12781. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  12782. s.Bucket = &v
  12783. return s
  12784. }
  12785. func (s *ListObjectsInput) getBucket() (v string) {
  12786. if s.Bucket == nil {
  12787. return v
  12788. }
  12789. return *s.Bucket
  12790. }
  12791. // SetDelimiter sets the Delimiter field's value.
  12792. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  12793. s.Delimiter = &v
  12794. return s
  12795. }
  12796. // SetEncodingType sets the EncodingType field's value.
  12797. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  12798. s.EncodingType = &v
  12799. return s
  12800. }
  12801. // SetMarker sets the Marker field's value.
  12802. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  12803. s.Marker = &v
  12804. return s
  12805. }
  12806. // SetMaxKeys sets the MaxKeys field's value.
  12807. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  12808. s.MaxKeys = &v
  12809. return s
  12810. }
  12811. // SetPrefix sets the Prefix field's value.
  12812. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  12813. s.Prefix = &v
  12814. return s
  12815. }
  12816. // SetRequestPayer sets the RequestPayer field's value.
  12817. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  12818. s.RequestPayer = &v
  12819. return s
  12820. }
  12821. type ListObjectsOutput struct {
  12822. _ struct{} `type:"structure"`
  12823. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12824. Contents []*Object `type:"list" flattened:"true"`
  12825. Delimiter *string `type:"string"`
  12826. // Encoding type used by Amazon S3 to encode object keys in the response.
  12827. EncodingType *string `type:"string" enum:"EncodingType"`
  12828. // A flag that indicates whether or not Amazon S3 returned all of the results
  12829. // that satisfied the search criteria.
  12830. IsTruncated *bool `type:"boolean"`
  12831. Marker *string `type:"string"`
  12832. MaxKeys *int64 `type:"integer"`
  12833. Name *string `type:"string"`
  12834. // When response is truncated (the IsTruncated element value in the response
  12835. // is true), you can use the key name in this field as marker in the subsequent
  12836. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  12837. // order Note: This element is returned only if you have delimiter request parameter
  12838. // specified. If response does not include the NextMaker and it is truncated,
  12839. // you can use the value of the last Key in the response as the marker in the
  12840. // subsequent request to get the next set of object keys.
  12841. NextMarker *string `type:"string"`
  12842. Prefix *string `type:"string"`
  12843. }
  12844. // String returns the string representation
  12845. func (s ListObjectsOutput) String() string {
  12846. return awsutil.Prettify(s)
  12847. }
  12848. // GoString returns the string representation
  12849. func (s ListObjectsOutput) GoString() string {
  12850. return s.String()
  12851. }
  12852. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12853. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  12854. s.CommonPrefixes = v
  12855. return s
  12856. }
  12857. // SetContents sets the Contents field's value.
  12858. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  12859. s.Contents = v
  12860. return s
  12861. }
  12862. // SetDelimiter sets the Delimiter field's value.
  12863. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  12864. s.Delimiter = &v
  12865. return s
  12866. }
  12867. // SetEncodingType sets the EncodingType field's value.
  12868. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  12869. s.EncodingType = &v
  12870. return s
  12871. }
  12872. // SetIsTruncated sets the IsTruncated field's value.
  12873. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  12874. s.IsTruncated = &v
  12875. return s
  12876. }
  12877. // SetMarker sets the Marker field's value.
  12878. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  12879. s.Marker = &v
  12880. return s
  12881. }
  12882. // SetMaxKeys sets the MaxKeys field's value.
  12883. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  12884. s.MaxKeys = &v
  12885. return s
  12886. }
  12887. // SetName sets the Name field's value.
  12888. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  12889. s.Name = &v
  12890. return s
  12891. }
  12892. // SetNextMarker sets the NextMarker field's value.
  12893. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  12894. s.NextMarker = &v
  12895. return s
  12896. }
  12897. // SetPrefix sets the Prefix field's value.
  12898. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  12899. s.Prefix = &v
  12900. return s
  12901. }
  12902. type ListObjectsV2Input struct {
  12903. _ struct{} `type:"structure"`
  12904. // Name of the bucket to list.
  12905. //
  12906. // Bucket is a required field
  12907. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12908. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12909. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12910. // key
  12911. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12912. // A delimiter is a character you use to group keys.
  12913. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12914. // Encoding type used by Amazon S3 to encode object keys in the response.
  12915. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12916. // The owner field is not present in listV2 by default, if you want to return
  12917. // owner field with each key in the result then set the fetch owner field to
  12918. // true
  12919. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  12920. // Sets the maximum number of keys returned in the response. The response might
  12921. // contain fewer keys but will never contain more.
  12922. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12923. // Limits the response to keys that begin with the specified prefix.
  12924. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12925. // Confirms that the requester knows that she or he will be charged for the
  12926. // list objects request in V2 style. Bucket owners need not specify this parameter
  12927. // in their requests.
  12928. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12929. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12930. // listing after this specified key. StartAfter can be any key in the bucket
  12931. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  12932. }
  12933. // String returns the string representation
  12934. func (s ListObjectsV2Input) String() string {
  12935. return awsutil.Prettify(s)
  12936. }
  12937. // GoString returns the string representation
  12938. func (s ListObjectsV2Input) GoString() string {
  12939. return s.String()
  12940. }
  12941. // Validate inspects the fields of the type to determine if they are valid.
  12942. func (s *ListObjectsV2Input) Validate() error {
  12943. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  12944. if s.Bucket == nil {
  12945. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12946. }
  12947. if invalidParams.Len() > 0 {
  12948. return invalidParams
  12949. }
  12950. return nil
  12951. }
  12952. // SetBucket sets the Bucket field's value.
  12953. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  12954. s.Bucket = &v
  12955. return s
  12956. }
  12957. func (s *ListObjectsV2Input) getBucket() (v string) {
  12958. if s.Bucket == nil {
  12959. return v
  12960. }
  12961. return *s.Bucket
  12962. }
  12963. // SetContinuationToken sets the ContinuationToken field's value.
  12964. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  12965. s.ContinuationToken = &v
  12966. return s
  12967. }
  12968. // SetDelimiter sets the Delimiter field's value.
  12969. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  12970. s.Delimiter = &v
  12971. return s
  12972. }
  12973. // SetEncodingType sets the EncodingType field's value.
  12974. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  12975. s.EncodingType = &v
  12976. return s
  12977. }
  12978. // SetFetchOwner sets the FetchOwner field's value.
  12979. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  12980. s.FetchOwner = &v
  12981. return s
  12982. }
  12983. // SetMaxKeys sets the MaxKeys field's value.
  12984. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  12985. s.MaxKeys = &v
  12986. return s
  12987. }
  12988. // SetPrefix sets the Prefix field's value.
  12989. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  12990. s.Prefix = &v
  12991. return s
  12992. }
  12993. // SetRequestPayer sets the RequestPayer field's value.
  12994. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  12995. s.RequestPayer = &v
  12996. return s
  12997. }
  12998. // SetStartAfter sets the StartAfter field's value.
  12999. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  13000. s.StartAfter = &v
  13001. return s
  13002. }
  13003. type ListObjectsV2Output struct {
  13004. _ struct{} `type:"structure"`
  13005. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  13006. // next occurrence of the string specified by delimiter
  13007. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  13008. // Metadata about each object returned.
  13009. Contents []*Object `type:"list" flattened:"true"`
  13010. // ContinuationToken indicates Amazon S3 that the list is being continued on
  13011. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  13012. // key
  13013. ContinuationToken *string `type:"string"`
  13014. // A delimiter is a character you use to group keys.
  13015. Delimiter *string `type:"string"`
  13016. // Encoding type used by Amazon S3 to encode object keys in the response.
  13017. EncodingType *string `type:"string" enum:"EncodingType"`
  13018. // A flag that indicates whether or not Amazon S3 returned all of the results
  13019. // that satisfied the search criteria.
  13020. IsTruncated *bool `type:"boolean"`
  13021. // KeyCount is the number of keys returned with this request. KeyCount will
  13022. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  13023. // result will include less than equals 50 keys
  13024. KeyCount *int64 `type:"integer"`
  13025. // Sets the maximum number of keys returned in the response. The response might
  13026. // contain fewer keys but will never contain more.
  13027. MaxKeys *int64 `type:"integer"`
  13028. // Name of the bucket to list.
  13029. Name *string `type:"string"`
  13030. // NextContinuationToken is sent when isTruncated is true which means there
  13031. // are more keys in the bucket that can be listed. The next list requests to
  13032. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  13033. // is obfuscated and is not a real key
  13034. NextContinuationToken *string `type:"string"`
  13035. // Limits the response to keys that begin with the specified prefix.
  13036. Prefix *string `type:"string"`
  13037. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  13038. // listing after this specified key. StartAfter can be any key in the bucket
  13039. StartAfter *string `type:"string"`
  13040. }
  13041. // String returns the string representation
  13042. func (s ListObjectsV2Output) String() string {
  13043. return awsutil.Prettify(s)
  13044. }
  13045. // GoString returns the string representation
  13046. func (s ListObjectsV2Output) GoString() string {
  13047. return s.String()
  13048. }
  13049. // SetCommonPrefixes sets the CommonPrefixes field's value.
  13050. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  13051. s.CommonPrefixes = v
  13052. return s
  13053. }
  13054. // SetContents sets the Contents field's value.
  13055. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  13056. s.Contents = v
  13057. return s
  13058. }
  13059. // SetContinuationToken sets the ContinuationToken field's value.
  13060. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  13061. s.ContinuationToken = &v
  13062. return s
  13063. }
  13064. // SetDelimiter sets the Delimiter field's value.
  13065. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  13066. s.Delimiter = &v
  13067. return s
  13068. }
  13069. // SetEncodingType sets the EncodingType field's value.
  13070. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  13071. s.EncodingType = &v
  13072. return s
  13073. }
  13074. // SetIsTruncated sets the IsTruncated field's value.
  13075. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  13076. s.IsTruncated = &v
  13077. return s
  13078. }
  13079. // SetKeyCount sets the KeyCount field's value.
  13080. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  13081. s.KeyCount = &v
  13082. return s
  13083. }
  13084. // SetMaxKeys sets the MaxKeys field's value.
  13085. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  13086. s.MaxKeys = &v
  13087. return s
  13088. }
  13089. // SetName sets the Name field's value.
  13090. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  13091. s.Name = &v
  13092. return s
  13093. }
  13094. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13095. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  13096. s.NextContinuationToken = &v
  13097. return s
  13098. }
  13099. // SetPrefix sets the Prefix field's value.
  13100. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  13101. s.Prefix = &v
  13102. return s
  13103. }
  13104. // SetStartAfter sets the StartAfter field's value.
  13105. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  13106. s.StartAfter = &v
  13107. return s
  13108. }
  13109. type ListPartsInput struct {
  13110. _ struct{} `type:"structure"`
  13111. // Bucket is a required field
  13112. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13113. // Key is a required field
  13114. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  13115. // Sets the maximum number of parts to return.
  13116. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  13117. // Specifies the part after which listing should begin. Only parts with higher
  13118. // part numbers will be listed.
  13119. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  13120. // Confirms that the requester knows that she or he will be charged for the
  13121. // request. Bucket owners need not specify this parameter in their requests.
  13122. // Documentation on downloading objects from requester pays buckets can be found
  13123. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  13124. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  13125. // Upload ID identifying the multipart upload whose parts are being listed.
  13126. //
  13127. // UploadId is a required field
  13128. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  13129. }
  13130. // String returns the string representation
  13131. func (s ListPartsInput) String() string {
  13132. return awsutil.Prettify(s)
  13133. }
  13134. // GoString returns the string representation
  13135. func (s ListPartsInput) GoString() string {
  13136. return s.String()
  13137. }
  13138. // Validate inspects the fields of the type to determine if they are valid.
  13139. func (s *ListPartsInput) Validate() error {
  13140. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  13141. if s.Bucket == nil {
  13142. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13143. }
  13144. if s.Key == nil {
  13145. invalidParams.Add(request.NewErrParamRequired("Key"))
  13146. }
  13147. if s.Key != nil && len(*s.Key) < 1 {
  13148. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13149. }
  13150. if s.UploadId == nil {
  13151. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  13152. }
  13153. if invalidParams.Len() > 0 {
  13154. return invalidParams
  13155. }
  13156. return nil
  13157. }
  13158. // SetBucket sets the Bucket field's value.
  13159. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  13160. s.Bucket = &v
  13161. return s
  13162. }
  13163. func (s *ListPartsInput) getBucket() (v string) {
  13164. if s.Bucket == nil {
  13165. return v
  13166. }
  13167. return *s.Bucket
  13168. }
  13169. // SetKey sets the Key field's value.
  13170. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  13171. s.Key = &v
  13172. return s
  13173. }
  13174. // SetMaxParts sets the MaxParts field's value.
  13175. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  13176. s.MaxParts = &v
  13177. return s
  13178. }
  13179. // SetPartNumberMarker sets the PartNumberMarker field's value.
  13180. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  13181. s.PartNumberMarker = &v
  13182. return s
  13183. }
  13184. // SetRequestPayer sets the RequestPayer field's value.
  13185. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  13186. s.RequestPayer = &v
  13187. return s
  13188. }
  13189. // SetUploadId sets the UploadId field's value.
  13190. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  13191. s.UploadId = &v
  13192. return s
  13193. }
  13194. type ListPartsOutput struct {
  13195. _ struct{} `type:"structure"`
  13196. // Date when multipart upload will become eligible for abort operation by lifecycle.
  13197. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  13198. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  13199. // operation.
  13200. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  13201. // Name of the bucket to which the multipart upload was initiated.
  13202. Bucket *string `type:"string"`
  13203. // Identifies who initiated the multipart upload.
  13204. Initiator *Initiator `type:"structure"`
  13205. // Indicates whether the returned list of parts is truncated.
  13206. IsTruncated *bool `type:"boolean"`
  13207. // Object key for which the multipart upload was initiated.
  13208. Key *string `min:"1" type:"string"`
  13209. // Maximum number of parts that were allowed in the response.
  13210. MaxParts *int64 `type:"integer"`
  13211. // When a list is truncated, this element specifies the last part in the list,
  13212. // as well as the value to use for the part-number-marker request parameter
  13213. // in a subsequent request.
  13214. NextPartNumberMarker *int64 `type:"integer"`
  13215. Owner *Owner `type:"structure"`
  13216. // Part number after which listing begins.
  13217. PartNumberMarker *int64 `type:"integer"`
  13218. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  13219. // If present, indicates that the requester was successfully charged for the
  13220. // request.
  13221. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  13222. // The class of storage used to store the object.
  13223. StorageClass *string `type:"string" enum:"StorageClass"`
  13224. // Upload ID identifying the multipart upload whose parts are being listed.
  13225. UploadId *string `type:"string"`
  13226. }
  13227. // String returns the string representation
  13228. func (s ListPartsOutput) String() string {
  13229. return awsutil.Prettify(s)
  13230. }
  13231. // GoString returns the string representation
  13232. func (s ListPartsOutput) GoString() string {
  13233. return s.String()
  13234. }
  13235. // SetAbortDate sets the AbortDate field's value.
  13236. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  13237. s.AbortDate = &v
  13238. return s
  13239. }
  13240. // SetAbortRuleId sets the AbortRuleId field's value.
  13241. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  13242. s.AbortRuleId = &v
  13243. return s
  13244. }
  13245. // SetBucket sets the Bucket field's value.
  13246. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  13247. s.Bucket = &v
  13248. return s
  13249. }
  13250. func (s *ListPartsOutput) getBucket() (v string) {
  13251. if s.Bucket == nil {
  13252. return v
  13253. }
  13254. return *s.Bucket
  13255. }
  13256. // SetInitiator sets the Initiator field's value.
  13257. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  13258. s.Initiator = v
  13259. return s
  13260. }
  13261. // SetIsTruncated sets the IsTruncated field's value.
  13262. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  13263. s.IsTruncated = &v
  13264. return s
  13265. }
  13266. // SetKey sets the Key field's value.
  13267. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  13268. s.Key = &v
  13269. return s
  13270. }
  13271. // SetMaxParts sets the MaxParts field's value.
  13272. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  13273. s.MaxParts = &v
  13274. return s
  13275. }
  13276. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  13277. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  13278. s.NextPartNumberMarker = &v
  13279. return s
  13280. }
  13281. // SetOwner sets the Owner field's value.
  13282. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  13283. s.Owner = v
  13284. return s
  13285. }
  13286. // SetPartNumberMarker sets the PartNumberMarker field's value.
  13287. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  13288. s.PartNumberMarker = &v
  13289. return s
  13290. }
  13291. // SetParts sets the Parts field's value.
  13292. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  13293. s.Parts = v
  13294. return s
  13295. }
  13296. // SetRequestCharged sets the RequestCharged field's value.
  13297. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  13298. s.RequestCharged = &v
  13299. return s
  13300. }
  13301. // SetStorageClass sets the StorageClass field's value.
  13302. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  13303. s.StorageClass = &v
  13304. return s
  13305. }
  13306. // SetUploadId sets the UploadId field's value.
  13307. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  13308. s.UploadId = &v
  13309. return s
  13310. }
  13311. // Describes an S3 location that will receive the results of the restore request.
  13312. type Location struct {
  13313. _ struct{} `type:"structure"`
  13314. // A list of grants that control access to the staged results.
  13315. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  13316. // The name of the bucket where the restore results will be placed.
  13317. //
  13318. // BucketName is a required field
  13319. BucketName *string `type:"string" required:"true"`
  13320. // The canned ACL to apply to the restore results.
  13321. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  13322. // Describes the server-side encryption that will be applied to the restore
  13323. // results.
  13324. Encryption *Encryption `type:"structure"`
  13325. // The prefix that is prepended to the restore results for this request.
  13326. //
  13327. // Prefix is a required field
  13328. Prefix *string `type:"string" required:"true"`
  13329. // The class of storage used to store the restore results.
  13330. StorageClass *string `type:"string" enum:"StorageClass"`
  13331. // The tag-set that is applied to the restore results.
  13332. Tagging *Tagging `type:"structure"`
  13333. // A list of metadata to store with the restore results in S3.
  13334. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  13335. }
  13336. // String returns the string representation
  13337. func (s Location) String() string {
  13338. return awsutil.Prettify(s)
  13339. }
  13340. // GoString returns the string representation
  13341. func (s Location) GoString() string {
  13342. return s.String()
  13343. }
  13344. // Validate inspects the fields of the type to determine if they are valid.
  13345. func (s *Location) Validate() error {
  13346. invalidParams := request.ErrInvalidParams{Context: "Location"}
  13347. if s.BucketName == nil {
  13348. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  13349. }
  13350. if s.Prefix == nil {
  13351. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  13352. }
  13353. if s.AccessControlList != nil {
  13354. for i, v := range s.AccessControlList {
  13355. if v == nil {
  13356. continue
  13357. }
  13358. if err := v.Validate(); err != nil {
  13359. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  13360. }
  13361. }
  13362. }
  13363. if s.Encryption != nil {
  13364. if err := s.Encryption.Validate(); err != nil {
  13365. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  13366. }
  13367. }
  13368. if s.Tagging != nil {
  13369. if err := s.Tagging.Validate(); err != nil {
  13370. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  13371. }
  13372. }
  13373. if invalidParams.Len() > 0 {
  13374. return invalidParams
  13375. }
  13376. return nil
  13377. }
  13378. // SetAccessControlList sets the AccessControlList field's value.
  13379. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  13380. s.AccessControlList = v
  13381. return s
  13382. }
  13383. // SetBucketName sets the BucketName field's value.
  13384. func (s *Location) SetBucketName(v string) *Location {
  13385. s.BucketName = &v
  13386. return s
  13387. }
  13388. // SetCannedACL sets the CannedACL field's value.
  13389. func (s *Location) SetCannedACL(v string) *Location {
  13390. s.CannedACL = &v
  13391. return s
  13392. }
  13393. // SetEncryption sets the Encryption field's value.
  13394. func (s *Location) SetEncryption(v *Encryption) *Location {
  13395. s.Encryption = v
  13396. return s
  13397. }
  13398. // SetPrefix sets the Prefix field's value.
  13399. func (s *Location) SetPrefix(v string) *Location {
  13400. s.Prefix = &v
  13401. return s
  13402. }
  13403. // SetStorageClass sets the StorageClass field's value.
  13404. func (s *Location) SetStorageClass(v string) *Location {
  13405. s.StorageClass = &v
  13406. return s
  13407. }
  13408. // SetTagging sets the Tagging field's value.
  13409. func (s *Location) SetTagging(v *Tagging) *Location {
  13410. s.Tagging = v
  13411. return s
  13412. }
  13413. // SetUserMetadata sets the UserMetadata field's value.
  13414. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  13415. s.UserMetadata = v
  13416. return s
  13417. }
  13418. // Container for logging information. Presence of this element indicates that
  13419. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  13420. // in this case.
  13421. type LoggingEnabled struct {
  13422. _ struct{} `type:"structure"`
  13423. // Specifies the bucket where you want Amazon S3 to store server access logs.
  13424. // You can have your logs delivered to any bucket that you own, including the
  13425. // same bucket that is being logged. You can also configure multiple buckets
  13426. // to deliver their logs to the same target bucket. In this case you should
  13427. // choose a different TargetPrefix for each source bucket so that the delivered
  13428. // log files can be distinguished by key.
  13429. //
  13430. // TargetBucket is a required field
  13431. TargetBucket *string `type:"string" required:"true"`
  13432. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  13433. // This element lets you specify a prefix for the keys that the log files will
  13434. // be stored under.
  13435. //
  13436. // TargetPrefix is a required field
  13437. TargetPrefix *string `type:"string" required:"true"`
  13438. }
  13439. // String returns the string representation
  13440. func (s LoggingEnabled) String() string {
  13441. return awsutil.Prettify(s)
  13442. }
  13443. // GoString returns the string representation
  13444. func (s LoggingEnabled) GoString() string {
  13445. return s.String()
  13446. }
  13447. // Validate inspects the fields of the type to determine if they are valid.
  13448. func (s *LoggingEnabled) Validate() error {
  13449. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  13450. if s.TargetBucket == nil {
  13451. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  13452. }
  13453. if s.TargetPrefix == nil {
  13454. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  13455. }
  13456. if s.TargetGrants != nil {
  13457. for i, v := range s.TargetGrants {
  13458. if v == nil {
  13459. continue
  13460. }
  13461. if err := v.Validate(); err != nil {
  13462. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  13463. }
  13464. }
  13465. }
  13466. if invalidParams.Len() > 0 {
  13467. return invalidParams
  13468. }
  13469. return nil
  13470. }
  13471. // SetTargetBucket sets the TargetBucket field's value.
  13472. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  13473. s.TargetBucket = &v
  13474. return s
  13475. }
  13476. // SetTargetGrants sets the TargetGrants field's value.
  13477. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  13478. s.TargetGrants = v
  13479. return s
  13480. }
  13481. // SetTargetPrefix sets the TargetPrefix field's value.
  13482. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  13483. s.TargetPrefix = &v
  13484. return s
  13485. }
  13486. // A metadata key-value pair to store with an object.
  13487. type MetadataEntry struct {
  13488. _ struct{} `type:"structure"`
  13489. Name *string `type:"string"`
  13490. Value *string `type:"string"`
  13491. }
  13492. // String returns the string representation
  13493. func (s MetadataEntry) String() string {
  13494. return awsutil.Prettify(s)
  13495. }
  13496. // GoString returns the string representation
  13497. func (s MetadataEntry) GoString() string {
  13498. return s.String()
  13499. }
  13500. // SetName sets the Name field's value.
  13501. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  13502. s.Name = &v
  13503. return s
  13504. }
  13505. // SetValue sets the Value field's value.
  13506. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  13507. s.Value = &v
  13508. return s
  13509. }
  13510. type MetricsAndOperator struct {
  13511. _ struct{} `type:"structure"`
  13512. // The prefix used when evaluating an AND predicate.
  13513. Prefix *string `type:"string"`
  13514. // The list of tags used when evaluating an AND predicate.
  13515. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  13516. }
  13517. // String returns the string representation
  13518. func (s MetricsAndOperator) String() string {
  13519. return awsutil.Prettify(s)
  13520. }
  13521. // GoString returns the string representation
  13522. func (s MetricsAndOperator) GoString() string {
  13523. return s.String()
  13524. }
  13525. // Validate inspects the fields of the type to determine if they are valid.
  13526. func (s *MetricsAndOperator) Validate() error {
  13527. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  13528. if s.Tags != nil {
  13529. for i, v := range s.Tags {
  13530. if v == nil {
  13531. continue
  13532. }
  13533. if err := v.Validate(); err != nil {
  13534. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  13535. }
  13536. }
  13537. }
  13538. if invalidParams.Len() > 0 {
  13539. return invalidParams
  13540. }
  13541. return nil
  13542. }
  13543. // SetPrefix sets the Prefix field's value.
  13544. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  13545. s.Prefix = &v
  13546. return s
  13547. }
  13548. // SetTags sets the Tags field's value.
  13549. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  13550. s.Tags = v
  13551. return s
  13552. }
  13553. type MetricsConfiguration struct {
  13554. _ struct{} `type:"structure"`
  13555. // Specifies a metrics configuration filter. The metrics configuration will
  13556. // only include objects that meet the filter's criteria. A filter must be a
  13557. // prefix, a tag, or a conjunction (MetricsAndOperator).
  13558. Filter *MetricsFilter `type:"structure"`
  13559. // The ID used to identify the metrics configuration.
  13560. //
  13561. // Id is a required field
  13562. Id *string `type:"string" required:"true"`
  13563. }
  13564. // String returns the string representation
  13565. func (s MetricsConfiguration) String() string {
  13566. return awsutil.Prettify(s)
  13567. }
  13568. // GoString returns the string representation
  13569. func (s MetricsConfiguration) GoString() string {
  13570. return s.String()
  13571. }
  13572. // Validate inspects the fields of the type to determine if they are valid.
  13573. func (s *MetricsConfiguration) Validate() error {
  13574. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  13575. if s.Id == nil {
  13576. invalidParams.Add(request.NewErrParamRequired("Id"))
  13577. }
  13578. if s.Filter != nil {
  13579. if err := s.Filter.Validate(); err != nil {
  13580. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  13581. }
  13582. }
  13583. if invalidParams.Len() > 0 {
  13584. return invalidParams
  13585. }
  13586. return nil
  13587. }
  13588. // SetFilter sets the Filter field's value.
  13589. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  13590. s.Filter = v
  13591. return s
  13592. }
  13593. // SetId sets the Id field's value.
  13594. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  13595. s.Id = &v
  13596. return s
  13597. }
  13598. type MetricsFilter struct {
  13599. _ struct{} `type:"structure"`
  13600. // A conjunction (logical AND) of predicates, which is used in evaluating a
  13601. // metrics filter. The operator must have at least two predicates, and an object
  13602. // must match all of the predicates in order for the filter to apply.
  13603. And *MetricsAndOperator `type:"structure"`
  13604. // The prefix used when evaluating a metrics filter.
  13605. Prefix *string `type:"string"`
  13606. // The tag used when evaluating a metrics filter.
  13607. Tag *Tag `type:"structure"`
  13608. }
  13609. // String returns the string representation
  13610. func (s MetricsFilter) String() string {
  13611. return awsutil.Prettify(s)
  13612. }
  13613. // GoString returns the string representation
  13614. func (s MetricsFilter) GoString() string {
  13615. return s.String()
  13616. }
  13617. // Validate inspects the fields of the type to determine if they are valid.
  13618. func (s *MetricsFilter) Validate() error {
  13619. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  13620. if s.And != nil {
  13621. if err := s.And.Validate(); err != nil {
  13622. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  13623. }
  13624. }
  13625. if s.Tag != nil {
  13626. if err := s.Tag.Validate(); err != nil {
  13627. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  13628. }
  13629. }
  13630. if invalidParams.Len() > 0 {
  13631. return invalidParams
  13632. }
  13633. return nil
  13634. }
  13635. // SetAnd sets the And field's value.
  13636. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  13637. s.And = v
  13638. return s
  13639. }
  13640. // SetPrefix sets the Prefix field's value.
  13641. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  13642. s.Prefix = &v
  13643. return s
  13644. }
  13645. // SetTag sets the Tag field's value.
  13646. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  13647. s.Tag = v
  13648. return s
  13649. }
  13650. type MultipartUpload struct {
  13651. _ struct{} `type:"structure"`
  13652. // Date and time at which the multipart upload was initiated.
  13653. Initiated *time.Time `type:"timestamp"`
  13654. // Identifies who initiated the multipart upload.
  13655. Initiator *Initiator `type:"structure"`
  13656. // Key of the object for which the multipart upload was initiated.
  13657. Key *string `min:"1" type:"string"`
  13658. Owner *Owner `type:"structure"`
  13659. // The class of storage used to store the object.
  13660. StorageClass *string `type:"string" enum:"StorageClass"`
  13661. // Upload ID that identifies the multipart upload.
  13662. UploadId *string `type:"string"`
  13663. }
  13664. // String returns the string representation
  13665. func (s MultipartUpload) String() string {
  13666. return awsutil.Prettify(s)
  13667. }
  13668. // GoString returns the string representation
  13669. func (s MultipartUpload) GoString() string {
  13670. return s.String()
  13671. }
  13672. // SetInitiated sets the Initiated field's value.
  13673. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  13674. s.Initiated = &v
  13675. return s
  13676. }
  13677. // SetInitiator sets the Initiator field's value.
  13678. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  13679. s.Initiator = v
  13680. return s
  13681. }
  13682. // SetKey sets the Key field's value.
  13683. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  13684. s.Key = &v
  13685. return s
  13686. }
  13687. // SetOwner sets the Owner field's value.
  13688. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  13689. s.Owner = v
  13690. return s
  13691. }
  13692. // SetStorageClass sets the StorageClass field's value.
  13693. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  13694. s.StorageClass = &v
  13695. return s
  13696. }
  13697. // SetUploadId sets the UploadId field's value.
  13698. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  13699. s.UploadId = &v
  13700. return s
  13701. }
  13702. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  13703. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  13704. // configuration action on a bucket that has versioning enabled (or suspended)
  13705. // to request that Amazon S3 delete noncurrent object versions at a specific
  13706. // period in the object's lifetime.
  13707. type NoncurrentVersionExpiration struct {
  13708. _ struct{} `type:"structure"`
  13709. // Specifies the number of days an object is noncurrent before Amazon S3 can
  13710. // perform the associated action. For information about the noncurrent days
  13711. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  13712. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in
  13713. // the Amazon Simple Storage Service Developer Guide.
  13714. NoncurrentDays *int64 `type:"integer"`
  13715. }
  13716. // String returns the string representation
  13717. func (s NoncurrentVersionExpiration) String() string {
  13718. return awsutil.Prettify(s)
  13719. }
  13720. // GoString returns the string representation
  13721. func (s NoncurrentVersionExpiration) GoString() string {
  13722. return s.String()
  13723. }
  13724. // SetNoncurrentDays sets the NoncurrentDays field's value.
  13725. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  13726. s.NoncurrentDays = &v
  13727. return s
  13728. }
  13729. // Container for the transition rule that describes when noncurrent objects
  13730. // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your
  13731. // bucket is versioning-enabled (or versioning is suspended), you can set this
  13732. // action to request that Amazon S3 transition noncurrent object versions to
  13733. // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period
  13734. // in the object's lifetime.
  13735. type NoncurrentVersionTransition struct {
  13736. _ struct{} `type:"structure"`
  13737. // Specifies the number of days an object is noncurrent before Amazon S3 can
  13738. // perform the associated action. For information about the noncurrent days
  13739. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  13740. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in
  13741. // the Amazon Simple Storage Service Developer Guide.
  13742. NoncurrentDays *int64 `type:"integer"`
  13743. // The class of storage used to store the object.
  13744. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  13745. }
  13746. // String returns the string representation
  13747. func (s NoncurrentVersionTransition) String() string {
  13748. return awsutil.Prettify(s)
  13749. }
  13750. // GoString returns the string representation
  13751. func (s NoncurrentVersionTransition) GoString() string {
  13752. return s.String()
  13753. }
  13754. // SetNoncurrentDays sets the NoncurrentDays field's value.
  13755. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  13756. s.NoncurrentDays = &v
  13757. return s
  13758. }
  13759. // SetStorageClass sets the StorageClass field's value.
  13760. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  13761. s.StorageClass = &v
  13762. return s
  13763. }
  13764. // Container for specifying the notification configuration of the bucket. If
  13765. // this element is empty, notifications are turned off on the bucket.
  13766. type NotificationConfiguration struct {
  13767. _ struct{} `type:"structure"`
  13768. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  13769. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  13770. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  13771. }
  13772. // String returns the string representation
  13773. func (s NotificationConfiguration) String() string {
  13774. return awsutil.Prettify(s)
  13775. }
  13776. // GoString returns the string representation
  13777. func (s NotificationConfiguration) GoString() string {
  13778. return s.String()
  13779. }
  13780. // Validate inspects the fields of the type to determine if they are valid.
  13781. func (s *NotificationConfiguration) Validate() error {
  13782. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  13783. if s.LambdaFunctionConfigurations != nil {
  13784. for i, v := range s.LambdaFunctionConfigurations {
  13785. if v == nil {
  13786. continue
  13787. }
  13788. if err := v.Validate(); err != nil {
  13789. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  13790. }
  13791. }
  13792. }
  13793. if s.QueueConfigurations != nil {
  13794. for i, v := range s.QueueConfigurations {
  13795. if v == nil {
  13796. continue
  13797. }
  13798. if err := v.Validate(); err != nil {
  13799. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  13800. }
  13801. }
  13802. }
  13803. if s.TopicConfigurations != nil {
  13804. for i, v := range s.TopicConfigurations {
  13805. if v == nil {
  13806. continue
  13807. }
  13808. if err := v.Validate(); err != nil {
  13809. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  13810. }
  13811. }
  13812. }
  13813. if invalidParams.Len() > 0 {
  13814. return invalidParams
  13815. }
  13816. return nil
  13817. }
  13818. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  13819. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  13820. s.LambdaFunctionConfigurations = v
  13821. return s
  13822. }
  13823. // SetQueueConfigurations sets the QueueConfigurations field's value.
  13824. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  13825. s.QueueConfigurations = v
  13826. return s
  13827. }
  13828. // SetTopicConfigurations sets the TopicConfigurations field's value.
  13829. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  13830. s.TopicConfigurations = v
  13831. return s
  13832. }
  13833. type NotificationConfigurationDeprecated struct {
  13834. _ struct{} `type:"structure"`
  13835. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  13836. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  13837. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  13838. }
  13839. // String returns the string representation
  13840. func (s NotificationConfigurationDeprecated) String() string {
  13841. return awsutil.Prettify(s)
  13842. }
  13843. // GoString returns the string representation
  13844. func (s NotificationConfigurationDeprecated) GoString() string {
  13845. return s.String()
  13846. }
  13847. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  13848. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  13849. s.CloudFunctionConfiguration = v
  13850. return s
  13851. }
  13852. // SetQueueConfiguration sets the QueueConfiguration field's value.
  13853. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13854. s.QueueConfiguration = v
  13855. return s
  13856. }
  13857. // SetTopicConfiguration sets the TopicConfiguration field's value.
  13858. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13859. s.TopicConfiguration = v
  13860. return s
  13861. }
  13862. // Container for object key name filtering rules. For information about key
  13863. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13864. // in the Amazon Simple Storage Service Developer Guide.
  13865. type NotificationConfigurationFilter struct {
  13866. _ struct{} `type:"structure"`
  13867. // Container for object key name prefix and suffix filtering rules.
  13868. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  13869. }
  13870. // String returns the string representation
  13871. func (s NotificationConfigurationFilter) String() string {
  13872. return awsutil.Prettify(s)
  13873. }
  13874. // GoString returns the string representation
  13875. func (s NotificationConfigurationFilter) GoString() string {
  13876. return s.String()
  13877. }
  13878. // SetKey sets the Key field's value.
  13879. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  13880. s.Key = v
  13881. return s
  13882. }
  13883. type Object struct {
  13884. _ struct{} `type:"structure"`
  13885. ETag *string `type:"string"`
  13886. Key *string `min:"1" type:"string"`
  13887. LastModified *time.Time `type:"timestamp"`
  13888. Owner *Owner `type:"structure"`
  13889. Size *int64 `type:"integer"`
  13890. // The class of storage used to store the object.
  13891. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  13892. }
  13893. // String returns the string representation
  13894. func (s Object) String() string {
  13895. return awsutil.Prettify(s)
  13896. }
  13897. // GoString returns the string representation
  13898. func (s Object) GoString() string {
  13899. return s.String()
  13900. }
  13901. // SetETag sets the ETag field's value.
  13902. func (s *Object) SetETag(v string) *Object {
  13903. s.ETag = &v
  13904. return s
  13905. }
  13906. // SetKey sets the Key field's value.
  13907. func (s *Object) SetKey(v string) *Object {
  13908. s.Key = &v
  13909. return s
  13910. }
  13911. // SetLastModified sets the LastModified field's value.
  13912. func (s *Object) SetLastModified(v time.Time) *Object {
  13913. s.LastModified = &v
  13914. return s
  13915. }
  13916. // SetOwner sets the Owner field's value.
  13917. func (s *Object) SetOwner(v *Owner) *Object {
  13918. s.Owner = v
  13919. return s
  13920. }
  13921. // SetSize sets the Size field's value.
  13922. func (s *Object) SetSize(v int64) *Object {
  13923. s.Size = &v
  13924. return s
  13925. }
  13926. // SetStorageClass sets the StorageClass field's value.
  13927. func (s *Object) SetStorageClass(v string) *Object {
  13928. s.StorageClass = &v
  13929. return s
  13930. }
  13931. type ObjectIdentifier struct {
  13932. _ struct{} `type:"structure"`
  13933. // Key name of the object to delete.
  13934. //
  13935. // Key is a required field
  13936. Key *string `min:"1" type:"string" required:"true"`
  13937. // VersionId for the specific version of the object to delete.
  13938. VersionId *string `type:"string"`
  13939. }
  13940. // String returns the string representation
  13941. func (s ObjectIdentifier) String() string {
  13942. return awsutil.Prettify(s)
  13943. }
  13944. // GoString returns the string representation
  13945. func (s ObjectIdentifier) GoString() string {
  13946. return s.String()
  13947. }
  13948. // Validate inspects the fields of the type to determine if they are valid.
  13949. func (s *ObjectIdentifier) Validate() error {
  13950. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  13951. if s.Key == nil {
  13952. invalidParams.Add(request.NewErrParamRequired("Key"))
  13953. }
  13954. if s.Key != nil && len(*s.Key) < 1 {
  13955. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13956. }
  13957. if invalidParams.Len() > 0 {
  13958. return invalidParams
  13959. }
  13960. return nil
  13961. }
  13962. // SetKey sets the Key field's value.
  13963. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  13964. s.Key = &v
  13965. return s
  13966. }
  13967. // SetVersionId sets the VersionId field's value.
  13968. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  13969. s.VersionId = &v
  13970. return s
  13971. }
  13972. type ObjectVersion struct {
  13973. _ struct{} `type:"structure"`
  13974. ETag *string `type:"string"`
  13975. // Specifies whether the object is (true) or is not (false) the latest version
  13976. // of an object.
  13977. IsLatest *bool `type:"boolean"`
  13978. // The object key.
  13979. Key *string `min:"1" type:"string"`
  13980. // Date and time the object was last modified.
  13981. LastModified *time.Time `type:"timestamp"`
  13982. Owner *Owner `type:"structure"`
  13983. // Size in bytes of the object.
  13984. Size *int64 `type:"integer"`
  13985. // The class of storage used to store the object.
  13986. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  13987. // Version ID of an object.
  13988. VersionId *string `type:"string"`
  13989. }
  13990. // String returns the string representation
  13991. func (s ObjectVersion) String() string {
  13992. return awsutil.Prettify(s)
  13993. }
  13994. // GoString returns the string representation
  13995. func (s ObjectVersion) GoString() string {
  13996. return s.String()
  13997. }
  13998. // SetETag sets the ETag field's value.
  13999. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  14000. s.ETag = &v
  14001. return s
  14002. }
  14003. // SetIsLatest sets the IsLatest field's value.
  14004. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  14005. s.IsLatest = &v
  14006. return s
  14007. }
  14008. // SetKey sets the Key field's value.
  14009. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  14010. s.Key = &v
  14011. return s
  14012. }
  14013. // SetLastModified sets the LastModified field's value.
  14014. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  14015. s.LastModified = &v
  14016. return s
  14017. }
  14018. // SetOwner sets the Owner field's value.
  14019. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  14020. s.Owner = v
  14021. return s
  14022. }
  14023. // SetSize sets the Size field's value.
  14024. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  14025. s.Size = &v
  14026. return s
  14027. }
  14028. // SetStorageClass sets the StorageClass field's value.
  14029. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  14030. s.StorageClass = &v
  14031. return s
  14032. }
  14033. // SetVersionId sets the VersionId field's value.
  14034. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  14035. s.VersionId = &v
  14036. return s
  14037. }
  14038. // Describes the location where the restore job's output is stored.
  14039. type OutputLocation struct {
  14040. _ struct{} `type:"structure"`
  14041. // Describes an S3 location that will receive the results of the restore request.
  14042. S3 *Location `type:"structure"`
  14043. }
  14044. // String returns the string representation
  14045. func (s OutputLocation) String() string {
  14046. return awsutil.Prettify(s)
  14047. }
  14048. // GoString returns the string representation
  14049. func (s OutputLocation) GoString() string {
  14050. return s.String()
  14051. }
  14052. // Validate inspects the fields of the type to determine if they are valid.
  14053. func (s *OutputLocation) Validate() error {
  14054. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  14055. if s.S3 != nil {
  14056. if err := s.S3.Validate(); err != nil {
  14057. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  14058. }
  14059. }
  14060. if invalidParams.Len() > 0 {
  14061. return invalidParams
  14062. }
  14063. return nil
  14064. }
  14065. // SetS3 sets the S3 field's value.
  14066. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  14067. s.S3 = v
  14068. return s
  14069. }
  14070. // Describes how results of the Select job are serialized.
  14071. type OutputSerialization struct {
  14072. _ struct{} `type:"structure"`
  14073. // Describes the serialization of CSV-encoded Select results.
  14074. CSV *CSVOutput `type:"structure"`
  14075. // Specifies JSON as request's output serialization format.
  14076. JSON *JSONOutput `type:"structure"`
  14077. }
  14078. // String returns the string representation
  14079. func (s OutputSerialization) String() string {
  14080. return awsutil.Prettify(s)
  14081. }
  14082. // GoString returns the string representation
  14083. func (s OutputSerialization) GoString() string {
  14084. return s.String()
  14085. }
  14086. // SetCSV sets the CSV field's value.
  14087. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  14088. s.CSV = v
  14089. return s
  14090. }
  14091. // SetJSON sets the JSON field's value.
  14092. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  14093. s.JSON = v
  14094. return s
  14095. }
  14096. type Owner struct {
  14097. _ struct{} `type:"structure"`
  14098. DisplayName *string `type:"string"`
  14099. ID *string `type:"string"`
  14100. }
  14101. // String returns the string representation
  14102. func (s Owner) String() string {
  14103. return awsutil.Prettify(s)
  14104. }
  14105. // GoString returns the string representation
  14106. func (s Owner) GoString() string {
  14107. return s.String()
  14108. }
  14109. // SetDisplayName sets the DisplayName field's value.
  14110. func (s *Owner) SetDisplayName(v string) *Owner {
  14111. s.DisplayName = &v
  14112. return s
  14113. }
  14114. // SetID sets the ID field's value.
  14115. func (s *Owner) SetID(v string) *Owner {
  14116. s.ID = &v
  14117. return s
  14118. }
  14119. type ParquetInput struct {
  14120. _ struct{} `type:"structure"`
  14121. }
  14122. // String returns the string representation
  14123. func (s ParquetInput) String() string {
  14124. return awsutil.Prettify(s)
  14125. }
  14126. // GoString returns the string representation
  14127. func (s ParquetInput) GoString() string {
  14128. return s.String()
  14129. }
  14130. type Part struct {
  14131. _ struct{} `type:"structure"`
  14132. // Entity tag returned when the part was uploaded.
  14133. ETag *string `type:"string"`
  14134. // Date and time at which the part was uploaded.
  14135. LastModified *time.Time `type:"timestamp"`
  14136. // Part number identifying the part. This is a positive integer between 1 and
  14137. // 10,000.
  14138. PartNumber *int64 `type:"integer"`
  14139. // Size of the uploaded part data.
  14140. Size *int64 `type:"integer"`
  14141. }
  14142. // String returns the string representation
  14143. func (s Part) String() string {
  14144. return awsutil.Prettify(s)
  14145. }
  14146. // GoString returns the string representation
  14147. func (s Part) GoString() string {
  14148. return s.String()
  14149. }
  14150. // SetETag sets the ETag field's value.
  14151. func (s *Part) SetETag(v string) *Part {
  14152. s.ETag = &v
  14153. return s
  14154. }
  14155. // SetLastModified sets the LastModified field's value.
  14156. func (s *Part) SetLastModified(v time.Time) *Part {
  14157. s.LastModified = &v
  14158. return s
  14159. }
  14160. // SetPartNumber sets the PartNumber field's value.
  14161. func (s *Part) SetPartNumber(v int64) *Part {
  14162. s.PartNumber = &v
  14163. return s
  14164. }
  14165. // SetSize sets the Size field's value.
  14166. func (s *Part) SetSize(v int64) *Part {
  14167. s.Size = &v
  14168. return s
  14169. }
  14170. type Progress struct {
  14171. _ struct{} `type:"structure"`
  14172. // Current number of uncompressed object bytes processed.
  14173. BytesProcessed *int64 `type:"long"`
  14174. // Current number of bytes of records payload data returned.
  14175. BytesReturned *int64 `type:"long"`
  14176. // Current number of object bytes scanned.
  14177. BytesScanned *int64 `type:"long"`
  14178. }
  14179. // String returns the string representation
  14180. func (s Progress) String() string {
  14181. return awsutil.Prettify(s)
  14182. }
  14183. // GoString returns the string representation
  14184. func (s Progress) GoString() string {
  14185. return s.String()
  14186. }
  14187. // SetBytesProcessed sets the BytesProcessed field's value.
  14188. func (s *Progress) SetBytesProcessed(v int64) *Progress {
  14189. s.BytesProcessed = &v
  14190. return s
  14191. }
  14192. // SetBytesReturned sets the BytesReturned field's value.
  14193. func (s *Progress) SetBytesReturned(v int64) *Progress {
  14194. s.BytesReturned = &v
  14195. return s
  14196. }
  14197. // SetBytesScanned sets the BytesScanned field's value.
  14198. func (s *Progress) SetBytesScanned(v int64) *Progress {
  14199. s.BytesScanned = &v
  14200. return s
  14201. }
  14202. type ProgressEvent struct {
  14203. _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
  14204. // The Progress event details.
  14205. Details *Progress `locationName:"Details" type:"structure"`
  14206. }
  14207. // String returns the string representation
  14208. func (s ProgressEvent) String() string {
  14209. return awsutil.Prettify(s)
  14210. }
  14211. // GoString returns the string representation
  14212. func (s ProgressEvent) GoString() string {
  14213. return s.String()
  14214. }
  14215. // SetDetails sets the Details field's value.
  14216. func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
  14217. s.Details = v
  14218. return s
  14219. }
  14220. // The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
  14221. func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
  14222. // UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
  14223. // This method is only used internally within the SDK's EventStream handling.
  14224. func (s *ProgressEvent) UnmarshalEvent(
  14225. payloadUnmarshaler protocol.PayloadUnmarshaler,
  14226. msg eventstream.Message,
  14227. ) error {
  14228. if err := payloadUnmarshaler.UnmarshalPayload(
  14229. bytes.NewReader(msg.Payload), s,
  14230. ); err != nil {
  14231. return err
  14232. }
  14233. return nil
  14234. }
  14235. type PutBucketAccelerateConfigurationInput struct {
  14236. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  14237. // Specifies the Accelerate Configuration you want to set for the bucket.
  14238. //
  14239. // AccelerateConfiguration is a required field
  14240. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14241. // Name of the bucket for which the accelerate configuration is set.
  14242. //
  14243. // Bucket is a required field
  14244. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14245. }
  14246. // String returns the string representation
  14247. func (s PutBucketAccelerateConfigurationInput) String() string {
  14248. return awsutil.Prettify(s)
  14249. }
  14250. // GoString returns the string representation
  14251. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  14252. return s.String()
  14253. }
  14254. // Validate inspects the fields of the type to determine if they are valid.
  14255. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  14256. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  14257. if s.AccelerateConfiguration == nil {
  14258. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  14259. }
  14260. if s.Bucket == nil {
  14261. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14262. }
  14263. if invalidParams.Len() > 0 {
  14264. return invalidParams
  14265. }
  14266. return nil
  14267. }
  14268. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  14269. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  14270. s.AccelerateConfiguration = v
  14271. return s
  14272. }
  14273. // SetBucket sets the Bucket field's value.
  14274. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  14275. s.Bucket = &v
  14276. return s
  14277. }
  14278. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  14279. if s.Bucket == nil {
  14280. return v
  14281. }
  14282. return *s.Bucket
  14283. }
  14284. type PutBucketAccelerateConfigurationOutput struct {
  14285. _ struct{} `type:"structure"`
  14286. }
  14287. // String returns the string representation
  14288. func (s PutBucketAccelerateConfigurationOutput) String() string {
  14289. return awsutil.Prettify(s)
  14290. }
  14291. // GoString returns the string representation
  14292. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  14293. return s.String()
  14294. }
  14295. type PutBucketAclInput struct {
  14296. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  14297. // The canned ACL to apply to the bucket.
  14298. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  14299. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14300. // Bucket is a required field
  14301. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14302. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  14303. // bucket.
  14304. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  14305. // Allows grantee to list the objects in the bucket.
  14306. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  14307. // Allows grantee to read the bucket ACL.
  14308. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  14309. // Allows grantee to create, overwrite, and delete any object in the bucket.
  14310. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  14311. // Allows grantee to write the ACL for the applicable bucket.
  14312. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  14313. }
  14314. // String returns the string representation
  14315. func (s PutBucketAclInput) String() string {
  14316. return awsutil.Prettify(s)
  14317. }
  14318. // GoString returns the string representation
  14319. func (s PutBucketAclInput) GoString() string {
  14320. return s.String()
  14321. }
  14322. // Validate inspects the fields of the type to determine if they are valid.
  14323. func (s *PutBucketAclInput) Validate() error {
  14324. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  14325. if s.Bucket == nil {
  14326. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14327. }
  14328. if s.AccessControlPolicy != nil {
  14329. if err := s.AccessControlPolicy.Validate(); err != nil {
  14330. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  14331. }
  14332. }
  14333. if invalidParams.Len() > 0 {
  14334. return invalidParams
  14335. }
  14336. return nil
  14337. }
  14338. // SetACL sets the ACL field's value.
  14339. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  14340. s.ACL = &v
  14341. return s
  14342. }
  14343. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  14344. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  14345. s.AccessControlPolicy = v
  14346. return s
  14347. }
  14348. // SetBucket sets the Bucket field's value.
  14349. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  14350. s.Bucket = &v
  14351. return s
  14352. }
  14353. func (s *PutBucketAclInput) getBucket() (v string) {
  14354. if s.Bucket == nil {
  14355. return v
  14356. }
  14357. return *s.Bucket
  14358. }
  14359. // SetGrantFullControl sets the GrantFullControl field's value.
  14360. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  14361. s.GrantFullControl = &v
  14362. return s
  14363. }
  14364. // SetGrantRead sets the GrantRead field's value.
  14365. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  14366. s.GrantRead = &v
  14367. return s
  14368. }
  14369. // SetGrantReadACP sets the GrantReadACP field's value.
  14370. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  14371. s.GrantReadACP = &v
  14372. return s
  14373. }
  14374. // SetGrantWrite sets the GrantWrite field's value.
  14375. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  14376. s.GrantWrite = &v
  14377. return s
  14378. }
  14379. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14380. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  14381. s.GrantWriteACP = &v
  14382. return s
  14383. }
  14384. type PutBucketAclOutput struct {
  14385. _ struct{} `type:"structure"`
  14386. }
  14387. // String returns the string representation
  14388. func (s PutBucketAclOutput) String() string {
  14389. return awsutil.Prettify(s)
  14390. }
  14391. // GoString returns the string representation
  14392. func (s PutBucketAclOutput) GoString() string {
  14393. return s.String()
  14394. }
  14395. type PutBucketAnalyticsConfigurationInput struct {
  14396. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  14397. // The configuration and any analyses for the analytics filter.
  14398. //
  14399. // AnalyticsConfiguration is a required field
  14400. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14401. // The name of the bucket to which an analytics configuration is stored.
  14402. //
  14403. // Bucket is a required field
  14404. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14405. // The identifier used to represent an analytics configuration.
  14406. //
  14407. // Id is a required field
  14408. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14409. }
  14410. // String returns the string representation
  14411. func (s PutBucketAnalyticsConfigurationInput) String() string {
  14412. return awsutil.Prettify(s)
  14413. }
  14414. // GoString returns the string representation
  14415. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  14416. return s.String()
  14417. }
  14418. // Validate inspects the fields of the type to determine if they are valid.
  14419. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  14420. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  14421. if s.AnalyticsConfiguration == nil {
  14422. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  14423. }
  14424. if s.Bucket == nil {
  14425. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14426. }
  14427. if s.Id == nil {
  14428. invalidParams.Add(request.NewErrParamRequired("Id"))
  14429. }
  14430. if s.AnalyticsConfiguration != nil {
  14431. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  14432. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  14433. }
  14434. }
  14435. if invalidParams.Len() > 0 {
  14436. return invalidParams
  14437. }
  14438. return nil
  14439. }
  14440. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  14441. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  14442. s.AnalyticsConfiguration = v
  14443. return s
  14444. }
  14445. // SetBucket sets the Bucket field's value.
  14446. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  14447. s.Bucket = &v
  14448. return s
  14449. }
  14450. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  14451. if s.Bucket == nil {
  14452. return v
  14453. }
  14454. return *s.Bucket
  14455. }
  14456. // SetId sets the Id field's value.
  14457. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  14458. s.Id = &v
  14459. return s
  14460. }
  14461. type PutBucketAnalyticsConfigurationOutput struct {
  14462. _ struct{} `type:"structure"`
  14463. }
  14464. // String returns the string representation
  14465. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  14466. return awsutil.Prettify(s)
  14467. }
  14468. // GoString returns the string representation
  14469. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  14470. return s.String()
  14471. }
  14472. type PutBucketCorsInput struct {
  14473. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  14474. // Bucket is a required field
  14475. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14476. // CORSConfiguration is a required field
  14477. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14478. }
  14479. // String returns the string representation
  14480. func (s PutBucketCorsInput) String() string {
  14481. return awsutil.Prettify(s)
  14482. }
  14483. // GoString returns the string representation
  14484. func (s PutBucketCorsInput) GoString() string {
  14485. return s.String()
  14486. }
  14487. // Validate inspects the fields of the type to determine if they are valid.
  14488. func (s *PutBucketCorsInput) Validate() error {
  14489. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  14490. if s.Bucket == nil {
  14491. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14492. }
  14493. if s.CORSConfiguration == nil {
  14494. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  14495. }
  14496. if s.CORSConfiguration != nil {
  14497. if err := s.CORSConfiguration.Validate(); err != nil {
  14498. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  14499. }
  14500. }
  14501. if invalidParams.Len() > 0 {
  14502. return invalidParams
  14503. }
  14504. return nil
  14505. }
  14506. // SetBucket sets the Bucket field's value.
  14507. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  14508. s.Bucket = &v
  14509. return s
  14510. }
  14511. func (s *PutBucketCorsInput) getBucket() (v string) {
  14512. if s.Bucket == nil {
  14513. return v
  14514. }
  14515. return *s.Bucket
  14516. }
  14517. // SetCORSConfiguration sets the CORSConfiguration field's value.
  14518. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  14519. s.CORSConfiguration = v
  14520. return s
  14521. }
  14522. type PutBucketCorsOutput struct {
  14523. _ struct{} `type:"structure"`
  14524. }
  14525. // String returns the string representation
  14526. func (s PutBucketCorsOutput) String() string {
  14527. return awsutil.Prettify(s)
  14528. }
  14529. // GoString returns the string representation
  14530. func (s PutBucketCorsOutput) GoString() string {
  14531. return s.String()
  14532. }
  14533. type PutBucketEncryptionInput struct {
  14534. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  14535. // The name of the bucket for which the server-side encryption configuration
  14536. // is set.
  14537. //
  14538. // Bucket is a required field
  14539. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14540. // Container for server-side encryption configuration rules. Currently S3 supports
  14541. // one rule only.
  14542. //
  14543. // ServerSideEncryptionConfiguration is a required field
  14544. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14545. }
  14546. // String returns the string representation
  14547. func (s PutBucketEncryptionInput) String() string {
  14548. return awsutil.Prettify(s)
  14549. }
  14550. // GoString returns the string representation
  14551. func (s PutBucketEncryptionInput) GoString() string {
  14552. return s.String()
  14553. }
  14554. // Validate inspects the fields of the type to determine if they are valid.
  14555. func (s *PutBucketEncryptionInput) Validate() error {
  14556. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  14557. if s.Bucket == nil {
  14558. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14559. }
  14560. if s.ServerSideEncryptionConfiguration == nil {
  14561. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  14562. }
  14563. if s.ServerSideEncryptionConfiguration != nil {
  14564. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  14565. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  14566. }
  14567. }
  14568. if invalidParams.Len() > 0 {
  14569. return invalidParams
  14570. }
  14571. return nil
  14572. }
  14573. // SetBucket sets the Bucket field's value.
  14574. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  14575. s.Bucket = &v
  14576. return s
  14577. }
  14578. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  14579. if s.Bucket == nil {
  14580. return v
  14581. }
  14582. return *s.Bucket
  14583. }
  14584. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  14585. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  14586. s.ServerSideEncryptionConfiguration = v
  14587. return s
  14588. }
  14589. type PutBucketEncryptionOutput struct {
  14590. _ struct{} `type:"structure"`
  14591. }
  14592. // String returns the string representation
  14593. func (s PutBucketEncryptionOutput) String() string {
  14594. return awsutil.Prettify(s)
  14595. }
  14596. // GoString returns the string representation
  14597. func (s PutBucketEncryptionOutput) GoString() string {
  14598. return s.String()
  14599. }
  14600. type PutBucketInventoryConfigurationInput struct {
  14601. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  14602. // The name of the bucket where the inventory configuration will be stored.
  14603. //
  14604. // Bucket is a required field
  14605. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14606. // The ID used to identify the inventory configuration.
  14607. //
  14608. // Id is a required field
  14609. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14610. // Specifies the inventory configuration.
  14611. //
  14612. // InventoryConfiguration is a required field
  14613. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14614. }
  14615. // String returns the string representation
  14616. func (s PutBucketInventoryConfigurationInput) String() string {
  14617. return awsutil.Prettify(s)
  14618. }
  14619. // GoString returns the string representation
  14620. func (s PutBucketInventoryConfigurationInput) GoString() string {
  14621. return s.String()
  14622. }
  14623. // Validate inspects the fields of the type to determine if they are valid.
  14624. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  14625. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  14626. if s.Bucket == nil {
  14627. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14628. }
  14629. if s.Id == nil {
  14630. invalidParams.Add(request.NewErrParamRequired("Id"))
  14631. }
  14632. if s.InventoryConfiguration == nil {
  14633. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  14634. }
  14635. if s.InventoryConfiguration != nil {
  14636. if err := s.InventoryConfiguration.Validate(); err != nil {
  14637. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  14638. }
  14639. }
  14640. if invalidParams.Len() > 0 {
  14641. return invalidParams
  14642. }
  14643. return nil
  14644. }
  14645. // SetBucket sets the Bucket field's value.
  14646. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  14647. s.Bucket = &v
  14648. return s
  14649. }
  14650. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  14651. if s.Bucket == nil {
  14652. return v
  14653. }
  14654. return *s.Bucket
  14655. }
  14656. // SetId sets the Id field's value.
  14657. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  14658. s.Id = &v
  14659. return s
  14660. }
  14661. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  14662. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  14663. s.InventoryConfiguration = v
  14664. return s
  14665. }
  14666. type PutBucketInventoryConfigurationOutput struct {
  14667. _ struct{} `type:"structure"`
  14668. }
  14669. // String returns the string representation
  14670. func (s PutBucketInventoryConfigurationOutput) String() string {
  14671. return awsutil.Prettify(s)
  14672. }
  14673. // GoString returns the string representation
  14674. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  14675. return s.String()
  14676. }
  14677. type PutBucketLifecycleConfigurationInput struct {
  14678. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  14679. // Bucket is a required field
  14680. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14681. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14682. }
  14683. // String returns the string representation
  14684. func (s PutBucketLifecycleConfigurationInput) String() string {
  14685. return awsutil.Prettify(s)
  14686. }
  14687. // GoString returns the string representation
  14688. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  14689. return s.String()
  14690. }
  14691. // Validate inspects the fields of the type to determine if they are valid.
  14692. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  14693. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  14694. if s.Bucket == nil {
  14695. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14696. }
  14697. if s.LifecycleConfiguration != nil {
  14698. if err := s.LifecycleConfiguration.Validate(); err != nil {
  14699. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  14700. }
  14701. }
  14702. if invalidParams.Len() > 0 {
  14703. return invalidParams
  14704. }
  14705. return nil
  14706. }
  14707. // SetBucket sets the Bucket field's value.
  14708. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  14709. s.Bucket = &v
  14710. return s
  14711. }
  14712. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  14713. if s.Bucket == nil {
  14714. return v
  14715. }
  14716. return *s.Bucket
  14717. }
  14718. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  14719. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  14720. s.LifecycleConfiguration = v
  14721. return s
  14722. }
  14723. type PutBucketLifecycleConfigurationOutput struct {
  14724. _ struct{} `type:"structure"`
  14725. }
  14726. // String returns the string representation
  14727. func (s PutBucketLifecycleConfigurationOutput) String() string {
  14728. return awsutil.Prettify(s)
  14729. }
  14730. // GoString returns the string representation
  14731. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  14732. return s.String()
  14733. }
  14734. type PutBucketLifecycleInput struct {
  14735. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  14736. // Bucket is a required field
  14737. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14738. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14739. }
  14740. // String returns the string representation
  14741. func (s PutBucketLifecycleInput) String() string {
  14742. return awsutil.Prettify(s)
  14743. }
  14744. // GoString returns the string representation
  14745. func (s PutBucketLifecycleInput) GoString() string {
  14746. return s.String()
  14747. }
  14748. // Validate inspects the fields of the type to determine if they are valid.
  14749. func (s *PutBucketLifecycleInput) Validate() error {
  14750. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  14751. if s.Bucket == nil {
  14752. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14753. }
  14754. if s.LifecycleConfiguration != nil {
  14755. if err := s.LifecycleConfiguration.Validate(); err != nil {
  14756. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  14757. }
  14758. }
  14759. if invalidParams.Len() > 0 {
  14760. return invalidParams
  14761. }
  14762. return nil
  14763. }
  14764. // SetBucket sets the Bucket field's value.
  14765. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  14766. s.Bucket = &v
  14767. return s
  14768. }
  14769. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  14770. if s.Bucket == nil {
  14771. return v
  14772. }
  14773. return *s.Bucket
  14774. }
  14775. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  14776. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  14777. s.LifecycleConfiguration = v
  14778. return s
  14779. }
  14780. type PutBucketLifecycleOutput struct {
  14781. _ struct{} `type:"structure"`
  14782. }
  14783. // String returns the string representation
  14784. func (s PutBucketLifecycleOutput) String() string {
  14785. return awsutil.Prettify(s)
  14786. }
  14787. // GoString returns the string representation
  14788. func (s PutBucketLifecycleOutput) GoString() string {
  14789. return s.String()
  14790. }
  14791. type PutBucketLoggingInput struct {
  14792. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  14793. // Bucket is a required field
  14794. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14795. // BucketLoggingStatus is a required field
  14796. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14797. }
  14798. // String returns the string representation
  14799. func (s PutBucketLoggingInput) String() string {
  14800. return awsutil.Prettify(s)
  14801. }
  14802. // GoString returns the string representation
  14803. func (s PutBucketLoggingInput) GoString() string {
  14804. return s.String()
  14805. }
  14806. // Validate inspects the fields of the type to determine if they are valid.
  14807. func (s *PutBucketLoggingInput) Validate() error {
  14808. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  14809. if s.Bucket == nil {
  14810. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14811. }
  14812. if s.BucketLoggingStatus == nil {
  14813. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  14814. }
  14815. if s.BucketLoggingStatus != nil {
  14816. if err := s.BucketLoggingStatus.Validate(); err != nil {
  14817. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  14818. }
  14819. }
  14820. if invalidParams.Len() > 0 {
  14821. return invalidParams
  14822. }
  14823. return nil
  14824. }
  14825. // SetBucket sets the Bucket field's value.
  14826. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  14827. s.Bucket = &v
  14828. return s
  14829. }
  14830. func (s *PutBucketLoggingInput) getBucket() (v string) {
  14831. if s.Bucket == nil {
  14832. return v
  14833. }
  14834. return *s.Bucket
  14835. }
  14836. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  14837. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  14838. s.BucketLoggingStatus = v
  14839. return s
  14840. }
  14841. type PutBucketLoggingOutput struct {
  14842. _ struct{} `type:"structure"`
  14843. }
  14844. // String returns the string representation
  14845. func (s PutBucketLoggingOutput) String() string {
  14846. return awsutil.Prettify(s)
  14847. }
  14848. // GoString returns the string representation
  14849. func (s PutBucketLoggingOutput) GoString() string {
  14850. return s.String()
  14851. }
  14852. type PutBucketMetricsConfigurationInput struct {
  14853. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  14854. // The name of the bucket for which the metrics configuration is set.
  14855. //
  14856. // Bucket is a required field
  14857. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14858. // The ID used to identify the metrics configuration.
  14859. //
  14860. // Id is a required field
  14861. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14862. // Specifies the metrics configuration.
  14863. //
  14864. // MetricsConfiguration is a required field
  14865. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14866. }
  14867. // String returns the string representation
  14868. func (s PutBucketMetricsConfigurationInput) String() string {
  14869. return awsutil.Prettify(s)
  14870. }
  14871. // GoString returns the string representation
  14872. func (s PutBucketMetricsConfigurationInput) GoString() string {
  14873. return s.String()
  14874. }
  14875. // Validate inspects the fields of the type to determine if they are valid.
  14876. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  14877. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  14878. if s.Bucket == nil {
  14879. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14880. }
  14881. if s.Id == nil {
  14882. invalidParams.Add(request.NewErrParamRequired("Id"))
  14883. }
  14884. if s.MetricsConfiguration == nil {
  14885. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  14886. }
  14887. if s.MetricsConfiguration != nil {
  14888. if err := s.MetricsConfiguration.Validate(); err != nil {
  14889. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  14890. }
  14891. }
  14892. if invalidParams.Len() > 0 {
  14893. return invalidParams
  14894. }
  14895. return nil
  14896. }
  14897. // SetBucket sets the Bucket field's value.
  14898. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  14899. s.Bucket = &v
  14900. return s
  14901. }
  14902. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  14903. if s.Bucket == nil {
  14904. return v
  14905. }
  14906. return *s.Bucket
  14907. }
  14908. // SetId sets the Id field's value.
  14909. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  14910. s.Id = &v
  14911. return s
  14912. }
  14913. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  14914. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  14915. s.MetricsConfiguration = v
  14916. return s
  14917. }
  14918. type PutBucketMetricsConfigurationOutput struct {
  14919. _ struct{} `type:"structure"`
  14920. }
  14921. // String returns the string representation
  14922. func (s PutBucketMetricsConfigurationOutput) String() string {
  14923. return awsutil.Prettify(s)
  14924. }
  14925. // GoString returns the string representation
  14926. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  14927. return s.String()
  14928. }
  14929. type PutBucketNotificationConfigurationInput struct {
  14930. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14931. // Bucket is a required field
  14932. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14933. // Container for specifying the notification configuration of the bucket. If
  14934. // this element is empty, notifications are turned off on the bucket.
  14935. //
  14936. // NotificationConfiguration is a required field
  14937. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14938. }
  14939. // String returns the string representation
  14940. func (s PutBucketNotificationConfigurationInput) String() string {
  14941. return awsutil.Prettify(s)
  14942. }
  14943. // GoString returns the string representation
  14944. func (s PutBucketNotificationConfigurationInput) GoString() string {
  14945. return s.String()
  14946. }
  14947. // Validate inspects the fields of the type to determine if they are valid.
  14948. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  14949. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  14950. if s.Bucket == nil {
  14951. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14952. }
  14953. if s.NotificationConfiguration == nil {
  14954. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  14955. }
  14956. if s.NotificationConfiguration != nil {
  14957. if err := s.NotificationConfiguration.Validate(); err != nil {
  14958. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  14959. }
  14960. }
  14961. if invalidParams.Len() > 0 {
  14962. return invalidParams
  14963. }
  14964. return nil
  14965. }
  14966. // SetBucket sets the Bucket field's value.
  14967. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  14968. s.Bucket = &v
  14969. return s
  14970. }
  14971. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  14972. if s.Bucket == nil {
  14973. return v
  14974. }
  14975. return *s.Bucket
  14976. }
  14977. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  14978. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  14979. s.NotificationConfiguration = v
  14980. return s
  14981. }
  14982. type PutBucketNotificationConfigurationOutput struct {
  14983. _ struct{} `type:"structure"`
  14984. }
  14985. // String returns the string representation
  14986. func (s PutBucketNotificationConfigurationOutput) String() string {
  14987. return awsutil.Prettify(s)
  14988. }
  14989. // GoString returns the string representation
  14990. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  14991. return s.String()
  14992. }
  14993. type PutBucketNotificationInput struct {
  14994. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14995. // Bucket is a required field
  14996. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14997. // NotificationConfiguration is a required field
  14998. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14999. }
  15000. // String returns the string representation
  15001. func (s PutBucketNotificationInput) String() string {
  15002. return awsutil.Prettify(s)
  15003. }
  15004. // GoString returns the string representation
  15005. func (s PutBucketNotificationInput) GoString() string {
  15006. return s.String()
  15007. }
  15008. // Validate inspects the fields of the type to determine if they are valid.
  15009. func (s *PutBucketNotificationInput) Validate() error {
  15010. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  15011. if s.Bucket == nil {
  15012. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15013. }
  15014. if s.NotificationConfiguration == nil {
  15015. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  15016. }
  15017. if invalidParams.Len() > 0 {
  15018. return invalidParams
  15019. }
  15020. return nil
  15021. }
  15022. // SetBucket sets the Bucket field's value.
  15023. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  15024. s.Bucket = &v
  15025. return s
  15026. }
  15027. func (s *PutBucketNotificationInput) getBucket() (v string) {
  15028. if s.Bucket == nil {
  15029. return v
  15030. }
  15031. return *s.Bucket
  15032. }
  15033. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  15034. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  15035. s.NotificationConfiguration = v
  15036. return s
  15037. }
  15038. type PutBucketNotificationOutput struct {
  15039. _ struct{} `type:"structure"`
  15040. }
  15041. // String returns the string representation
  15042. func (s PutBucketNotificationOutput) String() string {
  15043. return awsutil.Prettify(s)
  15044. }
  15045. // GoString returns the string representation
  15046. func (s PutBucketNotificationOutput) GoString() string {
  15047. return s.String()
  15048. }
  15049. type PutBucketPolicyInput struct {
  15050. _ struct{} `type:"structure" payload:"Policy"`
  15051. // Bucket is a required field
  15052. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15053. // Set this parameter to true to confirm that you want to remove your permissions
  15054. // to change this bucket policy in the future.
  15055. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  15056. // The bucket policy as a JSON document.
  15057. //
  15058. // Policy is a required field
  15059. Policy *string `type:"string" required:"true"`
  15060. }
  15061. // String returns the string representation
  15062. func (s PutBucketPolicyInput) String() string {
  15063. return awsutil.Prettify(s)
  15064. }
  15065. // GoString returns the string representation
  15066. func (s PutBucketPolicyInput) GoString() string {
  15067. return s.String()
  15068. }
  15069. // Validate inspects the fields of the type to determine if they are valid.
  15070. func (s *PutBucketPolicyInput) Validate() error {
  15071. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  15072. if s.Bucket == nil {
  15073. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15074. }
  15075. if s.Policy == nil {
  15076. invalidParams.Add(request.NewErrParamRequired("Policy"))
  15077. }
  15078. if invalidParams.Len() > 0 {
  15079. return invalidParams
  15080. }
  15081. return nil
  15082. }
  15083. // SetBucket sets the Bucket field's value.
  15084. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  15085. s.Bucket = &v
  15086. return s
  15087. }
  15088. func (s *PutBucketPolicyInput) getBucket() (v string) {
  15089. if s.Bucket == nil {
  15090. return v
  15091. }
  15092. return *s.Bucket
  15093. }
  15094. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  15095. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  15096. s.ConfirmRemoveSelfBucketAccess = &v
  15097. return s
  15098. }
  15099. // SetPolicy sets the Policy field's value.
  15100. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  15101. s.Policy = &v
  15102. return s
  15103. }
  15104. type PutBucketPolicyOutput struct {
  15105. _ struct{} `type:"structure"`
  15106. }
  15107. // String returns the string representation
  15108. func (s PutBucketPolicyOutput) String() string {
  15109. return awsutil.Prettify(s)
  15110. }
  15111. // GoString returns the string representation
  15112. func (s PutBucketPolicyOutput) GoString() string {
  15113. return s.String()
  15114. }
  15115. type PutBucketReplicationInput struct {
  15116. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  15117. // Bucket is a required field
  15118. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15119. // Container for replication rules. You can add as many as 1,000 rules. Total
  15120. // replication configuration size can be up to 2 MB.
  15121. //
  15122. // ReplicationConfiguration is a required field
  15123. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15124. }
  15125. // String returns the string representation
  15126. func (s PutBucketReplicationInput) String() string {
  15127. return awsutil.Prettify(s)
  15128. }
  15129. // GoString returns the string representation
  15130. func (s PutBucketReplicationInput) GoString() string {
  15131. return s.String()
  15132. }
  15133. // Validate inspects the fields of the type to determine if they are valid.
  15134. func (s *PutBucketReplicationInput) Validate() error {
  15135. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  15136. if s.Bucket == nil {
  15137. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15138. }
  15139. if s.ReplicationConfiguration == nil {
  15140. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  15141. }
  15142. if s.ReplicationConfiguration != nil {
  15143. if err := s.ReplicationConfiguration.Validate(); err != nil {
  15144. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  15145. }
  15146. }
  15147. if invalidParams.Len() > 0 {
  15148. return invalidParams
  15149. }
  15150. return nil
  15151. }
  15152. // SetBucket sets the Bucket field's value.
  15153. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  15154. s.Bucket = &v
  15155. return s
  15156. }
  15157. func (s *PutBucketReplicationInput) getBucket() (v string) {
  15158. if s.Bucket == nil {
  15159. return v
  15160. }
  15161. return *s.Bucket
  15162. }
  15163. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  15164. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  15165. s.ReplicationConfiguration = v
  15166. return s
  15167. }
  15168. type PutBucketReplicationOutput struct {
  15169. _ struct{} `type:"structure"`
  15170. }
  15171. // String returns the string representation
  15172. func (s PutBucketReplicationOutput) String() string {
  15173. return awsutil.Prettify(s)
  15174. }
  15175. // GoString returns the string representation
  15176. func (s PutBucketReplicationOutput) GoString() string {
  15177. return s.String()
  15178. }
  15179. type PutBucketRequestPaymentInput struct {
  15180. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  15181. // Bucket is a required field
  15182. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15183. // RequestPaymentConfiguration is a required field
  15184. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15185. }
  15186. // String returns the string representation
  15187. func (s PutBucketRequestPaymentInput) String() string {
  15188. return awsutil.Prettify(s)
  15189. }
  15190. // GoString returns the string representation
  15191. func (s PutBucketRequestPaymentInput) GoString() string {
  15192. return s.String()
  15193. }
  15194. // Validate inspects the fields of the type to determine if they are valid.
  15195. func (s *PutBucketRequestPaymentInput) Validate() error {
  15196. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  15197. if s.Bucket == nil {
  15198. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15199. }
  15200. if s.RequestPaymentConfiguration == nil {
  15201. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  15202. }
  15203. if s.RequestPaymentConfiguration != nil {
  15204. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  15205. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  15206. }
  15207. }
  15208. if invalidParams.Len() > 0 {
  15209. return invalidParams
  15210. }
  15211. return nil
  15212. }
  15213. // SetBucket sets the Bucket field's value.
  15214. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  15215. s.Bucket = &v
  15216. return s
  15217. }
  15218. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  15219. if s.Bucket == nil {
  15220. return v
  15221. }
  15222. return *s.Bucket
  15223. }
  15224. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  15225. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  15226. s.RequestPaymentConfiguration = v
  15227. return s
  15228. }
  15229. type PutBucketRequestPaymentOutput struct {
  15230. _ struct{} `type:"structure"`
  15231. }
  15232. // String returns the string representation
  15233. func (s PutBucketRequestPaymentOutput) String() string {
  15234. return awsutil.Prettify(s)
  15235. }
  15236. // GoString returns the string representation
  15237. func (s PutBucketRequestPaymentOutput) GoString() string {
  15238. return s.String()
  15239. }
  15240. type PutBucketTaggingInput struct {
  15241. _ struct{} `type:"structure" payload:"Tagging"`
  15242. // Bucket is a required field
  15243. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15244. // Tagging is a required field
  15245. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15246. }
  15247. // String returns the string representation
  15248. func (s PutBucketTaggingInput) String() string {
  15249. return awsutil.Prettify(s)
  15250. }
  15251. // GoString returns the string representation
  15252. func (s PutBucketTaggingInput) GoString() string {
  15253. return s.String()
  15254. }
  15255. // Validate inspects the fields of the type to determine if they are valid.
  15256. func (s *PutBucketTaggingInput) Validate() error {
  15257. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  15258. if s.Bucket == nil {
  15259. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15260. }
  15261. if s.Tagging == nil {
  15262. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  15263. }
  15264. if s.Tagging != nil {
  15265. if err := s.Tagging.Validate(); err != nil {
  15266. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  15267. }
  15268. }
  15269. if invalidParams.Len() > 0 {
  15270. return invalidParams
  15271. }
  15272. return nil
  15273. }
  15274. // SetBucket sets the Bucket field's value.
  15275. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  15276. s.Bucket = &v
  15277. return s
  15278. }
  15279. func (s *PutBucketTaggingInput) getBucket() (v string) {
  15280. if s.Bucket == nil {
  15281. return v
  15282. }
  15283. return *s.Bucket
  15284. }
  15285. // SetTagging sets the Tagging field's value.
  15286. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  15287. s.Tagging = v
  15288. return s
  15289. }
  15290. type PutBucketTaggingOutput struct {
  15291. _ struct{} `type:"structure"`
  15292. }
  15293. // String returns the string representation
  15294. func (s PutBucketTaggingOutput) String() string {
  15295. return awsutil.Prettify(s)
  15296. }
  15297. // GoString returns the string representation
  15298. func (s PutBucketTaggingOutput) GoString() string {
  15299. return s.String()
  15300. }
  15301. type PutBucketVersioningInput struct {
  15302. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  15303. // Bucket is a required field
  15304. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15305. // The concatenation of the authentication device's serial number, a space,
  15306. // and the value that is displayed on your authentication device.
  15307. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  15308. // VersioningConfiguration is a required field
  15309. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15310. }
  15311. // String returns the string representation
  15312. func (s PutBucketVersioningInput) String() string {
  15313. return awsutil.Prettify(s)
  15314. }
  15315. // GoString returns the string representation
  15316. func (s PutBucketVersioningInput) GoString() string {
  15317. return s.String()
  15318. }
  15319. // Validate inspects the fields of the type to determine if they are valid.
  15320. func (s *PutBucketVersioningInput) Validate() error {
  15321. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  15322. if s.Bucket == nil {
  15323. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15324. }
  15325. if s.VersioningConfiguration == nil {
  15326. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  15327. }
  15328. if invalidParams.Len() > 0 {
  15329. return invalidParams
  15330. }
  15331. return nil
  15332. }
  15333. // SetBucket sets the Bucket field's value.
  15334. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  15335. s.Bucket = &v
  15336. return s
  15337. }
  15338. func (s *PutBucketVersioningInput) getBucket() (v string) {
  15339. if s.Bucket == nil {
  15340. return v
  15341. }
  15342. return *s.Bucket
  15343. }
  15344. // SetMFA sets the MFA field's value.
  15345. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  15346. s.MFA = &v
  15347. return s
  15348. }
  15349. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  15350. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  15351. s.VersioningConfiguration = v
  15352. return s
  15353. }
  15354. type PutBucketVersioningOutput struct {
  15355. _ struct{} `type:"structure"`
  15356. }
  15357. // String returns the string representation
  15358. func (s PutBucketVersioningOutput) String() string {
  15359. return awsutil.Prettify(s)
  15360. }
  15361. // GoString returns the string representation
  15362. func (s PutBucketVersioningOutput) GoString() string {
  15363. return s.String()
  15364. }
  15365. type PutBucketWebsiteInput struct {
  15366. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  15367. // Bucket is a required field
  15368. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15369. // WebsiteConfiguration is a required field
  15370. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15371. }
  15372. // String returns the string representation
  15373. func (s PutBucketWebsiteInput) String() string {
  15374. return awsutil.Prettify(s)
  15375. }
  15376. // GoString returns the string representation
  15377. func (s PutBucketWebsiteInput) GoString() string {
  15378. return s.String()
  15379. }
  15380. // Validate inspects the fields of the type to determine if they are valid.
  15381. func (s *PutBucketWebsiteInput) Validate() error {
  15382. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  15383. if s.Bucket == nil {
  15384. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15385. }
  15386. if s.WebsiteConfiguration == nil {
  15387. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  15388. }
  15389. if s.WebsiteConfiguration != nil {
  15390. if err := s.WebsiteConfiguration.Validate(); err != nil {
  15391. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  15392. }
  15393. }
  15394. if invalidParams.Len() > 0 {
  15395. return invalidParams
  15396. }
  15397. return nil
  15398. }
  15399. // SetBucket sets the Bucket field's value.
  15400. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  15401. s.Bucket = &v
  15402. return s
  15403. }
  15404. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  15405. if s.Bucket == nil {
  15406. return v
  15407. }
  15408. return *s.Bucket
  15409. }
  15410. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  15411. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  15412. s.WebsiteConfiguration = v
  15413. return s
  15414. }
  15415. type PutBucketWebsiteOutput struct {
  15416. _ struct{} `type:"structure"`
  15417. }
  15418. // String returns the string representation
  15419. func (s PutBucketWebsiteOutput) String() string {
  15420. return awsutil.Prettify(s)
  15421. }
  15422. // GoString returns the string representation
  15423. func (s PutBucketWebsiteOutput) GoString() string {
  15424. return s.String()
  15425. }
  15426. type PutObjectAclInput struct {
  15427. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  15428. // The canned ACL to apply to the object.
  15429. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  15430. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15431. // Bucket is a required field
  15432. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15433. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  15434. // bucket.
  15435. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15436. // Allows grantee to list the objects in the bucket.
  15437. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15438. // Allows grantee to read the bucket ACL.
  15439. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15440. // Allows grantee to create, overwrite, and delete any object in the bucket.
  15441. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  15442. // Allows grantee to write the ACL for the applicable bucket.
  15443. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15444. // Key is a required field
  15445. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15446. // Confirms that the requester knows that she or he will be charged for the
  15447. // request. Bucket owners need not specify this parameter in their requests.
  15448. // Documentation on downloading objects from requester pays buckets can be found
  15449. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15450. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15451. // VersionId used to reference a specific version of the object.
  15452. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15453. }
  15454. // String returns the string representation
  15455. func (s PutObjectAclInput) String() string {
  15456. return awsutil.Prettify(s)
  15457. }
  15458. // GoString returns the string representation
  15459. func (s PutObjectAclInput) GoString() string {
  15460. return s.String()
  15461. }
  15462. // Validate inspects the fields of the type to determine if they are valid.
  15463. func (s *PutObjectAclInput) Validate() error {
  15464. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  15465. if s.Bucket == nil {
  15466. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15467. }
  15468. if s.Key == nil {
  15469. invalidParams.Add(request.NewErrParamRequired("Key"))
  15470. }
  15471. if s.Key != nil && len(*s.Key) < 1 {
  15472. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15473. }
  15474. if s.AccessControlPolicy != nil {
  15475. if err := s.AccessControlPolicy.Validate(); err != nil {
  15476. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  15477. }
  15478. }
  15479. if invalidParams.Len() > 0 {
  15480. return invalidParams
  15481. }
  15482. return nil
  15483. }
  15484. // SetACL sets the ACL field's value.
  15485. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  15486. s.ACL = &v
  15487. return s
  15488. }
  15489. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  15490. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  15491. s.AccessControlPolicy = v
  15492. return s
  15493. }
  15494. // SetBucket sets the Bucket field's value.
  15495. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  15496. s.Bucket = &v
  15497. return s
  15498. }
  15499. func (s *PutObjectAclInput) getBucket() (v string) {
  15500. if s.Bucket == nil {
  15501. return v
  15502. }
  15503. return *s.Bucket
  15504. }
  15505. // SetGrantFullControl sets the GrantFullControl field's value.
  15506. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  15507. s.GrantFullControl = &v
  15508. return s
  15509. }
  15510. // SetGrantRead sets the GrantRead field's value.
  15511. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  15512. s.GrantRead = &v
  15513. return s
  15514. }
  15515. // SetGrantReadACP sets the GrantReadACP field's value.
  15516. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  15517. s.GrantReadACP = &v
  15518. return s
  15519. }
  15520. // SetGrantWrite sets the GrantWrite field's value.
  15521. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  15522. s.GrantWrite = &v
  15523. return s
  15524. }
  15525. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15526. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  15527. s.GrantWriteACP = &v
  15528. return s
  15529. }
  15530. // SetKey sets the Key field's value.
  15531. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  15532. s.Key = &v
  15533. return s
  15534. }
  15535. // SetRequestPayer sets the RequestPayer field's value.
  15536. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  15537. s.RequestPayer = &v
  15538. return s
  15539. }
  15540. // SetVersionId sets the VersionId field's value.
  15541. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  15542. s.VersionId = &v
  15543. return s
  15544. }
  15545. type PutObjectAclOutput struct {
  15546. _ struct{} `type:"structure"`
  15547. // If present, indicates that the requester was successfully charged for the
  15548. // request.
  15549. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15550. }
  15551. // String returns the string representation
  15552. func (s PutObjectAclOutput) String() string {
  15553. return awsutil.Prettify(s)
  15554. }
  15555. // GoString returns the string representation
  15556. func (s PutObjectAclOutput) GoString() string {
  15557. return s.String()
  15558. }
  15559. // SetRequestCharged sets the RequestCharged field's value.
  15560. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  15561. s.RequestCharged = &v
  15562. return s
  15563. }
  15564. type PutObjectInput struct {
  15565. _ struct{} `type:"structure" payload:"Body"`
  15566. // The canned ACL to apply to the object.
  15567. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  15568. // Object data.
  15569. Body io.ReadSeeker `type:"blob"`
  15570. // Name of the bucket to which the PUT operation was initiated.
  15571. //
  15572. // Bucket is a required field
  15573. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15574. // Specifies caching behavior along the request/reply chain.
  15575. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  15576. // Specifies presentational information for the object.
  15577. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  15578. // Specifies what content encodings have been applied to the object and thus
  15579. // what decoding mechanisms must be applied to obtain the media-type referenced
  15580. // by the Content-Type header field.
  15581. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  15582. // The language the content is in.
  15583. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  15584. // Size of the body in bytes. This parameter is useful when the size of the
  15585. // body cannot be determined automatically.
  15586. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  15587. // The base64-encoded 128-bit MD5 digest of the part data.
  15588. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  15589. // A standard MIME type describing the format of the object data.
  15590. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  15591. // The date and time at which the object is no longer cacheable.
  15592. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  15593. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  15594. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15595. // Allows grantee to read the object data and its metadata.
  15596. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15597. // Allows grantee to read the object ACL.
  15598. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15599. // Allows grantee to write the ACL for the applicable object.
  15600. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15601. // Object key for which the PUT operation was initiated.
  15602. //
  15603. // Key is a required field
  15604. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15605. // A map of metadata to store with the object in S3.
  15606. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  15607. // Confirms that the requester knows that she or he will be charged for the
  15608. // request. Bucket owners need not specify this parameter in their requests.
  15609. // Documentation on downloading objects from requester pays buckets can be found
  15610. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15611. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15612. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  15613. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15614. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  15615. // data. This value is used to store the object and then it is discarded; Amazon
  15616. // does not store the encryption key. The key must be appropriate for use with
  15617. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  15618. // header.
  15619. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  15620. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15621. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15622. // key was transmitted without error.
  15623. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15624. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  15625. // requests for an object protected by AWS KMS will fail if not made via SSL
  15626. // or using SigV4. Documentation on configuring any of the officially supported
  15627. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  15628. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15629. // The Server-side encryption algorithm used when storing this object in S3
  15630. // (e.g., AES256, aws:kms).
  15631. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15632. // The type of storage to use for the object. Defaults to 'STANDARD'.
  15633. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  15634. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  15635. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  15636. // If the bucket is configured as a website, redirects requests for this object
  15637. // to another object in the same bucket or to an external URL. Amazon S3 stores
  15638. // the value of this header in the object metadata.
  15639. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  15640. }
  15641. // String returns the string representation
  15642. func (s PutObjectInput) String() string {
  15643. return awsutil.Prettify(s)
  15644. }
  15645. // GoString returns the string representation
  15646. func (s PutObjectInput) GoString() string {
  15647. return s.String()
  15648. }
  15649. // Validate inspects the fields of the type to determine if they are valid.
  15650. func (s *PutObjectInput) Validate() error {
  15651. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  15652. if s.Bucket == nil {
  15653. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15654. }
  15655. if s.Key == nil {
  15656. invalidParams.Add(request.NewErrParamRequired("Key"))
  15657. }
  15658. if s.Key != nil && len(*s.Key) < 1 {
  15659. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15660. }
  15661. if invalidParams.Len() > 0 {
  15662. return invalidParams
  15663. }
  15664. return nil
  15665. }
  15666. // SetACL sets the ACL field's value.
  15667. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  15668. s.ACL = &v
  15669. return s
  15670. }
  15671. // SetBody sets the Body field's value.
  15672. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  15673. s.Body = v
  15674. return s
  15675. }
  15676. // SetBucket sets the Bucket field's value.
  15677. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  15678. s.Bucket = &v
  15679. return s
  15680. }
  15681. func (s *PutObjectInput) getBucket() (v string) {
  15682. if s.Bucket == nil {
  15683. return v
  15684. }
  15685. return *s.Bucket
  15686. }
  15687. // SetCacheControl sets the CacheControl field's value.
  15688. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  15689. s.CacheControl = &v
  15690. return s
  15691. }
  15692. // SetContentDisposition sets the ContentDisposition field's value.
  15693. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  15694. s.ContentDisposition = &v
  15695. return s
  15696. }
  15697. // SetContentEncoding sets the ContentEncoding field's value.
  15698. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  15699. s.ContentEncoding = &v
  15700. return s
  15701. }
  15702. // SetContentLanguage sets the ContentLanguage field's value.
  15703. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  15704. s.ContentLanguage = &v
  15705. return s
  15706. }
  15707. // SetContentLength sets the ContentLength field's value.
  15708. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  15709. s.ContentLength = &v
  15710. return s
  15711. }
  15712. // SetContentMD5 sets the ContentMD5 field's value.
  15713. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  15714. s.ContentMD5 = &v
  15715. return s
  15716. }
  15717. // SetContentType sets the ContentType field's value.
  15718. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  15719. s.ContentType = &v
  15720. return s
  15721. }
  15722. // SetExpires sets the Expires field's value.
  15723. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  15724. s.Expires = &v
  15725. return s
  15726. }
  15727. // SetGrantFullControl sets the GrantFullControl field's value.
  15728. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  15729. s.GrantFullControl = &v
  15730. return s
  15731. }
  15732. // SetGrantRead sets the GrantRead field's value.
  15733. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  15734. s.GrantRead = &v
  15735. return s
  15736. }
  15737. // SetGrantReadACP sets the GrantReadACP field's value.
  15738. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  15739. s.GrantReadACP = &v
  15740. return s
  15741. }
  15742. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15743. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  15744. s.GrantWriteACP = &v
  15745. return s
  15746. }
  15747. // SetKey sets the Key field's value.
  15748. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  15749. s.Key = &v
  15750. return s
  15751. }
  15752. // SetMetadata sets the Metadata field's value.
  15753. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  15754. s.Metadata = v
  15755. return s
  15756. }
  15757. // SetRequestPayer sets the RequestPayer field's value.
  15758. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  15759. s.RequestPayer = &v
  15760. return s
  15761. }
  15762. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15763. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  15764. s.SSECustomerAlgorithm = &v
  15765. return s
  15766. }
  15767. // SetSSECustomerKey sets the SSECustomerKey field's value.
  15768. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  15769. s.SSECustomerKey = &v
  15770. return s
  15771. }
  15772. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  15773. if s.SSECustomerKey == nil {
  15774. return v
  15775. }
  15776. return *s.SSECustomerKey
  15777. }
  15778. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15779. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  15780. s.SSECustomerKeyMD5 = &v
  15781. return s
  15782. }
  15783. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15784. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  15785. s.SSEKMSKeyId = &v
  15786. return s
  15787. }
  15788. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15789. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  15790. s.ServerSideEncryption = &v
  15791. return s
  15792. }
  15793. // SetStorageClass sets the StorageClass field's value.
  15794. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  15795. s.StorageClass = &v
  15796. return s
  15797. }
  15798. // SetTagging sets the Tagging field's value.
  15799. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  15800. s.Tagging = &v
  15801. return s
  15802. }
  15803. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  15804. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  15805. s.WebsiteRedirectLocation = &v
  15806. return s
  15807. }
  15808. type PutObjectOutput struct {
  15809. _ struct{} `type:"structure"`
  15810. // Entity tag for the uploaded object.
  15811. ETag *string `location:"header" locationName:"ETag" type:"string"`
  15812. // If the object expiration is configured, this will contain the expiration
  15813. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  15814. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  15815. // If present, indicates that the requester was successfully charged for the
  15816. // request.
  15817. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15818. // If server-side encryption with a customer-provided encryption key was requested,
  15819. // the response will include this header confirming the encryption algorithm
  15820. // used.
  15821. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15822. // If server-side encryption with a customer-provided encryption key was requested,
  15823. // the response will include this header to provide round trip message integrity
  15824. // verification of the customer-provided encryption key.
  15825. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15826. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  15827. // encryption key that was used for the object.
  15828. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15829. // The Server-side encryption algorithm used when storing this object in S3
  15830. // (e.g., AES256, aws:kms).
  15831. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15832. // Version of the object.
  15833. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15834. }
  15835. // String returns the string representation
  15836. func (s PutObjectOutput) String() string {
  15837. return awsutil.Prettify(s)
  15838. }
  15839. // GoString returns the string representation
  15840. func (s PutObjectOutput) GoString() string {
  15841. return s.String()
  15842. }
  15843. // SetETag sets the ETag field's value.
  15844. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  15845. s.ETag = &v
  15846. return s
  15847. }
  15848. // SetExpiration sets the Expiration field's value.
  15849. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  15850. s.Expiration = &v
  15851. return s
  15852. }
  15853. // SetRequestCharged sets the RequestCharged field's value.
  15854. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  15855. s.RequestCharged = &v
  15856. return s
  15857. }
  15858. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15859. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  15860. s.SSECustomerAlgorithm = &v
  15861. return s
  15862. }
  15863. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15864. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  15865. s.SSECustomerKeyMD5 = &v
  15866. return s
  15867. }
  15868. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15869. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  15870. s.SSEKMSKeyId = &v
  15871. return s
  15872. }
  15873. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15874. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  15875. s.ServerSideEncryption = &v
  15876. return s
  15877. }
  15878. // SetVersionId sets the VersionId field's value.
  15879. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  15880. s.VersionId = &v
  15881. return s
  15882. }
  15883. type PutObjectTaggingInput struct {
  15884. _ struct{} `type:"structure" payload:"Tagging"`
  15885. // Bucket is a required field
  15886. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15887. // Key is a required field
  15888. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15889. // Tagging is a required field
  15890. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15891. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15892. }
  15893. // String returns the string representation
  15894. func (s PutObjectTaggingInput) String() string {
  15895. return awsutil.Prettify(s)
  15896. }
  15897. // GoString returns the string representation
  15898. func (s PutObjectTaggingInput) GoString() string {
  15899. return s.String()
  15900. }
  15901. // Validate inspects the fields of the type to determine if they are valid.
  15902. func (s *PutObjectTaggingInput) Validate() error {
  15903. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  15904. if s.Bucket == nil {
  15905. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15906. }
  15907. if s.Key == nil {
  15908. invalidParams.Add(request.NewErrParamRequired("Key"))
  15909. }
  15910. if s.Key != nil && len(*s.Key) < 1 {
  15911. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15912. }
  15913. if s.Tagging == nil {
  15914. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  15915. }
  15916. if s.Tagging != nil {
  15917. if err := s.Tagging.Validate(); err != nil {
  15918. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  15919. }
  15920. }
  15921. if invalidParams.Len() > 0 {
  15922. return invalidParams
  15923. }
  15924. return nil
  15925. }
  15926. // SetBucket sets the Bucket field's value.
  15927. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  15928. s.Bucket = &v
  15929. return s
  15930. }
  15931. func (s *PutObjectTaggingInput) getBucket() (v string) {
  15932. if s.Bucket == nil {
  15933. return v
  15934. }
  15935. return *s.Bucket
  15936. }
  15937. // SetKey sets the Key field's value.
  15938. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  15939. s.Key = &v
  15940. return s
  15941. }
  15942. // SetTagging sets the Tagging field's value.
  15943. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  15944. s.Tagging = v
  15945. return s
  15946. }
  15947. // SetVersionId sets the VersionId field's value.
  15948. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  15949. s.VersionId = &v
  15950. return s
  15951. }
  15952. type PutObjectTaggingOutput struct {
  15953. _ struct{} `type:"structure"`
  15954. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15955. }
  15956. // String returns the string representation
  15957. func (s PutObjectTaggingOutput) String() string {
  15958. return awsutil.Prettify(s)
  15959. }
  15960. // GoString returns the string representation
  15961. func (s PutObjectTaggingOutput) GoString() string {
  15962. return s.String()
  15963. }
  15964. // SetVersionId sets the VersionId field's value.
  15965. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  15966. s.VersionId = &v
  15967. return s
  15968. }
  15969. // Container for specifying an configuration when you want Amazon S3 to publish
  15970. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  15971. type QueueConfiguration struct {
  15972. _ struct{} `type:"structure"`
  15973. // Events is a required field
  15974. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  15975. // Container for object key name filtering rules. For information about key
  15976. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15977. // in the Amazon Simple Storage Service Developer Guide.
  15978. Filter *NotificationConfigurationFilter `type:"structure"`
  15979. // Optional unique identifier for configurations in a notification configuration.
  15980. // If you don't provide one, Amazon S3 will assign an ID.
  15981. Id *string `type:"string"`
  15982. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  15983. // events of specified type.
  15984. //
  15985. // QueueArn is a required field
  15986. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  15987. }
  15988. // String returns the string representation
  15989. func (s QueueConfiguration) String() string {
  15990. return awsutil.Prettify(s)
  15991. }
  15992. // GoString returns the string representation
  15993. func (s QueueConfiguration) GoString() string {
  15994. return s.String()
  15995. }
  15996. // Validate inspects the fields of the type to determine if they are valid.
  15997. func (s *QueueConfiguration) Validate() error {
  15998. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  15999. if s.Events == nil {
  16000. invalidParams.Add(request.NewErrParamRequired("Events"))
  16001. }
  16002. if s.QueueArn == nil {
  16003. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  16004. }
  16005. if invalidParams.Len() > 0 {
  16006. return invalidParams
  16007. }
  16008. return nil
  16009. }
  16010. // SetEvents sets the Events field's value.
  16011. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  16012. s.Events = v
  16013. return s
  16014. }
  16015. // SetFilter sets the Filter field's value.
  16016. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  16017. s.Filter = v
  16018. return s
  16019. }
  16020. // SetId sets the Id field's value.
  16021. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  16022. s.Id = &v
  16023. return s
  16024. }
  16025. // SetQueueArn sets the QueueArn field's value.
  16026. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  16027. s.QueueArn = &v
  16028. return s
  16029. }
  16030. type QueueConfigurationDeprecated struct {
  16031. _ struct{} `type:"structure"`
  16032. // Bucket event for which to send notifications.
  16033. //
  16034. // Deprecated: Event has been deprecated
  16035. Event *string `deprecated:"true" type:"string" enum:"Event"`
  16036. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  16037. // Optional unique identifier for configurations in a notification configuration.
  16038. // If you don't provide one, Amazon S3 will assign an ID.
  16039. Id *string `type:"string"`
  16040. Queue *string `type:"string"`
  16041. }
  16042. // String returns the string representation
  16043. func (s QueueConfigurationDeprecated) String() string {
  16044. return awsutil.Prettify(s)
  16045. }
  16046. // GoString returns the string representation
  16047. func (s QueueConfigurationDeprecated) GoString() string {
  16048. return s.String()
  16049. }
  16050. // SetEvent sets the Event field's value.
  16051. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  16052. s.Event = &v
  16053. return s
  16054. }
  16055. // SetEvents sets the Events field's value.
  16056. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  16057. s.Events = v
  16058. return s
  16059. }
  16060. // SetId sets the Id field's value.
  16061. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  16062. s.Id = &v
  16063. return s
  16064. }
  16065. // SetQueue sets the Queue field's value.
  16066. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  16067. s.Queue = &v
  16068. return s
  16069. }
  16070. type RecordsEvent struct {
  16071. _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
  16072. // The byte array of partial, one or more result records.
  16073. //
  16074. // Payload is automatically base64 encoded/decoded by the SDK.
  16075. Payload []byte `type:"blob"`
  16076. }
  16077. // String returns the string representation
  16078. func (s RecordsEvent) String() string {
  16079. return awsutil.Prettify(s)
  16080. }
  16081. // GoString returns the string representation
  16082. func (s RecordsEvent) GoString() string {
  16083. return s.String()
  16084. }
  16085. // SetPayload sets the Payload field's value.
  16086. func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
  16087. s.Payload = v
  16088. return s
  16089. }
  16090. // The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
  16091. func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
  16092. // UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
  16093. // This method is only used internally within the SDK's EventStream handling.
  16094. func (s *RecordsEvent) UnmarshalEvent(
  16095. payloadUnmarshaler protocol.PayloadUnmarshaler,
  16096. msg eventstream.Message,
  16097. ) error {
  16098. s.Payload = make([]byte, len(msg.Payload))
  16099. copy(s.Payload, msg.Payload)
  16100. return nil
  16101. }
  16102. type Redirect struct {
  16103. _ struct{} `type:"structure"`
  16104. // The host name to use in the redirect request.
  16105. HostName *string `type:"string"`
  16106. // The HTTP redirect code to use on the response. Not required if one of the
  16107. // siblings is present.
  16108. HttpRedirectCode *string `type:"string"`
  16109. // Protocol to use (http, https) when redirecting requests. The default is the
  16110. // protocol that is used in the original request.
  16111. Protocol *string `type:"string" enum:"Protocol"`
  16112. // The object key prefix to use in the redirect request. For example, to redirect
  16113. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  16114. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  16115. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  16116. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  16117. // is not provided.
  16118. ReplaceKeyPrefixWith *string `type:"string"`
  16119. // The specific object key to use in the redirect request. For example, redirect
  16120. // request to error.html. Not required if one of the sibling is present. Can
  16121. // be present only if ReplaceKeyPrefixWith is not provided.
  16122. ReplaceKeyWith *string `type:"string"`
  16123. }
  16124. // String returns the string representation
  16125. func (s Redirect) String() string {
  16126. return awsutil.Prettify(s)
  16127. }
  16128. // GoString returns the string representation
  16129. func (s Redirect) GoString() string {
  16130. return s.String()
  16131. }
  16132. // SetHostName sets the HostName field's value.
  16133. func (s *Redirect) SetHostName(v string) *Redirect {
  16134. s.HostName = &v
  16135. return s
  16136. }
  16137. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  16138. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  16139. s.HttpRedirectCode = &v
  16140. return s
  16141. }
  16142. // SetProtocol sets the Protocol field's value.
  16143. func (s *Redirect) SetProtocol(v string) *Redirect {
  16144. s.Protocol = &v
  16145. return s
  16146. }
  16147. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  16148. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  16149. s.ReplaceKeyPrefixWith = &v
  16150. return s
  16151. }
  16152. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  16153. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  16154. s.ReplaceKeyWith = &v
  16155. return s
  16156. }
  16157. type RedirectAllRequestsTo struct {
  16158. _ struct{} `type:"structure"`
  16159. // Name of the host where requests will be redirected.
  16160. //
  16161. // HostName is a required field
  16162. HostName *string `type:"string" required:"true"`
  16163. // Protocol to use (http, https) when redirecting requests. The default is the
  16164. // protocol that is used in the original request.
  16165. Protocol *string `type:"string" enum:"Protocol"`
  16166. }
  16167. // String returns the string representation
  16168. func (s RedirectAllRequestsTo) String() string {
  16169. return awsutil.Prettify(s)
  16170. }
  16171. // GoString returns the string representation
  16172. func (s RedirectAllRequestsTo) GoString() string {
  16173. return s.String()
  16174. }
  16175. // Validate inspects the fields of the type to determine if they are valid.
  16176. func (s *RedirectAllRequestsTo) Validate() error {
  16177. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  16178. if s.HostName == nil {
  16179. invalidParams.Add(request.NewErrParamRequired("HostName"))
  16180. }
  16181. if invalidParams.Len() > 0 {
  16182. return invalidParams
  16183. }
  16184. return nil
  16185. }
  16186. // SetHostName sets the HostName field's value.
  16187. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  16188. s.HostName = &v
  16189. return s
  16190. }
  16191. // SetProtocol sets the Protocol field's value.
  16192. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  16193. s.Protocol = &v
  16194. return s
  16195. }
  16196. // Container for replication rules. You can add as many as 1,000 rules. Total
  16197. // replication configuration size can be up to 2 MB.
  16198. type ReplicationConfiguration struct {
  16199. _ struct{} `type:"structure"`
  16200. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  16201. // the objects.
  16202. //
  16203. // Role is a required field
  16204. Role *string `type:"string" required:"true"`
  16205. // Container for one or more replication rules. Replication configuration must
  16206. // have at least one rule and can contain up to 1,000 rules.
  16207. //
  16208. // Rules is a required field
  16209. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  16210. }
  16211. // String returns the string representation
  16212. func (s ReplicationConfiguration) String() string {
  16213. return awsutil.Prettify(s)
  16214. }
  16215. // GoString returns the string representation
  16216. func (s ReplicationConfiguration) GoString() string {
  16217. return s.String()
  16218. }
  16219. // Validate inspects the fields of the type to determine if they are valid.
  16220. func (s *ReplicationConfiguration) Validate() error {
  16221. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  16222. if s.Role == nil {
  16223. invalidParams.Add(request.NewErrParamRequired("Role"))
  16224. }
  16225. if s.Rules == nil {
  16226. invalidParams.Add(request.NewErrParamRequired("Rules"))
  16227. }
  16228. if s.Rules != nil {
  16229. for i, v := range s.Rules {
  16230. if v == nil {
  16231. continue
  16232. }
  16233. if err := v.Validate(); err != nil {
  16234. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  16235. }
  16236. }
  16237. }
  16238. if invalidParams.Len() > 0 {
  16239. return invalidParams
  16240. }
  16241. return nil
  16242. }
  16243. // SetRole sets the Role field's value.
  16244. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  16245. s.Role = &v
  16246. return s
  16247. }
  16248. // SetRules sets the Rules field's value.
  16249. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  16250. s.Rules = v
  16251. return s
  16252. }
  16253. // Container for information about a particular replication rule.
  16254. type ReplicationRule struct {
  16255. _ struct{} `type:"structure"`
  16256. // Specifies whether Amazon S3 should replicate delete makers.
  16257. DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
  16258. // Container for replication destination information.
  16259. //
  16260. // Destination is a required field
  16261. Destination *Destination `type:"structure" required:"true"`
  16262. // Filter that identifies subset of objects to which the replication rule applies.
  16263. // A Filter must specify exactly one Prefix, Tag, or an And child element.
  16264. Filter *ReplicationRuleFilter `type:"structure"`
  16265. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  16266. ID *string `type:"string"`
  16267. // Object keyname prefix identifying one or more objects to which the rule applies.
  16268. // Maximum prefix length can be up to 1,024 characters.
  16269. //
  16270. // Deprecated: Prefix has been deprecated
  16271. Prefix *string `deprecated:"true" type:"string"`
  16272. // The priority associated with the rule. If you specify multiple rules in a
  16273. // replication configuration, then Amazon S3 applies rule priority in the event
  16274. // there are conflicts (two or more rules identify the same object based on
  16275. // filter specified). The rule with higher priority takes precedence. For example,
  16276. //
  16277. // * Same object quality prefix based filter criteria If prefixes you specified
  16278. // in multiple rules overlap.
  16279. //
  16280. // * Same object qualify tag based filter criteria specified in multiple
  16281. // rules
  16282. //
  16283. // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  16284. // in the Amazon S3 Developer Guide.
  16285. Priority *int64 `type:"integer"`
  16286. // Container that describes additional filters in identifying source objects
  16287. // that you want to replicate. Currently, Amazon S3 supports only the filter
  16288. // that you can specify for objects created with server-side encryption using
  16289. // an AWS KMS-managed key. You can choose to enable or disable replication of
  16290. // these objects.
  16291. //
  16292. // if you want Amazon S3 to replicate objects created with server-side encryption
  16293. // using AWS KMS-managed keys.
  16294. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  16295. // The rule is ignored if status is not Enabled.
  16296. //
  16297. // Status is a required field
  16298. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  16299. }
  16300. // String returns the string representation
  16301. func (s ReplicationRule) String() string {
  16302. return awsutil.Prettify(s)
  16303. }
  16304. // GoString returns the string representation
  16305. func (s ReplicationRule) GoString() string {
  16306. return s.String()
  16307. }
  16308. // Validate inspects the fields of the type to determine if they are valid.
  16309. func (s *ReplicationRule) Validate() error {
  16310. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  16311. if s.Destination == nil {
  16312. invalidParams.Add(request.NewErrParamRequired("Destination"))
  16313. }
  16314. if s.Status == nil {
  16315. invalidParams.Add(request.NewErrParamRequired("Status"))
  16316. }
  16317. if s.Destination != nil {
  16318. if err := s.Destination.Validate(); err != nil {
  16319. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  16320. }
  16321. }
  16322. if s.Filter != nil {
  16323. if err := s.Filter.Validate(); err != nil {
  16324. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  16325. }
  16326. }
  16327. if s.SourceSelectionCriteria != nil {
  16328. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  16329. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  16330. }
  16331. }
  16332. if invalidParams.Len() > 0 {
  16333. return invalidParams
  16334. }
  16335. return nil
  16336. }
  16337. // SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
  16338. func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
  16339. s.DeleteMarkerReplication = v
  16340. return s
  16341. }
  16342. // SetDestination sets the Destination field's value.
  16343. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  16344. s.Destination = v
  16345. return s
  16346. }
  16347. // SetFilter sets the Filter field's value.
  16348. func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
  16349. s.Filter = v
  16350. return s
  16351. }
  16352. // SetID sets the ID field's value.
  16353. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  16354. s.ID = &v
  16355. return s
  16356. }
  16357. // SetPrefix sets the Prefix field's value.
  16358. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  16359. s.Prefix = &v
  16360. return s
  16361. }
  16362. // SetPriority sets the Priority field's value.
  16363. func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
  16364. s.Priority = &v
  16365. return s
  16366. }
  16367. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  16368. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  16369. s.SourceSelectionCriteria = v
  16370. return s
  16371. }
  16372. // SetStatus sets the Status field's value.
  16373. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  16374. s.Status = &v
  16375. return s
  16376. }
  16377. type ReplicationRuleAndOperator struct {
  16378. _ struct{} `type:"structure"`
  16379. Prefix *string `type:"string"`
  16380. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  16381. }
  16382. // String returns the string representation
  16383. func (s ReplicationRuleAndOperator) String() string {
  16384. return awsutil.Prettify(s)
  16385. }
  16386. // GoString returns the string representation
  16387. func (s ReplicationRuleAndOperator) GoString() string {
  16388. return s.String()
  16389. }
  16390. // Validate inspects the fields of the type to determine if they are valid.
  16391. func (s *ReplicationRuleAndOperator) Validate() error {
  16392. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
  16393. if s.Tags != nil {
  16394. for i, v := range s.Tags {
  16395. if v == nil {
  16396. continue
  16397. }
  16398. if err := v.Validate(); err != nil {
  16399. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  16400. }
  16401. }
  16402. }
  16403. if invalidParams.Len() > 0 {
  16404. return invalidParams
  16405. }
  16406. return nil
  16407. }
  16408. // SetPrefix sets the Prefix field's value.
  16409. func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
  16410. s.Prefix = &v
  16411. return s
  16412. }
  16413. // SetTags sets the Tags field's value.
  16414. func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
  16415. s.Tags = v
  16416. return s
  16417. }
  16418. // Filter that identifies subset of objects to which the replication rule applies.
  16419. // A Filter must specify exactly one Prefix, Tag, or an And child element.
  16420. type ReplicationRuleFilter struct {
  16421. _ struct{} `type:"structure"`
  16422. // Container for specifying rule filters. These filters determine the subset
  16423. // of objects to which the rule applies. The element is required only if you
  16424. // specify more than one filter. For example:
  16425. //
  16426. // * You specify both a Prefix and a Tag filters. Then you wrap these in
  16427. // an And tag.
  16428. //
  16429. // * You specify filter based on multiple tags. Then you wrap the Tag elements
  16430. // in an And tag.
  16431. And *ReplicationRuleAndOperator `type:"structure"`
  16432. // Object keyname prefix that identifies subset of objects to which the rule
  16433. // applies.
  16434. Prefix *string `type:"string"`
  16435. // Container for specifying a tag key and value.
  16436. //
  16437. // The rule applies only to objects having the tag in its tagset.
  16438. Tag *Tag `type:"structure"`
  16439. }
  16440. // String returns the string representation
  16441. func (s ReplicationRuleFilter) String() string {
  16442. return awsutil.Prettify(s)
  16443. }
  16444. // GoString returns the string representation
  16445. func (s ReplicationRuleFilter) GoString() string {
  16446. return s.String()
  16447. }
  16448. // Validate inspects the fields of the type to determine if they are valid.
  16449. func (s *ReplicationRuleFilter) Validate() error {
  16450. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
  16451. if s.And != nil {
  16452. if err := s.And.Validate(); err != nil {
  16453. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  16454. }
  16455. }
  16456. if s.Tag != nil {
  16457. if err := s.Tag.Validate(); err != nil {
  16458. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  16459. }
  16460. }
  16461. if invalidParams.Len() > 0 {
  16462. return invalidParams
  16463. }
  16464. return nil
  16465. }
  16466. // SetAnd sets the And field's value.
  16467. func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
  16468. s.And = v
  16469. return s
  16470. }
  16471. // SetPrefix sets the Prefix field's value.
  16472. func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
  16473. s.Prefix = &v
  16474. return s
  16475. }
  16476. // SetTag sets the Tag field's value.
  16477. func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
  16478. s.Tag = v
  16479. return s
  16480. }
  16481. type RequestPaymentConfiguration struct {
  16482. _ struct{} `type:"structure"`
  16483. // Specifies who pays for the download and request fees.
  16484. //
  16485. // Payer is a required field
  16486. Payer *string `type:"string" required:"true" enum:"Payer"`
  16487. }
  16488. // String returns the string representation
  16489. func (s RequestPaymentConfiguration) String() string {
  16490. return awsutil.Prettify(s)
  16491. }
  16492. // GoString returns the string representation
  16493. func (s RequestPaymentConfiguration) GoString() string {
  16494. return s.String()
  16495. }
  16496. // Validate inspects the fields of the type to determine if they are valid.
  16497. func (s *RequestPaymentConfiguration) Validate() error {
  16498. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  16499. if s.Payer == nil {
  16500. invalidParams.Add(request.NewErrParamRequired("Payer"))
  16501. }
  16502. if invalidParams.Len() > 0 {
  16503. return invalidParams
  16504. }
  16505. return nil
  16506. }
  16507. // SetPayer sets the Payer field's value.
  16508. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  16509. s.Payer = &v
  16510. return s
  16511. }
  16512. type RequestProgress struct {
  16513. _ struct{} `type:"structure"`
  16514. // Specifies whether periodic QueryProgress frames should be sent. Valid values:
  16515. // TRUE, FALSE. Default value: FALSE.
  16516. Enabled *bool `type:"boolean"`
  16517. }
  16518. // String returns the string representation
  16519. func (s RequestProgress) String() string {
  16520. return awsutil.Prettify(s)
  16521. }
  16522. // GoString returns the string representation
  16523. func (s RequestProgress) GoString() string {
  16524. return s.String()
  16525. }
  16526. // SetEnabled sets the Enabled field's value.
  16527. func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
  16528. s.Enabled = &v
  16529. return s
  16530. }
  16531. type RestoreObjectInput struct {
  16532. _ struct{} `type:"structure" payload:"RestoreRequest"`
  16533. // Bucket is a required field
  16534. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16535. // Key is a required field
  16536. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  16537. // Confirms that the requester knows that she or he will be charged for the
  16538. // request. Bucket owners need not specify this parameter in their requests.
  16539. // Documentation on downloading objects from requester pays buckets can be found
  16540. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16541. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  16542. // Container for restore job parameters.
  16543. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16544. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  16545. }
  16546. // String returns the string representation
  16547. func (s RestoreObjectInput) String() string {
  16548. return awsutil.Prettify(s)
  16549. }
  16550. // GoString returns the string representation
  16551. func (s RestoreObjectInput) GoString() string {
  16552. return s.String()
  16553. }
  16554. // Validate inspects the fields of the type to determine if they are valid.
  16555. func (s *RestoreObjectInput) Validate() error {
  16556. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  16557. if s.Bucket == nil {
  16558. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16559. }
  16560. if s.Key == nil {
  16561. invalidParams.Add(request.NewErrParamRequired("Key"))
  16562. }
  16563. if s.Key != nil && len(*s.Key) < 1 {
  16564. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16565. }
  16566. if s.RestoreRequest != nil {
  16567. if err := s.RestoreRequest.Validate(); err != nil {
  16568. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  16569. }
  16570. }
  16571. if invalidParams.Len() > 0 {
  16572. return invalidParams
  16573. }
  16574. return nil
  16575. }
  16576. // SetBucket sets the Bucket field's value.
  16577. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  16578. s.Bucket = &v
  16579. return s
  16580. }
  16581. func (s *RestoreObjectInput) getBucket() (v string) {
  16582. if s.Bucket == nil {
  16583. return v
  16584. }
  16585. return *s.Bucket
  16586. }
  16587. // SetKey sets the Key field's value.
  16588. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  16589. s.Key = &v
  16590. return s
  16591. }
  16592. // SetRequestPayer sets the RequestPayer field's value.
  16593. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  16594. s.RequestPayer = &v
  16595. return s
  16596. }
  16597. // SetRestoreRequest sets the RestoreRequest field's value.
  16598. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  16599. s.RestoreRequest = v
  16600. return s
  16601. }
  16602. // SetVersionId sets the VersionId field's value.
  16603. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  16604. s.VersionId = &v
  16605. return s
  16606. }
  16607. type RestoreObjectOutput struct {
  16608. _ struct{} `type:"structure"`
  16609. // If present, indicates that the requester was successfully charged for the
  16610. // request.
  16611. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  16612. // Indicates the path in the provided S3 output location where Select results
  16613. // will be restored to.
  16614. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  16615. }
  16616. // String returns the string representation
  16617. func (s RestoreObjectOutput) String() string {
  16618. return awsutil.Prettify(s)
  16619. }
  16620. // GoString returns the string representation
  16621. func (s RestoreObjectOutput) GoString() string {
  16622. return s.String()
  16623. }
  16624. // SetRequestCharged sets the RequestCharged field's value.
  16625. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  16626. s.RequestCharged = &v
  16627. return s
  16628. }
  16629. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  16630. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  16631. s.RestoreOutputPath = &v
  16632. return s
  16633. }
  16634. // Container for restore job parameters.
  16635. type RestoreRequest struct {
  16636. _ struct{} `type:"structure"`
  16637. // Lifetime of the active copy in days. Do not use with restores that specify
  16638. // OutputLocation.
  16639. Days *int64 `type:"integer"`
  16640. // The optional description for the job.
  16641. Description *string `type:"string"`
  16642. // Glacier related parameters pertaining to this job. Do not use with restores
  16643. // that specify OutputLocation.
  16644. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  16645. // Describes the location where the restore job's output is stored.
  16646. OutputLocation *OutputLocation `type:"structure"`
  16647. // Describes the parameters for Select job types.
  16648. SelectParameters *SelectParameters `type:"structure"`
  16649. // Glacier retrieval tier at which the restore will be processed.
  16650. Tier *string `type:"string" enum:"Tier"`
  16651. // Type of restore request.
  16652. Type *string `type:"string" enum:"RestoreRequestType"`
  16653. }
  16654. // String returns the string representation
  16655. func (s RestoreRequest) String() string {
  16656. return awsutil.Prettify(s)
  16657. }
  16658. // GoString returns the string representation
  16659. func (s RestoreRequest) GoString() string {
  16660. return s.String()
  16661. }
  16662. // Validate inspects the fields of the type to determine if they are valid.
  16663. func (s *RestoreRequest) Validate() error {
  16664. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  16665. if s.GlacierJobParameters != nil {
  16666. if err := s.GlacierJobParameters.Validate(); err != nil {
  16667. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  16668. }
  16669. }
  16670. if s.OutputLocation != nil {
  16671. if err := s.OutputLocation.Validate(); err != nil {
  16672. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  16673. }
  16674. }
  16675. if s.SelectParameters != nil {
  16676. if err := s.SelectParameters.Validate(); err != nil {
  16677. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  16678. }
  16679. }
  16680. if invalidParams.Len() > 0 {
  16681. return invalidParams
  16682. }
  16683. return nil
  16684. }
  16685. // SetDays sets the Days field's value.
  16686. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  16687. s.Days = &v
  16688. return s
  16689. }
  16690. // SetDescription sets the Description field's value.
  16691. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  16692. s.Description = &v
  16693. return s
  16694. }
  16695. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  16696. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  16697. s.GlacierJobParameters = v
  16698. return s
  16699. }
  16700. // SetOutputLocation sets the OutputLocation field's value.
  16701. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  16702. s.OutputLocation = v
  16703. return s
  16704. }
  16705. // SetSelectParameters sets the SelectParameters field's value.
  16706. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  16707. s.SelectParameters = v
  16708. return s
  16709. }
  16710. // SetTier sets the Tier field's value.
  16711. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  16712. s.Tier = &v
  16713. return s
  16714. }
  16715. // SetType sets the Type field's value.
  16716. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  16717. s.Type = &v
  16718. return s
  16719. }
  16720. type RoutingRule struct {
  16721. _ struct{} `type:"structure"`
  16722. // A container for describing a condition that must be met for the specified
  16723. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  16724. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  16725. // redirect request to another host where you might process the error.
  16726. Condition *Condition `type:"structure"`
  16727. // Container for redirect information. You can redirect requests to another
  16728. // host, to another page, or with another protocol. In the event of an error,
  16729. // you can can specify a different error code to return.
  16730. //
  16731. // Redirect is a required field
  16732. Redirect *Redirect `type:"structure" required:"true"`
  16733. }
  16734. // String returns the string representation
  16735. func (s RoutingRule) String() string {
  16736. return awsutil.Prettify(s)
  16737. }
  16738. // GoString returns the string representation
  16739. func (s RoutingRule) GoString() string {
  16740. return s.String()
  16741. }
  16742. // Validate inspects the fields of the type to determine if they are valid.
  16743. func (s *RoutingRule) Validate() error {
  16744. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  16745. if s.Redirect == nil {
  16746. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  16747. }
  16748. if invalidParams.Len() > 0 {
  16749. return invalidParams
  16750. }
  16751. return nil
  16752. }
  16753. // SetCondition sets the Condition field's value.
  16754. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  16755. s.Condition = v
  16756. return s
  16757. }
  16758. // SetRedirect sets the Redirect field's value.
  16759. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  16760. s.Redirect = v
  16761. return s
  16762. }
  16763. type Rule struct {
  16764. _ struct{} `type:"structure"`
  16765. // Specifies the days since the initiation of an Incomplete Multipart Upload
  16766. // that Lifecycle will wait before permanently removing all parts of the upload.
  16767. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  16768. Expiration *LifecycleExpiration `type:"structure"`
  16769. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  16770. ID *string `type:"string"`
  16771. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  16772. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  16773. // configuration action on a bucket that has versioning enabled (or suspended)
  16774. // to request that Amazon S3 delete noncurrent object versions at a specific
  16775. // period in the object's lifetime.
  16776. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  16777. // Container for the transition rule that describes when noncurrent objects
  16778. // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your
  16779. // bucket is versioning-enabled (or versioning is suspended), you can set this
  16780. // action to request that Amazon S3 transition noncurrent object versions to
  16781. // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period
  16782. // in the object's lifetime.
  16783. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  16784. // Prefix identifying one or more objects to which the rule applies.
  16785. //
  16786. // Prefix is a required field
  16787. Prefix *string `type:"string" required:"true"`
  16788. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  16789. // is not currently being applied.
  16790. //
  16791. // Status is a required field
  16792. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  16793. Transition *Transition `type:"structure"`
  16794. }
  16795. // String returns the string representation
  16796. func (s Rule) String() string {
  16797. return awsutil.Prettify(s)
  16798. }
  16799. // GoString returns the string representation
  16800. func (s Rule) GoString() string {
  16801. return s.String()
  16802. }
  16803. // Validate inspects the fields of the type to determine if they are valid.
  16804. func (s *Rule) Validate() error {
  16805. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  16806. if s.Prefix == nil {
  16807. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  16808. }
  16809. if s.Status == nil {
  16810. invalidParams.Add(request.NewErrParamRequired("Status"))
  16811. }
  16812. if invalidParams.Len() > 0 {
  16813. return invalidParams
  16814. }
  16815. return nil
  16816. }
  16817. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  16818. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  16819. s.AbortIncompleteMultipartUpload = v
  16820. return s
  16821. }
  16822. // SetExpiration sets the Expiration field's value.
  16823. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  16824. s.Expiration = v
  16825. return s
  16826. }
  16827. // SetID sets the ID field's value.
  16828. func (s *Rule) SetID(v string) *Rule {
  16829. s.ID = &v
  16830. return s
  16831. }
  16832. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  16833. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  16834. s.NoncurrentVersionExpiration = v
  16835. return s
  16836. }
  16837. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  16838. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  16839. s.NoncurrentVersionTransition = v
  16840. return s
  16841. }
  16842. // SetPrefix sets the Prefix field's value.
  16843. func (s *Rule) SetPrefix(v string) *Rule {
  16844. s.Prefix = &v
  16845. return s
  16846. }
  16847. // SetStatus sets the Status field's value.
  16848. func (s *Rule) SetStatus(v string) *Rule {
  16849. s.Status = &v
  16850. return s
  16851. }
  16852. // SetTransition sets the Transition field's value.
  16853. func (s *Rule) SetTransition(v *Transition) *Rule {
  16854. s.Transition = v
  16855. return s
  16856. }
  16857. // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
  16858. type SSEKMS struct {
  16859. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  16860. // Specifies the ID of the AWS Key Management Service (KMS) master encryption
  16861. // key to use for encrypting Inventory reports.
  16862. //
  16863. // KeyId is a required field
  16864. KeyId *string `type:"string" required:"true"`
  16865. }
  16866. // String returns the string representation
  16867. func (s SSEKMS) String() string {
  16868. return awsutil.Prettify(s)
  16869. }
  16870. // GoString returns the string representation
  16871. func (s SSEKMS) GoString() string {
  16872. return s.String()
  16873. }
  16874. // Validate inspects the fields of the type to determine if they are valid.
  16875. func (s *SSEKMS) Validate() error {
  16876. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  16877. if s.KeyId == nil {
  16878. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  16879. }
  16880. if invalidParams.Len() > 0 {
  16881. return invalidParams
  16882. }
  16883. return nil
  16884. }
  16885. // SetKeyId sets the KeyId field's value.
  16886. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  16887. s.KeyId = &v
  16888. return s
  16889. }
  16890. // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
  16891. type SSES3 struct {
  16892. _ struct{} `locationName:"SSE-S3" type:"structure"`
  16893. }
  16894. // String returns the string representation
  16895. func (s SSES3) String() string {
  16896. return awsutil.Prettify(s)
  16897. }
  16898. // GoString returns the string representation
  16899. func (s SSES3) GoString() string {
  16900. return s.String()
  16901. }
  16902. // SelectObjectContentEventStream provides handling of EventStreams for
  16903. // the SelectObjectContent API.
  16904. //
  16905. // Use this type to receive SelectObjectContentEventStream events. The events
  16906. // can be read from the Events channel member.
  16907. //
  16908. // The events that can be received are:
  16909. //
  16910. // * ContinuationEvent
  16911. // * EndEvent
  16912. // * ProgressEvent
  16913. // * RecordsEvent
  16914. // * StatsEvent
  16915. type SelectObjectContentEventStream struct {
  16916. // Reader is the EventStream reader for the SelectObjectContentEventStream
  16917. // events. This value is automatically set by the SDK when the API call is made
  16918. // Use this member when unit testing your code with the SDK to mock out the
  16919. // EventStream Reader.
  16920. //
  16921. // Must not be nil.
  16922. Reader SelectObjectContentEventStreamReader
  16923. // StreamCloser is the io.Closer for the EventStream connection. For HTTP
  16924. // EventStream this is the response Body. The stream will be closed when
  16925. // the Close method of the EventStream is called.
  16926. StreamCloser io.Closer
  16927. }
  16928. // Close closes the EventStream. This will also cause the Events channel to be
  16929. // closed. You can use the closing of the Events channel to terminate your
  16930. // application's read from the API's EventStream.
  16931. //
  16932. // Will close the underlying EventStream reader. For EventStream over HTTP
  16933. // connection this will also close the HTTP connection.
  16934. //
  16935. // Close must be called when done using the EventStream API. Not calling Close
  16936. // may result in resource leaks.
  16937. func (es *SelectObjectContentEventStream) Close() (err error) {
  16938. es.Reader.Close()
  16939. return es.Err()
  16940. }
  16941. // Err returns any error that occurred while reading EventStream Events from
  16942. // the service API's response. Returns nil if there were no errors.
  16943. func (es *SelectObjectContentEventStream) Err() error {
  16944. if err := es.Reader.Err(); err != nil {
  16945. return err
  16946. }
  16947. es.StreamCloser.Close()
  16948. return nil
  16949. }
  16950. // Events returns a channel to read EventStream Events from the
  16951. // SelectObjectContent API.
  16952. //
  16953. // These events are:
  16954. //
  16955. // * ContinuationEvent
  16956. // * EndEvent
  16957. // * ProgressEvent
  16958. // * RecordsEvent
  16959. // * StatsEvent
  16960. func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  16961. return es.Reader.Events()
  16962. }
  16963. // SelectObjectContentEventStreamEvent groups together all EventStream
  16964. // events read from the SelectObjectContent API.
  16965. //
  16966. // These events are:
  16967. //
  16968. // * ContinuationEvent
  16969. // * EndEvent
  16970. // * ProgressEvent
  16971. // * RecordsEvent
  16972. // * StatsEvent
  16973. type SelectObjectContentEventStreamEvent interface {
  16974. eventSelectObjectContentEventStream()
  16975. }
  16976. // SelectObjectContentEventStreamReader provides the interface for reading EventStream
  16977. // Events from the SelectObjectContent API. The
  16978. // default implementation for this interface will be SelectObjectContentEventStream.
  16979. //
  16980. // The reader's Close method must allow multiple concurrent calls.
  16981. //
  16982. // These events are:
  16983. //
  16984. // * ContinuationEvent
  16985. // * EndEvent
  16986. // * ProgressEvent
  16987. // * RecordsEvent
  16988. // * StatsEvent
  16989. type SelectObjectContentEventStreamReader interface {
  16990. // Returns a channel of events as they are read from the event stream.
  16991. Events() <-chan SelectObjectContentEventStreamEvent
  16992. // Close will close the underlying event stream reader. For event stream over
  16993. // HTTP this will also close the HTTP connection.
  16994. Close() error
  16995. // Returns any error that has occured while reading from the event stream.
  16996. Err() error
  16997. }
  16998. type readSelectObjectContentEventStream struct {
  16999. eventReader *eventstreamapi.EventReader
  17000. stream chan SelectObjectContentEventStreamEvent
  17001. errVal atomic.Value
  17002. done chan struct{}
  17003. closeOnce sync.Once
  17004. }
  17005. func newReadSelectObjectContentEventStream(
  17006. reader io.ReadCloser,
  17007. unmarshalers request.HandlerList,
  17008. logger aws.Logger,
  17009. logLevel aws.LogLevelType,
  17010. ) *readSelectObjectContentEventStream {
  17011. r := &readSelectObjectContentEventStream{
  17012. stream: make(chan SelectObjectContentEventStreamEvent),
  17013. done: make(chan struct{}),
  17014. }
  17015. r.eventReader = eventstreamapi.NewEventReader(
  17016. reader,
  17017. protocol.HandlerPayloadUnmarshal{
  17018. Unmarshalers: unmarshalers,
  17019. },
  17020. r.unmarshalerForEventType,
  17021. )
  17022. r.eventReader.UseLogger(logger, logLevel)
  17023. return r
  17024. }
  17025. // Close will close the underlying event stream reader. For EventStream over
  17026. // HTTP this will also close the HTTP connection.
  17027. func (r *readSelectObjectContentEventStream) Close() error {
  17028. r.closeOnce.Do(r.safeClose)
  17029. return r.Err()
  17030. }
  17031. func (r *readSelectObjectContentEventStream) safeClose() {
  17032. close(r.done)
  17033. err := r.eventReader.Close()
  17034. if err != nil {
  17035. r.errVal.Store(err)
  17036. }
  17037. }
  17038. func (r *readSelectObjectContentEventStream) Err() error {
  17039. if v := r.errVal.Load(); v != nil {
  17040. return v.(error)
  17041. }
  17042. return nil
  17043. }
  17044. func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  17045. return r.stream
  17046. }
  17047. func (r *readSelectObjectContentEventStream) readEventStream() {
  17048. defer close(r.stream)
  17049. for {
  17050. event, err := r.eventReader.ReadEvent()
  17051. if err != nil {
  17052. if err == io.EOF {
  17053. return
  17054. }
  17055. select {
  17056. case <-r.done:
  17057. // If closed already ignore the error
  17058. return
  17059. default:
  17060. }
  17061. r.errVal.Store(err)
  17062. return
  17063. }
  17064. select {
  17065. case r.stream <- event.(SelectObjectContentEventStreamEvent):
  17066. case <-r.done:
  17067. return
  17068. }
  17069. }
  17070. }
  17071. func (r *readSelectObjectContentEventStream) unmarshalerForEventType(
  17072. eventType string,
  17073. ) (eventstreamapi.Unmarshaler, error) {
  17074. switch eventType {
  17075. case "Cont":
  17076. return &ContinuationEvent{}, nil
  17077. case "End":
  17078. return &EndEvent{}, nil
  17079. case "Progress":
  17080. return &ProgressEvent{}, nil
  17081. case "Records":
  17082. return &RecordsEvent{}, nil
  17083. case "Stats":
  17084. return &StatsEvent{}, nil
  17085. default:
  17086. return nil, awserr.New(
  17087. request.ErrCodeSerialization,
  17088. fmt.Sprintf("unknown event type name, %s, for SelectObjectContentEventStream", eventType),
  17089. nil,
  17090. )
  17091. }
  17092. }
  17093. // Request to filter the contents of an Amazon S3 object based on a simple Structured
  17094. // Query Language (SQL) statement. In the request, along with the SQL expression,
  17095. // you must also specify a data serialization format (JSON or CSV) of the object.
  17096. // Amazon S3 uses this to parse object data into records, and returns only records
  17097. // that match the specified SQL expression. You must also specify the data serialization
  17098. // format for the response. For more information, go to S3Select API Documentation
  17099. // (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
  17100. type SelectObjectContentInput struct {
  17101. _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17102. // The S3 Bucket.
  17103. //
  17104. // Bucket is a required field
  17105. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17106. // The expression that is used to query the object.
  17107. //
  17108. // Expression is a required field
  17109. Expression *string `type:"string" required:"true"`
  17110. // The type of the provided expression (e.g., SQL).
  17111. //
  17112. // ExpressionType is a required field
  17113. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  17114. // Describes the format of the data in the object that is being queried.
  17115. //
  17116. // InputSerialization is a required field
  17117. InputSerialization *InputSerialization `type:"structure" required:"true"`
  17118. // The Object Key.
  17119. //
  17120. // Key is a required field
  17121. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17122. // Describes the format of the data that you want Amazon S3 to return in response.
  17123. //
  17124. // OutputSerialization is a required field
  17125. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  17126. // Specifies if periodic request progress information should be enabled.
  17127. RequestProgress *RequestProgress `type:"structure"`
  17128. // The SSE Algorithm used to encrypt the object. For more information, go to
  17129. // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  17130. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17131. // The SSE Customer Key. For more information, go to Server-Side Encryption
  17132. // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  17133. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  17134. // The SSE Customer Key MD5. For more information, go to Server-Side Encryption
  17135. // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  17136. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17137. }
  17138. // String returns the string representation
  17139. func (s SelectObjectContentInput) String() string {
  17140. return awsutil.Prettify(s)
  17141. }
  17142. // GoString returns the string representation
  17143. func (s SelectObjectContentInput) GoString() string {
  17144. return s.String()
  17145. }
  17146. // Validate inspects the fields of the type to determine if they are valid.
  17147. func (s *SelectObjectContentInput) Validate() error {
  17148. invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
  17149. if s.Bucket == nil {
  17150. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17151. }
  17152. if s.Expression == nil {
  17153. invalidParams.Add(request.NewErrParamRequired("Expression"))
  17154. }
  17155. if s.ExpressionType == nil {
  17156. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  17157. }
  17158. if s.InputSerialization == nil {
  17159. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  17160. }
  17161. if s.Key == nil {
  17162. invalidParams.Add(request.NewErrParamRequired("Key"))
  17163. }
  17164. if s.Key != nil && len(*s.Key) < 1 {
  17165. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17166. }
  17167. if s.OutputSerialization == nil {
  17168. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  17169. }
  17170. if invalidParams.Len() > 0 {
  17171. return invalidParams
  17172. }
  17173. return nil
  17174. }
  17175. // SetBucket sets the Bucket field's value.
  17176. func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
  17177. s.Bucket = &v
  17178. return s
  17179. }
  17180. func (s *SelectObjectContentInput) getBucket() (v string) {
  17181. if s.Bucket == nil {
  17182. return v
  17183. }
  17184. return *s.Bucket
  17185. }
  17186. // SetExpression sets the Expression field's value.
  17187. func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
  17188. s.Expression = &v
  17189. return s
  17190. }
  17191. // SetExpressionType sets the ExpressionType field's value.
  17192. func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
  17193. s.ExpressionType = &v
  17194. return s
  17195. }
  17196. // SetInputSerialization sets the InputSerialization field's value.
  17197. func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
  17198. s.InputSerialization = v
  17199. return s
  17200. }
  17201. // SetKey sets the Key field's value.
  17202. func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
  17203. s.Key = &v
  17204. return s
  17205. }
  17206. // SetOutputSerialization sets the OutputSerialization field's value.
  17207. func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
  17208. s.OutputSerialization = v
  17209. return s
  17210. }
  17211. // SetRequestProgress sets the RequestProgress field's value.
  17212. func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
  17213. s.RequestProgress = v
  17214. return s
  17215. }
  17216. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17217. func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
  17218. s.SSECustomerAlgorithm = &v
  17219. return s
  17220. }
  17221. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17222. func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
  17223. s.SSECustomerKey = &v
  17224. return s
  17225. }
  17226. func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
  17227. if s.SSECustomerKey == nil {
  17228. return v
  17229. }
  17230. return *s.SSECustomerKey
  17231. }
  17232. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17233. func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
  17234. s.SSECustomerKeyMD5 = &v
  17235. return s
  17236. }
  17237. type SelectObjectContentOutput struct {
  17238. _ struct{} `type:"structure" payload:"Payload"`
  17239. // Use EventStream to use the API's stream.
  17240. EventStream *SelectObjectContentEventStream `type:"structure"`
  17241. }
  17242. // String returns the string representation
  17243. func (s SelectObjectContentOutput) String() string {
  17244. return awsutil.Prettify(s)
  17245. }
  17246. // GoString returns the string representation
  17247. func (s SelectObjectContentOutput) GoString() string {
  17248. return s.String()
  17249. }
  17250. // SetEventStream sets the EventStream field's value.
  17251. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
  17252. s.EventStream = v
  17253. return s
  17254. }
  17255. func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) {
  17256. if r.Error != nil {
  17257. return
  17258. }
  17259. reader := newReadSelectObjectContentEventStream(
  17260. r.HTTPResponse.Body,
  17261. r.Handlers.UnmarshalStream,
  17262. r.Config.Logger,
  17263. r.Config.LogLevel.Value(),
  17264. )
  17265. go reader.readEventStream()
  17266. eventStream := &SelectObjectContentEventStream{
  17267. StreamCloser: r.HTTPResponse.Body,
  17268. Reader: reader,
  17269. }
  17270. s.EventStream = eventStream
  17271. }
  17272. // Describes the parameters for Select job types.
  17273. type SelectParameters struct {
  17274. _ struct{} `type:"structure"`
  17275. // The expression that is used to query the object.
  17276. //
  17277. // Expression is a required field
  17278. Expression *string `type:"string" required:"true"`
  17279. // The type of the provided expression (e.g., SQL).
  17280. //
  17281. // ExpressionType is a required field
  17282. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  17283. // Describes the serialization format of the object.
  17284. //
  17285. // InputSerialization is a required field
  17286. InputSerialization *InputSerialization `type:"structure" required:"true"`
  17287. // Describes how the results of the Select job are serialized.
  17288. //
  17289. // OutputSerialization is a required field
  17290. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  17291. }
  17292. // String returns the string representation
  17293. func (s SelectParameters) String() string {
  17294. return awsutil.Prettify(s)
  17295. }
  17296. // GoString returns the string representation
  17297. func (s SelectParameters) GoString() string {
  17298. return s.String()
  17299. }
  17300. // Validate inspects the fields of the type to determine if they are valid.
  17301. func (s *SelectParameters) Validate() error {
  17302. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  17303. if s.Expression == nil {
  17304. invalidParams.Add(request.NewErrParamRequired("Expression"))
  17305. }
  17306. if s.ExpressionType == nil {
  17307. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  17308. }
  17309. if s.InputSerialization == nil {
  17310. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  17311. }
  17312. if s.OutputSerialization == nil {
  17313. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  17314. }
  17315. if invalidParams.Len() > 0 {
  17316. return invalidParams
  17317. }
  17318. return nil
  17319. }
  17320. // SetExpression sets the Expression field's value.
  17321. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  17322. s.Expression = &v
  17323. return s
  17324. }
  17325. // SetExpressionType sets the ExpressionType field's value.
  17326. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  17327. s.ExpressionType = &v
  17328. return s
  17329. }
  17330. // SetInputSerialization sets the InputSerialization field's value.
  17331. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  17332. s.InputSerialization = v
  17333. return s
  17334. }
  17335. // SetOutputSerialization sets the OutputSerialization field's value.
  17336. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  17337. s.OutputSerialization = v
  17338. return s
  17339. }
  17340. // Describes the default server-side encryption to apply to new objects in the
  17341. // bucket. If Put Object request does not specify any server-side encryption,
  17342. // this default encryption will be applied.
  17343. type ServerSideEncryptionByDefault struct {
  17344. _ struct{} `type:"structure"`
  17345. // KMS master key ID to use for the default encryption. This parameter is allowed
  17346. // if SSEAlgorithm is aws:kms.
  17347. KMSMasterKeyID *string `type:"string"`
  17348. // Server-side encryption algorithm to use for the default encryption.
  17349. //
  17350. // SSEAlgorithm is a required field
  17351. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  17352. }
  17353. // String returns the string representation
  17354. func (s ServerSideEncryptionByDefault) String() string {
  17355. return awsutil.Prettify(s)
  17356. }
  17357. // GoString returns the string representation
  17358. func (s ServerSideEncryptionByDefault) GoString() string {
  17359. return s.String()
  17360. }
  17361. // Validate inspects the fields of the type to determine if they are valid.
  17362. func (s *ServerSideEncryptionByDefault) Validate() error {
  17363. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  17364. if s.SSEAlgorithm == nil {
  17365. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  17366. }
  17367. if invalidParams.Len() > 0 {
  17368. return invalidParams
  17369. }
  17370. return nil
  17371. }
  17372. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  17373. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  17374. s.KMSMasterKeyID = &v
  17375. return s
  17376. }
  17377. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  17378. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  17379. s.SSEAlgorithm = &v
  17380. return s
  17381. }
  17382. // Container for server-side encryption configuration rules. Currently S3 supports
  17383. // one rule only.
  17384. type ServerSideEncryptionConfiguration struct {
  17385. _ struct{} `type:"structure"`
  17386. // Container for information about a particular server-side encryption configuration
  17387. // rule.
  17388. //
  17389. // Rules is a required field
  17390. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  17391. }
  17392. // String returns the string representation
  17393. func (s ServerSideEncryptionConfiguration) String() string {
  17394. return awsutil.Prettify(s)
  17395. }
  17396. // GoString returns the string representation
  17397. func (s ServerSideEncryptionConfiguration) GoString() string {
  17398. return s.String()
  17399. }
  17400. // Validate inspects the fields of the type to determine if they are valid.
  17401. func (s *ServerSideEncryptionConfiguration) Validate() error {
  17402. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  17403. if s.Rules == nil {
  17404. invalidParams.Add(request.NewErrParamRequired("Rules"))
  17405. }
  17406. if s.Rules != nil {
  17407. for i, v := range s.Rules {
  17408. if v == nil {
  17409. continue
  17410. }
  17411. if err := v.Validate(); err != nil {
  17412. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  17413. }
  17414. }
  17415. }
  17416. if invalidParams.Len() > 0 {
  17417. return invalidParams
  17418. }
  17419. return nil
  17420. }
  17421. // SetRules sets the Rules field's value.
  17422. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  17423. s.Rules = v
  17424. return s
  17425. }
  17426. // Container for information about a particular server-side encryption configuration
  17427. // rule.
  17428. type ServerSideEncryptionRule struct {
  17429. _ struct{} `type:"structure"`
  17430. // Describes the default server-side encryption to apply to new objects in the
  17431. // bucket. If Put Object request does not specify any server-side encryption,
  17432. // this default encryption will be applied.
  17433. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  17434. }
  17435. // String returns the string representation
  17436. func (s ServerSideEncryptionRule) String() string {
  17437. return awsutil.Prettify(s)
  17438. }
  17439. // GoString returns the string representation
  17440. func (s ServerSideEncryptionRule) GoString() string {
  17441. return s.String()
  17442. }
  17443. // Validate inspects the fields of the type to determine if they are valid.
  17444. func (s *ServerSideEncryptionRule) Validate() error {
  17445. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  17446. if s.ApplyServerSideEncryptionByDefault != nil {
  17447. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  17448. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  17449. }
  17450. }
  17451. if invalidParams.Len() > 0 {
  17452. return invalidParams
  17453. }
  17454. return nil
  17455. }
  17456. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  17457. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  17458. s.ApplyServerSideEncryptionByDefault = v
  17459. return s
  17460. }
  17461. // Container for filters that define which source objects should be replicated.
  17462. type SourceSelectionCriteria struct {
  17463. _ struct{} `type:"structure"`
  17464. // Container for filter information of selection of KMS Encrypted S3 objects.
  17465. // The element is required if you include SourceSelectionCriteria in the replication
  17466. // configuration.
  17467. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  17468. }
  17469. // String returns the string representation
  17470. func (s SourceSelectionCriteria) String() string {
  17471. return awsutil.Prettify(s)
  17472. }
  17473. // GoString returns the string representation
  17474. func (s SourceSelectionCriteria) GoString() string {
  17475. return s.String()
  17476. }
  17477. // Validate inspects the fields of the type to determine if they are valid.
  17478. func (s *SourceSelectionCriteria) Validate() error {
  17479. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  17480. if s.SseKmsEncryptedObjects != nil {
  17481. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  17482. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  17483. }
  17484. }
  17485. if invalidParams.Len() > 0 {
  17486. return invalidParams
  17487. }
  17488. return nil
  17489. }
  17490. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  17491. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  17492. s.SseKmsEncryptedObjects = v
  17493. return s
  17494. }
  17495. // Container for filter information of selection of KMS Encrypted S3 objects.
  17496. type SseKmsEncryptedObjects struct {
  17497. _ struct{} `type:"structure"`
  17498. // The replication for KMS encrypted S3 objects is disabled if status is not
  17499. // Enabled.
  17500. //
  17501. // Status is a required field
  17502. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  17503. }
  17504. // String returns the string representation
  17505. func (s SseKmsEncryptedObjects) String() string {
  17506. return awsutil.Prettify(s)
  17507. }
  17508. // GoString returns the string representation
  17509. func (s SseKmsEncryptedObjects) GoString() string {
  17510. return s.String()
  17511. }
  17512. // Validate inspects the fields of the type to determine if they are valid.
  17513. func (s *SseKmsEncryptedObjects) Validate() error {
  17514. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  17515. if s.Status == nil {
  17516. invalidParams.Add(request.NewErrParamRequired("Status"))
  17517. }
  17518. if invalidParams.Len() > 0 {
  17519. return invalidParams
  17520. }
  17521. return nil
  17522. }
  17523. // SetStatus sets the Status field's value.
  17524. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  17525. s.Status = &v
  17526. return s
  17527. }
  17528. type Stats struct {
  17529. _ struct{} `type:"structure"`
  17530. // Total number of uncompressed object bytes processed.
  17531. BytesProcessed *int64 `type:"long"`
  17532. // Total number of bytes of records payload data returned.
  17533. BytesReturned *int64 `type:"long"`
  17534. // Total number of object bytes scanned.
  17535. BytesScanned *int64 `type:"long"`
  17536. }
  17537. // String returns the string representation
  17538. func (s Stats) String() string {
  17539. return awsutil.Prettify(s)
  17540. }
  17541. // GoString returns the string representation
  17542. func (s Stats) GoString() string {
  17543. return s.String()
  17544. }
  17545. // SetBytesProcessed sets the BytesProcessed field's value.
  17546. func (s *Stats) SetBytesProcessed(v int64) *Stats {
  17547. s.BytesProcessed = &v
  17548. return s
  17549. }
  17550. // SetBytesReturned sets the BytesReturned field's value.
  17551. func (s *Stats) SetBytesReturned(v int64) *Stats {
  17552. s.BytesReturned = &v
  17553. return s
  17554. }
  17555. // SetBytesScanned sets the BytesScanned field's value.
  17556. func (s *Stats) SetBytesScanned(v int64) *Stats {
  17557. s.BytesScanned = &v
  17558. return s
  17559. }
  17560. type StatsEvent struct {
  17561. _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
  17562. // The Stats event details.
  17563. Details *Stats `locationName:"Details" type:"structure"`
  17564. }
  17565. // String returns the string representation
  17566. func (s StatsEvent) String() string {
  17567. return awsutil.Prettify(s)
  17568. }
  17569. // GoString returns the string representation
  17570. func (s StatsEvent) GoString() string {
  17571. return s.String()
  17572. }
  17573. // SetDetails sets the Details field's value.
  17574. func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
  17575. s.Details = v
  17576. return s
  17577. }
  17578. // The StatsEvent is and event in the SelectObjectContentEventStream group of events.
  17579. func (s *StatsEvent) eventSelectObjectContentEventStream() {}
  17580. // UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
  17581. // This method is only used internally within the SDK's EventStream handling.
  17582. func (s *StatsEvent) UnmarshalEvent(
  17583. payloadUnmarshaler protocol.PayloadUnmarshaler,
  17584. msg eventstream.Message,
  17585. ) error {
  17586. if err := payloadUnmarshaler.UnmarshalPayload(
  17587. bytes.NewReader(msg.Payload), s,
  17588. ); err != nil {
  17589. return err
  17590. }
  17591. return nil
  17592. }
  17593. type StorageClassAnalysis struct {
  17594. _ struct{} `type:"structure"`
  17595. // A container used to describe how data related to the storage class analysis
  17596. // should be exported.
  17597. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  17598. }
  17599. // String returns the string representation
  17600. func (s StorageClassAnalysis) String() string {
  17601. return awsutil.Prettify(s)
  17602. }
  17603. // GoString returns the string representation
  17604. func (s StorageClassAnalysis) GoString() string {
  17605. return s.String()
  17606. }
  17607. // Validate inspects the fields of the type to determine if they are valid.
  17608. func (s *StorageClassAnalysis) Validate() error {
  17609. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  17610. if s.DataExport != nil {
  17611. if err := s.DataExport.Validate(); err != nil {
  17612. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  17613. }
  17614. }
  17615. if invalidParams.Len() > 0 {
  17616. return invalidParams
  17617. }
  17618. return nil
  17619. }
  17620. // SetDataExport sets the DataExport field's value.
  17621. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  17622. s.DataExport = v
  17623. return s
  17624. }
  17625. type StorageClassAnalysisDataExport struct {
  17626. _ struct{} `type:"structure"`
  17627. // The place to store the data for an analysis.
  17628. //
  17629. // Destination is a required field
  17630. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  17631. // The version of the output schema to use when exporting data. Must be V_1.
  17632. //
  17633. // OutputSchemaVersion is a required field
  17634. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  17635. }
  17636. // String returns the string representation
  17637. func (s StorageClassAnalysisDataExport) String() string {
  17638. return awsutil.Prettify(s)
  17639. }
  17640. // GoString returns the string representation
  17641. func (s StorageClassAnalysisDataExport) GoString() string {
  17642. return s.String()
  17643. }
  17644. // Validate inspects the fields of the type to determine if they are valid.
  17645. func (s *StorageClassAnalysisDataExport) Validate() error {
  17646. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  17647. if s.Destination == nil {
  17648. invalidParams.Add(request.NewErrParamRequired("Destination"))
  17649. }
  17650. if s.OutputSchemaVersion == nil {
  17651. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  17652. }
  17653. if s.Destination != nil {
  17654. if err := s.Destination.Validate(); err != nil {
  17655. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  17656. }
  17657. }
  17658. if invalidParams.Len() > 0 {
  17659. return invalidParams
  17660. }
  17661. return nil
  17662. }
  17663. // SetDestination sets the Destination field's value.
  17664. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  17665. s.Destination = v
  17666. return s
  17667. }
  17668. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  17669. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  17670. s.OutputSchemaVersion = &v
  17671. return s
  17672. }
  17673. type Tag struct {
  17674. _ struct{} `type:"structure"`
  17675. // Name of the tag.
  17676. //
  17677. // Key is a required field
  17678. Key *string `min:"1" type:"string" required:"true"`
  17679. // Value of the tag.
  17680. //
  17681. // Value is a required field
  17682. Value *string `type:"string" required:"true"`
  17683. }
  17684. // String returns the string representation
  17685. func (s Tag) String() string {
  17686. return awsutil.Prettify(s)
  17687. }
  17688. // GoString returns the string representation
  17689. func (s Tag) GoString() string {
  17690. return s.String()
  17691. }
  17692. // Validate inspects the fields of the type to determine if they are valid.
  17693. func (s *Tag) Validate() error {
  17694. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  17695. if s.Key == nil {
  17696. invalidParams.Add(request.NewErrParamRequired("Key"))
  17697. }
  17698. if s.Key != nil && len(*s.Key) < 1 {
  17699. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17700. }
  17701. if s.Value == nil {
  17702. invalidParams.Add(request.NewErrParamRequired("Value"))
  17703. }
  17704. if invalidParams.Len() > 0 {
  17705. return invalidParams
  17706. }
  17707. return nil
  17708. }
  17709. // SetKey sets the Key field's value.
  17710. func (s *Tag) SetKey(v string) *Tag {
  17711. s.Key = &v
  17712. return s
  17713. }
  17714. // SetValue sets the Value field's value.
  17715. func (s *Tag) SetValue(v string) *Tag {
  17716. s.Value = &v
  17717. return s
  17718. }
  17719. type Tagging struct {
  17720. _ struct{} `type:"structure"`
  17721. // TagSet is a required field
  17722. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  17723. }
  17724. // String returns the string representation
  17725. func (s Tagging) String() string {
  17726. return awsutil.Prettify(s)
  17727. }
  17728. // GoString returns the string representation
  17729. func (s Tagging) GoString() string {
  17730. return s.String()
  17731. }
  17732. // Validate inspects the fields of the type to determine if they are valid.
  17733. func (s *Tagging) Validate() error {
  17734. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  17735. if s.TagSet == nil {
  17736. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  17737. }
  17738. if s.TagSet != nil {
  17739. for i, v := range s.TagSet {
  17740. if v == nil {
  17741. continue
  17742. }
  17743. if err := v.Validate(); err != nil {
  17744. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  17745. }
  17746. }
  17747. }
  17748. if invalidParams.Len() > 0 {
  17749. return invalidParams
  17750. }
  17751. return nil
  17752. }
  17753. // SetTagSet sets the TagSet field's value.
  17754. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  17755. s.TagSet = v
  17756. return s
  17757. }
  17758. type TargetGrant struct {
  17759. _ struct{} `type:"structure"`
  17760. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  17761. // Logging permissions assigned to the Grantee for the bucket.
  17762. Permission *string `type:"string" enum:"BucketLogsPermission"`
  17763. }
  17764. // String returns the string representation
  17765. func (s TargetGrant) String() string {
  17766. return awsutil.Prettify(s)
  17767. }
  17768. // GoString returns the string representation
  17769. func (s TargetGrant) GoString() string {
  17770. return s.String()
  17771. }
  17772. // Validate inspects the fields of the type to determine if they are valid.
  17773. func (s *TargetGrant) Validate() error {
  17774. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  17775. if s.Grantee != nil {
  17776. if err := s.Grantee.Validate(); err != nil {
  17777. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  17778. }
  17779. }
  17780. if invalidParams.Len() > 0 {
  17781. return invalidParams
  17782. }
  17783. return nil
  17784. }
  17785. // SetGrantee sets the Grantee field's value.
  17786. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  17787. s.Grantee = v
  17788. return s
  17789. }
  17790. // SetPermission sets the Permission field's value.
  17791. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  17792. s.Permission = &v
  17793. return s
  17794. }
  17795. // Container for specifying the configuration when you want Amazon S3 to publish
  17796. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  17797. type TopicConfiguration struct {
  17798. _ struct{} `type:"structure"`
  17799. // Events is a required field
  17800. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  17801. // Container for object key name filtering rules. For information about key
  17802. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  17803. // in the Amazon Simple Storage Service Developer Guide.
  17804. Filter *NotificationConfigurationFilter `type:"structure"`
  17805. // Optional unique identifier for configurations in a notification configuration.
  17806. // If you don't provide one, Amazon S3 will assign an ID.
  17807. Id *string `type:"string"`
  17808. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  17809. // events of specified type.
  17810. //
  17811. // TopicArn is a required field
  17812. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  17813. }
  17814. // String returns the string representation
  17815. func (s TopicConfiguration) String() string {
  17816. return awsutil.Prettify(s)
  17817. }
  17818. // GoString returns the string representation
  17819. func (s TopicConfiguration) GoString() string {
  17820. return s.String()
  17821. }
  17822. // Validate inspects the fields of the type to determine if they are valid.
  17823. func (s *TopicConfiguration) Validate() error {
  17824. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  17825. if s.Events == nil {
  17826. invalidParams.Add(request.NewErrParamRequired("Events"))
  17827. }
  17828. if s.TopicArn == nil {
  17829. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  17830. }
  17831. if invalidParams.Len() > 0 {
  17832. return invalidParams
  17833. }
  17834. return nil
  17835. }
  17836. // SetEvents sets the Events field's value.
  17837. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  17838. s.Events = v
  17839. return s
  17840. }
  17841. // SetFilter sets the Filter field's value.
  17842. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  17843. s.Filter = v
  17844. return s
  17845. }
  17846. // SetId sets the Id field's value.
  17847. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  17848. s.Id = &v
  17849. return s
  17850. }
  17851. // SetTopicArn sets the TopicArn field's value.
  17852. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  17853. s.TopicArn = &v
  17854. return s
  17855. }
  17856. type TopicConfigurationDeprecated struct {
  17857. _ struct{} `type:"structure"`
  17858. // Bucket event for which to send notifications.
  17859. //
  17860. // Deprecated: Event has been deprecated
  17861. Event *string `deprecated:"true" type:"string" enum:"Event"`
  17862. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  17863. // Optional unique identifier for configurations in a notification configuration.
  17864. // If you don't provide one, Amazon S3 will assign an ID.
  17865. Id *string `type:"string"`
  17866. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  17867. // specified events for the bucket.
  17868. Topic *string `type:"string"`
  17869. }
  17870. // String returns the string representation
  17871. func (s TopicConfigurationDeprecated) String() string {
  17872. return awsutil.Prettify(s)
  17873. }
  17874. // GoString returns the string representation
  17875. func (s TopicConfigurationDeprecated) GoString() string {
  17876. return s.String()
  17877. }
  17878. // SetEvent sets the Event field's value.
  17879. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  17880. s.Event = &v
  17881. return s
  17882. }
  17883. // SetEvents sets the Events field's value.
  17884. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  17885. s.Events = v
  17886. return s
  17887. }
  17888. // SetId sets the Id field's value.
  17889. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  17890. s.Id = &v
  17891. return s
  17892. }
  17893. // SetTopic sets the Topic field's value.
  17894. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  17895. s.Topic = &v
  17896. return s
  17897. }
  17898. type Transition struct {
  17899. _ struct{} `type:"structure"`
  17900. // Indicates at what date the object is to be moved or deleted. Should be in
  17901. // GMT ISO 8601 Format.
  17902. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  17903. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  17904. // The value must be a non-zero positive integer.
  17905. Days *int64 `type:"integer"`
  17906. // The class of storage used to store the object.
  17907. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  17908. }
  17909. // String returns the string representation
  17910. func (s Transition) String() string {
  17911. return awsutil.Prettify(s)
  17912. }
  17913. // GoString returns the string representation
  17914. func (s Transition) GoString() string {
  17915. return s.String()
  17916. }
  17917. // SetDate sets the Date field's value.
  17918. func (s *Transition) SetDate(v time.Time) *Transition {
  17919. s.Date = &v
  17920. return s
  17921. }
  17922. // SetDays sets the Days field's value.
  17923. func (s *Transition) SetDays(v int64) *Transition {
  17924. s.Days = &v
  17925. return s
  17926. }
  17927. // SetStorageClass sets the StorageClass field's value.
  17928. func (s *Transition) SetStorageClass(v string) *Transition {
  17929. s.StorageClass = &v
  17930. return s
  17931. }
  17932. type UploadPartCopyInput struct {
  17933. _ struct{} `type:"structure"`
  17934. // Bucket is a required field
  17935. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17936. // The name of the source bucket and key name of the source object, separated
  17937. // by a slash (/). Must be URL-encoded.
  17938. //
  17939. // CopySource is a required field
  17940. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  17941. // Copies the object if its entity tag (ETag) matches the specified tag.
  17942. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  17943. // Copies the object if it has been modified since the specified time.
  17944. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  17945. // Copies the object if its entity tag (ETag) is different than the specified
  17946. // ETag.
  17947. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  17948. // Copies the object if it hasn't been modified since the specified time.
  17949. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  17950. // The range of bytes to copy from the source object. The range value must use
  17951. // the form bytes=first-last, where the first and last are the zero-based byte
  17952. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  17953. // first ten bytes of the source. You can copy a range only if the source object
  17954. // is greater than 5 GB.
  17955. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  17956. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  17957. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  17958. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  17959. // the source object. The encryption key provided in this header must be one
  17960. // that was used when the source object was created.
  17961. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  17962. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17963. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17964. // key was transmitted without error.
  17965. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  17966. // Key is a required field
  17967. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17968. // Part number of part being copied. This is a positive integer between 1 and
  17969. // 10,000.
  17970. //
  17971. // PartNumber is a required field
  17972. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  17973. // Confirms that the requester knows that she or he will be charged for the
  17974. // request. Bucket owners need not specify this parameter in their requests.
  17975. // Documentation on downloading objects from requester pays buckets can be found
  17976. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17977. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17978. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17979. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17980. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17981. // data. This value is used to store the object and then it is discarded; Amazon
  17982. // does not store the encryption key. The key must be appropriate for use with
  17983. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17984. // header. This must be the same encryption key specified in the initiate multipart
  17985. // upload request.
  17986. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  17987. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17988. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17989. // key was transmitted without error.
  17990. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17991. // Upload ID identifying the multipart upload whose part is being copied.
  17992. //
  17993. // UploadId is a required field
  17994. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  17995. }
  17996. // String returns the string representation
  17997. func (s UploadPartCopyInput) String() string {
  17998. return awsutil.Prettify(s)
  17999. }
  18000. // GoString returns the string representation
  18001. func (s UploadPartCopyInput) GoString() string {
  18002. return s.String()
  18003. }
  18004. // Validate inspects the fields of the type to determine if they are valid.
  18005. func (s *UploadPartCopyInput) Validate() error {
  18006. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  18007. if s.Bucket == nil {
  18008. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18009. }
  18010. if s.CopySource == nil {
  18011. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  18012. }
  18013. if s.Key == nil {
  18014. invalidParams.Add(request.NewErrParamRequired("Key"))
  18015. }
  18016. if s.Key != nil && len(*s.Key) < 1 {
  18017. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  18018. }
  18019. if s.PartNumber == nil {
  18020. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  18021. }
  18022. if s.UploadId == nil {
  18023. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  18024. }
  18025. if invalidParams.Len() > 0 {
  18026. return invalidParams
  18027. }
  18028. return nil
  18029. }
  18030. // SetBucket sets the Bucket field's value.
  18031. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  18032. s.Bucket = &v
  18033. return s
  18034. }
  18035. func (s *UploadPartCopyInput) getBucket() (v string) {
  18036. if s.Bucket == nil {
  18037. return v
  18038. }
  18039. return *s.Bucket
  18040. }
  18041. // SetCopySource sets the CopySource field's value.
  18042. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  18043. s.CopySource = &v
  18044. return s
  18045. }
  18046. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  18047. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  18048. s.CopySourceIfMatch = &v
  18049. return s
  18050. }
  18051. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  18052. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  18053. s.CopySourceIfModifiedSince = &v
  18054. return s
  18055. }
  18056. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  18057. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  18058. s.CopySourceIfNoneMatch = &v
  18059. return s
  18060. }
  18061. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  18062. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  18063. s.CopySourceIfUnmodifiedSince = &v
  18064. return s
  18065. }
  18066. // SetCopySourceRange sets the CopySourceRange field's value.
  18067. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  18068. s.CopySourceRange = &v
  18069. return s
  18070. }
  18071. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  18072. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  18073. s.CopySourceSSECustomerAlgorithm = &v
  18074. return s
  18075. }
  18076. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  18077. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  18078. s.CopySourceSSECustomerKey = &v
  18079. return s
  18080. }
  18081. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  18082. if s.CopySourceSSECustomerKey == nil {
  18083. return v
  18084. }
  18085. return *s.CopySourceSSECustomerKey
  18086. }
  18087. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  18088. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  18089. s.CopySourceSSECustomerKeyMD5 = &v
  18090. return s
  18091. }
  18092. // SetKey sets the Key field's value.
  18093. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  18094. s.Key = &v
  18095. return s
  18096. }
  18097. // SetPartNumber sets the PartNumber field's value.
  18098. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  18099. s.PartNumber = &v
  18100. return s
  18101. }
  18102. // SetRequestPayer sets the RequestPayer field's value.
  18103. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  18104. s.RequestPayer = &v
  18105. return s
  18106. }
  18107. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  18108. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  18109. s.SSECustomerAlgorithm = &v
  18110. return s
  18111. }
  18112. // SetSSECustomerKey sets the SSECustomerKey field's value.
  18113. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  18114. s.SSECustomerKey = &v
  18115. return s
  18116. }
  18117. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  18118. if s.SSECustomerKey == nil {
  18119. return v
  18120. }
  18121. return *s.SSECustomerKey
  18122. }
  18123. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  18124. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  18125. s.SSECustomerKeyMD5 = &v
  18126. return s
  18127. }
  18128. // SetUploadId sets the UploadId field's value.
  18129. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  18130. s.UploadId = &v
  18131. return s
  18132. }
  18133. type UploadPartCopyOutput struct {
  18134. _ struct{} `type:"structure" payload:"CopyPartResult"`
  18135. CopyPartResult *CopyPartResult `type:"structure"`
  18136. // The version of the source object that was copied, if you have enabled versioning
  18137. // on the source bucket.
  18138. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  18139. // If present, indicates that the requester was successfully charged for the
  18140. // request.
  18141. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  18142. // If server-side encryption with a customer-provided encryption key was requested,
  18143. // the response will include this header confirming the encryption algorithm
  18144. // used.
  18145. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  18146. // If server-side encryption with a customer-provided encryption key was requested,
  18147. // the response will include this header to provide round trip message integrity
  18148. // verification of the customer-provided encryption key.
  18149. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  18150. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  18151. // encryption key that was used for the object.
  18152. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  18153. // The Server-side encryption algorithm used when storing this object in S3
  18154. // (e.g., AES256, aws:kms).
  18155. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  18156. }
  18157. // String returns the string representation
  18158. func (s UploadPartCopyOutput) String() string {
  18159. return awsutil.Prettify(s)
  18160. }
  18161. // GoString returns the string representation
  18162. func (s UploadPartCopyOutput) GoString() string {
  18163. return s.String()
  18164. }
  18165. // SetCopyPartResult sets the CopyPartResult field's value.
  18166. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  18167. s.CopyPartResult = v
  18168. return s
  18169. }
  18170. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  18171. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  18172. s.CopySourceVersionId = &v
  18173. return s
  18174. }
  18175. // SetRequestCharged sets the RequestCharged field's value.
  18176. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  18177. s.RequestCharged = &v
  18178. return s
  18179. }
  18180. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  18181. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  18182. s.SSECustomerAlgorithm = &v
  18183. return s
  18184. }
  18185. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  18186. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  18187. s.SSECustomerKeyMD5 = &v
  18188. return s
  18189. }
  18190. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  18191. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  18192. s.SSEKMSKeyId = &v
  18193. return s
  18194. }
  18195. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  18196. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  18197. s.ServerSideEncryption = &v
  18198. return s
  18199. }
  18200. type UploadPartInput struct {
  18201. _ struct{} `type:"structure" payload:"Body"`
  18202. // Object data.
  18203. Body io.ReadSeeker `type:"blob"`
  18204. // Name of the bucket to which the multipart upload was initiated.
  18205. //
  18206. // Bucket is a required field
  18207. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18208. // Size of the body in bytes. This parameter is useful when the size of the
  18209. // body cannot be determined automatically.
  18210. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  18211. // The base64-encoded 128-bit MD5 digest of the part data.
  18212. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  18213. // Object key for which the multipart upload was initiated.
  18214. //
  18215. // Key is a required field
  18216. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  18217. // Part number of part being uploaded. This is a positive integer between 1
  18218. // and 10,000.
  18219. //
  18220. // PartNumber is a required field
  18221. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  18222. // Confirms that the requester knows that she or he will be charged for the
  18223. // request. Bucket owners need not specify this parameter in their requests.
  18224. // Documentation on downloading objects from requester pays buckets can be found
  18225. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  18226. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  18227. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  18228. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  18229. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  18230. // data. This value is used to store the object and then it is discarded; Amazon
  18231. // does not store the encryption key. The key must be appropriate for use with
  18232. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  18233. // header. This must be the same encryption key specified in the initiate multipart
  18234. // upload request.
  18235. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  18236. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  18237. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  18238. // key was transmitted without error.
  18239. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  18240. // Upload ID identifying the multipart upload whose part is being uploaded.
  18241. //
  18242. // UploadId is a required field
  18243. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  18244. }
  18245. // String returns the string representation
  18246. func (s UploadPartInput) String() string {
  18247. return awsutil.Prettify(s)
  18248. }
  18249. // GoString returns the string representation
  18250. func (s UploadPartInput) GoString() string {
  18251. return s.String()
  18252. }
  18253. // Validate inspects the fields of the type to determine if they are valid.
  18254. func (s *UploadPartInput) Validate() error {
  18255. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  18256. if s.Bucket == nil {
  18257. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18258. }
  18259. if s.Key == nil {
  18260. invalidParams.Add(request.NewErrParamRequired("Key"))
  18261. }
  18262. if s.Key != nil && len(*s.Key) < 1 {
  18263. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  18264. }
  18265. if s.PartNumber == nil {
  18266. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  18267. }
  18268. if s.UploadId == nil {
  18269. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  18270. }
  18271. if invalidParams.Len() > 0 {
  18272. return invalidParams
  18273. }
  18274. return nil
  18275. }
  18276. // SetBody sets the Body field's value.
  18277. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  18278. s.Body = v
  18279. return s
  18280. }
  18281. // SetBucket sets the Bucket field's value.
  18282. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  18283. s.Bucket = &v
  18284. return s
  18285. }
  18286. func (s *UploadPartInput) getBucket() (v string) {
  18287. if s.Bucket == nil {
  18288. return v
  18289. }
  18290. return *s.Bucket
  18291. }
  18292. // SetContentLength sets the ContentLength field's value.
  18293. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  18294. s.ContentLength = &v
  18295. return s
  18296. }
  18297. // SetContentMD5 sets the ContentMD5 field's value.
  18298. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  18299. s.ContentMD5 = &v
  18300. return s
  18301. }
  18302. // SetKey sets the Key field's value.
  18303. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  18304. s.Key = &v
  18305. return s
  18306. }
  18307. // SetPartNumber sets the PartNumber field's value.
  18308. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  18309. s.PartNumber = &v
  18310. return s
  18311. }
  18312. // SetRequestPayer sets the RequestPayer field's value.
  18313. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  18314. s.RequestPayer = &v
  18315. return s
  18316. }
  18317. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  18318. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  18319. s.SSECustomerAlgorithm = &v
  18320. return s
  18321. }
  18322. // SetSSECustomerKey sets the SSECustomerKey field's value.
  18323. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  18324. s.SSECustomerKey = &v
  18325. return s
  18326. }
  18327. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  18328. if s.SSECustomerKey == nil {
  18329. return v
  18330. }
  18331. return *s.SSECustomerKey
  18332. }
  18333. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  18334. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  18335. s.SSECustomerKeyMD5 = &v
  18336. return s
  18337. }
  18338. // SetUploadId sets the UploadId field's value.
  18339. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  18340. s.UploadId = &v
  18341. return s
  18342. }
  18343. type UploadPartOutput struct {
  18344. _ struct{} `type:"structure"`
  18345. // Entity tag for the uploaded object.
  18346. ETag *string `location:"header" locationName:"ETag" type:"string"`
  18347. // If present, indicates that the requester was successfully charged for the
  18348. // request.
  18349. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  18350. // If server-side encryption with a customer-provided encryption key was requested,
  18351. // the response will include this header confirming the encryption algorithm
  18352. // used.
  18353. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  18354. // If server-side encryption with a customer-provided encryption key was requested,
  18355. // the response will include this header to provide round trip message integrity
  18356. // verification of the customer-provided encryption key.
  18357. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  18358. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  18359. // encryption key that was used for the object.
  18360. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  18361. // The Server-side encryption algorithm used when storing this object in S3
  18362. // (e.g., AES256, aws:kms).
  18363. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  18364. }
  18365. // String returns the string representation
  18366. func (s UploadPartOutput) String() string {
  18367. return awsutil.Prettify(s)
  18368. }
  18369. // GoString returns the string representation
  18370. func (s UploadPartOutput) GoString() string {
  18371. return s.String()
  18372. }
  18373. // SetETag sets the ETag field's value.
  18374. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  18375. s.ETag = &v
  18376. return s
  18377. }
  18378. // SetRequestCharged sets the RequestCharged field's value.
  18379. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  18380. s.RequestCharged = &v
  18381. return s
  18382. }
  18383. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  18384. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  18385. s.SSECustomerAlgorithm = &v
  18386. return s
  18387. }
  18388. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  18389. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  18390. s.SSECustomerKeyMD5 = &v
  18391. return s
  18392. }
  18393. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  18394. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  18395. s.SSEKMSKeyId = &v
  18396. return s
  18397. }
  18398. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  18399. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  18400. s.ServerSideEncryption = &v
  18401. return s
  18402. }
  18403. type VersioningConfiguration struct {
  18404. _ struct{} `type:"structure"`
  18405. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  18406. // This element is only returned if the bucket has been configured with MFA
  18407. // delete. If the bucket has never been so configured, this element is not returned.
  18408. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  18409. // The versioning state of the bucket.
  18410. Status *string `type:"string" enum:"BucketVersioningStatus"`
  18411. }
  18412. // String returns the string representation
  18413. func (s VersioningConfiguration) String() string {
  18414. return awsutil.Prettify(s)
  18415. }
  18416. // GoString returns the string representation
  18417. func (s VersioningConfiguration) GoString() string {
  18418. return s.String()
  18419. }
  18420. // SetMFADelete sets the MFADelete field's value.
  18421. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  18422. s.MFADelete = &v
  18423. return s
  18424. }
  18425. // SetStatus sets the Status field's value.
  18426. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  18427. s.Status = &v
  18428. return s
  18429. }
  18430. type WebsiteConfiguration struct {
  18431. _ struct{} `type:"structure"`
  18432. ErrorDocument *ErrorDocument `type:"structure"`
  18433. IndexDocument *IndexDocument `type:"structure"`
  18434. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  18435. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  18436. }
  18437. // String returns the string representation
  18438. func (s WebsiteConfiguration) String() string {
  18439. return awsutil.Prettify(s)
  18440. }
  18441. // GoString returns the string representation
  18442. func (s WebsiteConfiguration) GoString() string {
  18443. return s.String()
  18444. }
  18445. // Validate inspects the fields of the type to determine if they are valid.
  18446. func (s *WebsiteConfiguration) Validate() error {
  18447. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  18448. if s.ErrorDocument != nil {
  18449. if err := s.ErrorDocument.Validate(); err != nil {
  18450. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  18451. }
  18452. }
  18453. if s.IndexDocument != nil {
  18454. if err := s.IndexDocument.Validate(); err != nil {
  18455. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  18456. }
  18457. }
  18458. if s.RedirectAllRequestsTo != nil {
  18459. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  18460. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  18461. }
  18462. }
  18463. if s.RoutingRules != nil {
  18464. for i, v := range s.RoutingRules {
  18465. if v == nil {
  18466. continue
  18467. }
  18468. if err := v.Validate(); err != nil {
  18469. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  18470. }
  18471. }
  18472. }
  18473. if invalidParams.Len() > 0 {
  18474. return invalidParams
  18475. }
  18476. return nil
  18477. }
  18478. // SetErrorDocument sets the ErrorDocument field's value.
  18479. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  18480. s.ErrorDocument = v
  18481. return s
  18482. }
  18483. // SetIndexDocument sets the IndexDocument field's value.
  18484. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  18485. s.IndexDocument = v
  18486. return s
  18487. }
  18488. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  18489. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  18490. s.RedirectAllRequestsTo = v
  18491. return s
  18492. }
  18493. // SetRoutingRules sets the RoutingRules field's value.
  18494. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  18495. s.RoutingRules = v
  18496. return s
  18497. }
  18498. const (
  18499. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  18500. AnalyticsS3ExportFileFormatCsv = "CSV"
  18501. )
  18502. const (
  18503. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  18504. BucketAccelerateStatusEnabled = "Enabled"
  18505. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  18506. BucketAccelerateStatusSuspended = "Suspended"
  18507. )
  18508. const (
  18509. // BucketCannedACLPrivate is a BucketCannedACL enum value
  18510. BucketCannedACLPrivate = "private"
  18511. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  18512. BucketCannedACLPublicRead = "public-read"
  18513. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  18514. BucketCannedACLPublicReadWrite = "public-read-write"
  18515. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  18516. BucketCannedACLAuthenticatedRead = "authenticated-read"
  18517. )
  18518. const (
  18519. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  18520. BucketLocationConstraintEu = "EU"
  18521. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  18522. BucketLocationConstraintEuWest1 = "eu-west-1"
  18523. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  18524. BucketLocationConstraintUsWest1 = "us-west-1"
  18525. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  18526. BucketLocationConstraintUsWest2 = "us-west-2"
  18527. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  18528. BucketLocationConstraintApSouth1 = "ap-south-1"
  18529. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  18530. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  18531. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  18532. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  18533. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  18534. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  18535. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  18536. BucketLocationConstraintSaEast1 = "sa-east-1"
  18537. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  18538. BucketLocationConstraintCnNorth1 = "cn-north-1"
  18539. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  18540. BucketLocationConstraintEuCentral1 = "eu-central-1"
  18541. )
  18542. const (
  18543. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  18544. BucketLogsPermissionFullControl = "FULL_CONTROL"
  18545. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  18546. BucketLogsPermissionRead = "READ"
  18547. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  18548. BucketLogsPermissionWrite = "WRITE"
  18549. )
  18550. const (
  18551. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  18552. BucketVersioningStatusEnabled = "Enabled"
  18553. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  18554. BucketVersioningStatusSuspended = "Suspended"
  18555. )
  18556. const (
  18557. // CompressionTypeNone is a CompressionType enum value
  18558. CompressionTypeNone = "NONE"
  18559. // CompressionTypeGzip is a CompressionType enum value
  18560. CompressionTypeGzip = "GZIP"
  18561. // CompressionTypeBzip2 is a CompressionType enum value
  18562. CompressionTypeBzip2 = "BZIP2"
  18563. )
  18564. const (
  18565. // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
  18566. DeleteMarkerReplicationStatusEnabled = "Enabled"
  18567. // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
  18568. DeleteMarkerReplicationStatusDisabled = "Disabled"
  18569. )
  18570. // Requests Amazon S3 to encode the object keys in the response and specifies
  18571. // the encoding method to use. An object key may contain any Unicode character;
  18572. // however, XML 1.0 parser cannot parse some characters, such as characters
  18573. // with an ASCII value from 0 to 10. For characters that are not supported in
  18574. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  18575. // keys in the response.
  18576. const (
  18577. // EncodingTypeUrl is a EncodingType enum value
  18578. EncodingTypeUrl = "url"
  18579. )
  18580. // Bucket event for which to send notifications.
  18581. const (
  18582. // EventS3ReducedRedundancyLostObject is a Event enum value
  18583. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  18584. // EventS3ObjectCreated is a Event enum value
  18585. EventS3ObjectCreated = "s3:ObjectCreated:*"
  18586. // EventS3ObjectCreatedPut is a Event enum value
  18587. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  18588. // EventS3ObjectCreatedPost is a Event enum value
  18589. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  18590. // EventS3ObjectCreatedCopy is a Event enum value
  18591. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  18592. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  18593. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  18594. // EventS3ObjectRemoved is a Event enum value
  18595. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  18596. // EventS3ObjectRemovedDelete is a Event enum value
  18597. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  18598. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  18599. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  18600. )
  18601. const (
  18602. // ExpirationStatusEnabled is a ExpirationStatus enum value
  18603. ExpirationStatusEnabled = "Enabled"
  18604. // ExpirationStatusDisabled is a ExpirationStatus enum value
  18605. ExpirationStatusDisabled = "Disabled"
  18606. )
  18607. const (
  18608. // ExpressionTypeSql is a ExpressionType enum value
  18609. ExpressionTypeSql = "SQL"
  18610. )
  18611. const (
  18612. // FileHeaderInfoUse is a FileHeaderInfo enum value
  18613. FileHeaderInfoUse = "USE"
  18614. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  18615. FileHeaderInfoIgnore = "IGNORE"
  18616. // FileHeaderInfoNone is a FileHeaderInfo enum value
  18617. FileHeaderInfoNone = "NONE"
  18618. )
  18619. const (
  18620. // FilterRuleNamePrefix is a FilterRuleName enum value
  18621. FilterRuleNamePrefix = "prefix"
  18622. // FilterRuleNameSuffix is a FilterRuleName enum value
  18623. FilterRuleNameSuffix = "suffix"
  18624. )
  18625. const (
  18626. // InventoryFormatCsv is a InventoryFormat enum value
  18627. InventoryFormatCsv = "CSV"
  18628. // InventoryFormatOrc is a InventoryFormat enum value
  18629. InventoryFormatOrc = "ORC"
  18630. )
  18631. const (
  18632. // InventoryFrequencyDaily is a InventoryFrequency enum value
  18633. InventoryFrequencyDaily = "Daily"
  18634. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  18635. InventoryFrequencyWeekly = "Weekly"
  18636. )
  18637. const (
  18638. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  18639. InventoryIncludedObjectVersionsAll = "All"
  18640. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  18641. InventoryIncludedObjectVersionsCurrent = "Current"
  18642. )
  18643. const (
  18644. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  18645. InventoryOptionalFieldSize = "Size"
  18646. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  18647. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  18648. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  18649. InventoryOptionalFieldStorageClass = "StorageClass"
  18650. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  18651. InventoryOptionalFieldEtag = "ETag"
  18652. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  18653. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  18654. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  18655. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  18656. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  18657. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  18658. )
  18659. const (
  18660. // JSONTypeDocument is a JSONType enum value
  18661. JSONTypeDocument = "DOCUMENT"
  18662. // JSONTypeLines is a JSONType enum value
  18663. JSONTypeLines = "LINES"
  18664. )
  18665. const (
  18666. // MFADeleteEnabled is a MFADelete enum value
  18667. MFADeleteEnabled = "Enabled"
  18668. // MFADeleteDisabled is a MFADelete enum value
  18669. MFADeleteDisabled = "Disabled"
  18670. )
  18671. const (
  18672. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  18673. MFADeleteStatusEnabled = "Enabled"
  18674. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  18675. MFADeleteStatusDisabled = "Disabled"
  18676. )
  18677. const (
  18678. // MetadataDirectiveCopy is a MetadataDirective enum value
  18679. MetadataDirectiveCopy = "COPY"
  18680. // MetadataDirectiveReplace is a MetadataDirective enum value
  18681. MetadataDirectiveReplace = "REPLACE"
  18682. )
  18683. const (
  18684. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  18685. ObjectCannedACLPrivate = "private"
  18686. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  18687. ObjectCannedACLPublicRead = "public-read"
  18688. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  18689. ObjectCannedACLPublicReadWrite = "public-read-write"
  18690. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  18691. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  18692. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  18693. ObjectCannedACLAwsExecRead = "aws-exec-read"
  18694. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  18695. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  18696. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  18697. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  18698. )
  18699. const (
  18700. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  18701. ObjectStorageClassStandard = "STANDARD"
  18702. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  18703. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  18704. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  18705. ObjectStorageClassGlacier = "GLACIER"
  18706. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  18707. ObjectStorageClassStandardIa = "STANDARD_IA"
  18708. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  18709. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  18710. )
  18711. const (
  18712. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  18713. ObjectVersionStorageClassStandard = "STANDARD"
  18714. )
  18715. const (
  18716. // OwnerOverrideDestination is a OwnerOverride enum value
  18717. OwnerOverrideDestination = "Destination"
  18718. )
  18719. const (
  18720. // PayerRequester is a Payer enum value
  18721. PayerRequester = "Requester"
  18722. // PayerBucketOwner is a Payer enum value
  18723. PayerBucketOwner = "BucketOwner"
  18724. )
  18725. const (
  18726. // PermissionFullControl is a Permission enum value
  18727. PermissionFullControl = "FULL_CONTROL"
  18728. // PermissionWrite is a Permission enum value
  18729. PermissionWrite = "WRITE"
  18730. // PermissionWriteAcp is a Permission enum value
  18731. PermissionWriteAcp = "WRITE_ACP"
  18732. // PermissionRead is a Permission enum value
  18733. PermissionRead = "READ"
  18734. // PermissionReadAcp is a Permission enum value
  18735. PermissionReadAcp = "READ_ACP"
  18736. )
  18737. const (
  18738. // ProtocolHttp is a Protocol enum value
  18739. ProtocolHttp = "http"
  18740. // ProtocolHttps is a Protocol enum value
  18741. ProtocolHttps = "https"
  18742. )
  18743. const (
  18744. // QuoteFieldsAlways is a QuoteFields enum value
  18745. QuoteFieldsAlways = "ALWAYS"
  18746. // QuoteFieldsAsneeded is a QuoteFields enum value
  18747. QuoteFieldsAsneeded = "ASNEEDED"
  18748. )
  18749. const (
  18750. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  18751. ReplicationRuleStatusEnabled = "Enabled"
  18752. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  18753. ReplicationRuleStatusDisabled = "Disabled"
  18754. )
  18755. const (
  18756. // ReplicationStatusComplete is a ReplicationStatus enum value
  18757. ReplicationStatusComplete = "COMPLETE"
  18758. // ReplicationStatusPending is a ReplicationStatus enum value
  18759. ReplicationStatusPending = "PENDING"
  18760. // ReplicationStatusFailed is a ReplicationStatus enum value
  18761. ReplicationStatusFailed = "FAILED"
  18762. // ReplicationStatusReplica is a ReplicationStatus enum value
  18763. ReplicationStatusReplica = "REPLICA"
  18764. )
  18765. // If present, indicates that the requester was successfully charged for the
  18766. // request.
  18767. const (
  18768. // RequestChargedRequester is a RequestCharged enum value
  18769. RequestChargedRequester = "requester"
  18770. )
  18771. // Confirms that the requester knows that she or he will be charged for the
  18772. // request. Bucket owners need not specify this parameter in their requests.
  18773. // Documentation on downloading objects from requester pays buckets can be found
  18774. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  18775. const (
  18776. // RequestPayerRequester is a RequestPayer enum value
  18777. RequestPayerRequester = "requester"
  18778. )
  18779. const (
  18780. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  18781. RestoreRequestTypeSelect = "SELECT"
  18782. )
  18783. const (
  18784. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  18785. ServerSideEncryptionAes256 = "AES256"
  18786. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  18787. ServerSideEncryptionAwsKms = "aws:kms"
  18788. )
  18789. const (
  18790. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  18791. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  18792. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  18793. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  18794. )
  18795. const (
  18796. // StorageClassStandard is a StorageClass enum value
  18797. StorageClassStandard = "STANDARD"
  18798. // StorageClassReducedRedundancy is a StorageClass enum value
  18799. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  18800. // StorageClassStandardIa is a StorageClass enum value
  18801. StorageClassStandardIa = "STANDARD_IA"
  18802. // StorageClassOnezoneIa is a StorageClass enum value
  18803. StorageClassOnezoneIa = "ONEZONE_IA"
  18804. )
  18805. const (
  18806. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  18807. StorageClassAnalysisSchemaVersionV1 = "V_1"
  18808. )
  18809. const (
  18810. // TaggingDirectiveCopy is a TaggingDirective enum value
  18811. TaggingDirectiveCopy = "COPY"
  18812. // TaggingDirectiveReplace is a TaggingDirective enum value
  18813. TaggingDirectiveReplace = "REPLACE"
  18814. )
  18815. const (
  18816. // TierStandard is a Tier enum value
  18817. TierStandard = "Standard"
  18818. // TierBulk is a Tier enum value
  18819. TierBulk = "Bulk"
  18820. // TierExpedited is a Tier enum value
  18821. TierExpedited = "Expedited"
  18822. )
  18823. const (
  18824. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  18825. TransitionStorageClassGlacier = "GLACIER"
  18826. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  18827. TransitionStorageClassStandardIa = "STANDARD_IA"
  18828. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  18829. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  18830. )
  18831. const (
  18832. // TypeCanonicalUser is a Type enum value
  18833. TypeCanonicalUser = "CanonicalUser"
  18834. // TypeAmazonCustomerByEmail is a Type enum value
  18835. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  18836. // TypeGroup is a Type enum value
  18837. TypeGroup = "Group"
  18838. )