api.go 459 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package s3 provides a client for Amazon Simple Storage Service.
  3. package s3
  4. import (
  5. "fmt"
  6. "io"
  7. "time"
  8. "github.com/aws/aws-sdk-go/aws/awsutil"
  9. "github.com/aws/aws-sdk-go/aws/request"
  10. "github.com/aws/aws-sdk-go/private/protocol"
  11. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  12. )
  13. const opAbortMultipartUpload = "AbortMultipartUpload"
  14. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  15. // client's request for the AbortMultipartUpload operation. The "output" return
  16. // value can be used to capture response data after the request's "Send" method
  17. // is called.
  18. //
  19. // See AbortMultipartUpload for usage and error information.
  20. //
  21. // Creating a request object using this method should be used when you want to inject
  22. // custom logic into the request's lifecycle using a custom handler, or if you want to
  23. // access properties on the request object before or after sending the request. If
  24. // you just want the service response, call the AbortMultipartUpload method directly
  25. // instead.
  26. //
  27. // Note: You must call the "Send" method on the returned request object in order
  28. // to execute the request.
  29. //
  30. // // Example sending a request using the AbortMultipartUploadRequest method.
  31. // req, resp := client.AbortMultipartUploadRequest(params)
  32. //
  33. // err := req.Send()
  34. // if err == nil { // resp is now filled
  35. // fmt.Println(resp)
  36. // }
  37. //
  38. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  39. op := &request.Operation{
  40. Name: opAbortMultipartUpload,
  41. HTTPMethod: "DELETE",
  42. HTTPPath: "/{Bucket}/{Key+}",
  43. }
  44. if input == nil {
  45. input = &AbortMultipartUploadInput{}
  46. }
  47. req = c.newRequest(op, input, output)
  48. output = &AbortMultipartUploadOutput{}
  49. req.Data = output
  50. return
  51. }
  52. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  53. //
  54. // Aborts a multipart upload.
  55. //
  56. // To verify that all parts have been removed, so you don't get charged for
  57. // the part storage, you should call the List Parts operation and ensure the
  58. // parts list is empty.
  59. //
  60. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  61. // with awserr.Error's Code and Message methods to get detailed information about
  62. // the error.
  63. //
  64. // See the AWS API reference guide for Amazon Simple Storage Service's
  65. // API operation AbortMultipartUpload for usage and error information.
  66. //
  67. // Returned Error Codes:
  68. // * NoSuchUpload
  69. // The specified multipart upload does not exist.
  70. //
  71. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  72. req, out := c.AbortMultipartUploadRequest(input)
  73. err := req.Send()
  74. return out, err
  75. }
  76. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  77. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  78. // client's request for the CompleteMultipartUpload operation. The "output" return
  79. // value can be used to capture response data after the request's "Send" method
  80. // is called.
  81. //
  82. // See CompleteMultipartUpload for usage and error information.
  83. //
  84. // Creating a request object using this method should be used when you want to inject
  85. // custom logic into the request's lifecycle using a custom handler, or if you want to
  86. // access properties on the request object before or after sending the request. If
  87. // you just want the service response, call the CompleteMultipartUpload method directly
  88. // instead.
  89. //
  90. // Note: You must call the "Send" method on the returned request object in order
  91. // to execute the request.
  92. //
  93. // // Example sending a request using the CompleteMultipartUploadRequest method.
  94. // req, resp := client.CompleteMultipartUploadRequest(params)
  95. //
  96. // err := req.Send()
  97. // if err == nil { // resp is now filled
  98. // fmt.Println(resp)
  99. // }
  100. //
  101. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  102. op := &request.Operation{
  103. Name: opCompleteMultipartUpload,
  104. HTTPMethod: "POST",
  105. HTTPPath: "/{Bucket}/{Key+}",
  106. }
  107. if input == nil {
  108. input = &CompleteMultipartUploadInput{}
  109. }
  110. req = c.newRequest(op, input, output)
  111. output = &CompleteMultipartUploadOutput{}
  112. req.Data = output
  113. return
  114. }
  115. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  116. //
  117. // Completes a multipart upload by assembling previously uploaded parts.
  118. //
  119. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  120. // with awserr.Error's Code and Message methods to get detailed information about
  121. // the error.
  122. //
  123. // See the AWS API reference guide for Amazon Simple Storage Service's
  124. // API operation CompleteMultipartUpload for usage and error information.
  125. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  126. req, out := c.CompleteMultipartUploadRequest(input)
  127. err := req.Send()
  128. return out, err
  129. }
  130. const opCopyObject = "CopyObject"
  131. // CopyObjectRequest generates a "aws/request.Request" representing the
  132. // client's request for the CopyObject operation. The "output" return
  133. // value can be used to capture response data after the request's "Send" method
  134. // is called.
  135. //
  136. // See CopyObject for usage and error information.
  137. //
  138. // Creating a request object using this method should be used when you want to inject
  139. // custom logic into the request's lifecycle using a custom handler, or if you want to
  140. // access properties on the request object before or after sending the request. If
  141. // you just want the service response, call the CopyObject method directly
  142. // instead.
  143. //
  144. // Note: You must call the "Send" method on the returned request object in order
  145. // to execute the request.
  146. //
  147. // // Example sending a request using the CopyObjectRequest method.
  148. // req, resp := client.CopyObjectRequest(params)
  149. //
  150. // err := req.Send()
  151. // if err == nil { // resp is now filled
  152. // fmt.Println(resp)
  153. // }
  154. //
  155. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  156. op := &request.Operation{
  157. Name: opCopyObject,
  158. HTTPMethod: "PUT",
  159. HTTPPath: "/{Bucket}/{Key+}",
  160. }
  161. if input == nil {
  162. input = &CopyObjectInput{}
  163. }
  164. req = c.newRequest(op, input, output)
  165. output = &CopyObjectOutput{}
  166. req.Data = output
  167. return
  168. }
  169. // CopyObject API operation for Amazon Simple Storage Service.
  170. //
  171. // Creates a copy of an object that is already stored in Amazon S3.
  172. //
  173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  174. // with awserr.Error's Code and Message methods to get detailed information about
  175. // the error.
  176. //
  177. // See the AWS API reference guide for Amazon Simple Storage Service's
  178. // API operation CopyObject for usage and error information.
  179. //
  180. // Returned Error Codes:
  181. // * ObjectNotInActiveTierError
  182. // The source object of the COPY operation is not in the active tier and is
  183. // only stored in Amazon Glacier.
  184. //
  185. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  186. req, out := c.CopyObjectRequest(input)
  187. err := req.Send()
  188. return out, err
  189. }
  190. const opCreateBucket = "CreateBucket"
  191. // CreateBucketRequest generates a "aws/request.Request" representing the
  192. // client's request for the CreateBucket operation. The "output" return
  193. // value can be used to capture response data after the request's "Send" method
  194. // is called.
  195. //
  196. // See CreateBucket for usage and error information.
  197. //
  198. // Creating a request object using this method should be used when you want to inject
  199. // custom logic into the request's lifecycle using a custom handler, or if you want to
  200. // access properties on the request object before or after sending the request. If
  201. // you just want the service response, call the CreateBucket method directly
  202. // instead.
  203. //
  204. // Note: You must call the "Send" method on the returned request object in order
  205. // to execute the request.
  206. //
  207. // // Example sending a request using the CreateBucketRequest method.
  208. // req, resp := client.CreateBucketRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  216. op := &request.Operation{
  217. Name: opCreateBucket,
  218. HTTPMethod: "PUT",
  219. HTTPPath: "/{Bucket}",
  220. }
  221. if input == nil {
  222. input = &CreateBucketInput{}
  223. }
  224. req = c.newRequest(op, input, output)
  225. output = &CreateBucketOutput{}
  226. req.Data = output
  227. return
  228. }
  229. // CreateBucket API operation for Amazon Simple Storage Service.
  230. //
  231. // Creates a new bucket.
  232. //
  233. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  234. // with awserr.Error's Code and Message methods to get detailed information about
  235. // the error.
  236. //
  237. // See the AWS API reference guide for Amazon Simple Storage Service's
  238. // API operation CreateBucket for usage and error information.
  239. //
  240. // Returned Error Codes:
  241. // * BucketAlreadyExists
  242. // The requested bucket name is not available. The bucket namespace is shared
  243. // by all users of the system. Please select a different name and try again.
  244. //
  245. // * BucketAlreadyOwnedByYou
  246. //
  247. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  248. req, out := c.CreateBucketRequest(input)
  249. err := req.Send()
  250. return out, err
  251. }
  252. const opCreateMultipartUpload = "CreateMultipartUpload"
  253. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  254. // client's request for the CreateMultipartUpload operation. The "output" return
  255. // value can be used to capture response data after the request's "Send" method
  256. // is called.
  257. //
  258. // See CreateMultipartUpload for usage and error information.
  259. //
  260. // Creating a request object using this method should be used when you want to inject
  261. // custom logic into the request's lifecycle using a custom handler, or if you want to
  262. // access properties on the request object before or after sending the request. If
  263. // you just want the service response, call the CreateMultipartUpload method directly
  264. // instead.
  265. //
  266. // Note: You must call the "Send" method on the returned request object in order
  267. // to execute the request.
  268. //
  269. // // Example sending a request using the CreateMultipartUploadRequest method.
  270. // req, resp := client.CreateMultipartUploadRequest(params)
  271. //
  272. // err := req.Send()
  273. // if err == nil { // resp is now filled
  274. // fmt.Println(resp)
  275. // }
  276. //
  277. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  278. op := &request.Operation{
  279. Name: opCreateMultipartUpload,
  280. HTTPMethod: "POST",
  281. HTTPPath: "/{Bucket}/{Key+}?uploads",
  282. }
  283. if input == nil {
  284. input = &CreateMultipartUploadInput{}
  285. }
  286. req = c.newRequest(op, input, output)
  287. output = &CreateMultipartUploadOutput{}
  288. req.Data = output
  289. return
  290. }
  291. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  292. //
  293. // Initiates a multipart upload and returns an upload ID.
  294. //
  295. // Note: After you initiate multipart upload and upload one or more parts, you
  296. // must either complete or abort multipart upload in order to stop getting charged
  297. // for storage of the uploaded parts. Only after you either complete or abort
  298. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  299. // you for the parts storage.
  300. //
  301. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  302. // with awserr.Error's Code and Message methods to get detailed information about
  303. // the error.
  304. //
  305. // See the AWS API reference guide for Amazon Simple Storage Service's
  306. // API operation CreateMultipartUpload for usage and error information.
  307. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  308. req, out := c.CreateMultipartUploadRequest(input)
  309. err := req.Send()
  310. return out, err
  311. }
  312. const opDeleteBucket = "DeleteBucket"
  313. // DeleteBucketRequest generates a "aws/request.Request" representing the
  314. // client's request for the DeleteBucket operation. The "output" return
  315. // value can be used to capture response data after the request's "Send" method
  316. // is called.
  317. //
  318. // See DeleteBucket for usage and error information.
  319. //
  320. // Creating a request object using this method should be used when you want to inject
  321. // custom logic into the request's lifecycle using a custom handler, or if you want to
  322. // access properties on the request object before or after sending the request. If
  323. // you just want the service response, call the DeleteBucket method directly
  324. // instead.
  325. //
  326. // Note: You must call the "Send" method on the returned request object in order
  327. // to execute the request.
  328. //
  329. // // Example sending a request using the DeleteBucketRequest method.
  330. // req, resp := client.DeleteBucketRequest(params)
  331. //
  332. // err := req.Send()
  333. // if err == nil { // resp is now filled
  334. // fmt.Println(resp)
  335. // }
  336. //
  337. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  338. op := &request.Operation{
  339. Name: opDeleteBucket,
  340. HTTPMethod: "DELETE",
  341. HTTPPath: "/{Bucket}",
  342. }
  343. if input == nil {
  344. input = &DeleteBucketInput{}
  345. }
  346. req = c.newRequest(op, input, output)
  347. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  348. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  349. output = &DeleteBucketOutput{}
  350. req.Data = output
  351. return
  352. }
  353. // DeleteBucket API operation for Amazon Simple Storage Service.
  354. //
  355. // Deletes the bucket. All objects (including all object versions and Delete
  356. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  357. //
  358. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  359. // with awserr.Error's Code and Message methods to get detailed information about
  360. // the error.
  361. //
  362. // See the AWS API reference guide for Amazon Simple Storage Service's
  363. // API operation DeleteBucket for usage and error information.
  364. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  365. req, out := c.DeleteBucketRequest(input)
  366. err := req.Send()
  367. return out, err
  368. }
  369. const opDeleteBucketCors = "DeleteBucketCors"
  370. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  371. // client's request for the DeleteBucketCors operation. The "output" return
  372. // value can be used to capture response data after the request's "Send" method
  373. // is called.
  374. //
  375. // See DeleteBucketCors for usage and error information.
  376. //
  377. // Creating a request object using this method should be used when you want to inject
  378. // custom logic into the request's lifecycle using a custom handler, or if you want to
  379. // access properties on the request object before or after sending the request. If
  380. // you just want the service response, call the DeleteBucketCors method directly
  381. // instead.
  382. //
  383. // Note: You must call the "Send" method on the returned request object in order
  384. // to execute the request.
  385. //
  386. // // Example sending a request using the DeleteBucketCorsRequest method.
  387. // req, resp := client.DeleteBucketCorsRequest(params)
  388. //
  389. // err := req.Send()
  390. // if err == nil { // resp is now filled
  391. // fmt.Println(resp)
  392. // }
  393. //
  394. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  395. op := &request.Operation{
  396. Name: opDeleteBucketCors,
  397. HTTPMethod: "DELETE",
  398. HTTPPath: "/{Bucket}?cors",
  399. }
  400. if input == nil {
  401. input = &DeleteBucketCorsInput{}
  402. }
  403. req = c.newRequest(op, input, output)
  404. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  405. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  406. output = &DeleteBucketCorsOutput{}
  407. req.Data = output
  408. return
  409. }
  410. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  411. //
  412. // Deletes the cors configuration information set for the bucket.
  413. //
  414. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  415. // with awserr.Error's Code and Message methods to get detailed information about
  416. // the error.
  417. //
  418. // See the AWS API reference guide for Amazon Simple Storage Service's
  419. // API operation DeleteBucketCors for usage and error information.
  420. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  421. req, out := c.DeleteBucketCorsRequest(input)
  422. err := req.Send()
  423. return out, err
  424. }
  425. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  426. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  427. // client's request for the DeleteBucketLifecycle operation. The "output" return
  428. // value can be used to capture response data after the request's "Send" method
  429. // is called.
  430. //
  431. // See DeleteBucketLifecycle for usage and error information.
  432. //
  433. // Creating a request object using this method should be used when you want to inject
  434. // custom logic into the request's lifecycle using a custom handler, or if you want to
  435. // access properties on the request object before or after sending the request. If
  436. // you just want the service response, call the DeleteBucketLifecycle method directly
  437. // instead.
  438. //
  439. // Note: You must call the "Send" method on the returned request object in order
  440. // to execute the request.
  441. //
  442. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  443. // req, resp := client.DeleteBucketLifecycleRequest(params)
  444. //
  445. // err := req.Send()
  446. // if err == nil { // resp is now filled
  447. // fmt.Println(resp)
  448. // }
  449. //
  450. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  451. op := &request.Operation{
  452. Name: opDeleteBucketLifecycle,
  453. HTTPMethod: "DELETE",
  454. HTTPPath: "/{Bucket}?lifecycle",
  455. }
  456. if input == nil {
  457. input = &DeleteBucketLifecycleInput{}
  458. }
  459. req = c.newRequest(op, input, output)
  460. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  461. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  462. output = &DeleteBucketLifecycleOutput{}
  463. req.Data = output
  464. return
  465. }
  466. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  467. //
  468. // Deletes the lifecycle configuration from the bucket.
  469. //
  470. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  471. // with awserr.Error's Code and Message methods to get detailed information about
  472. // the error.
  473. //
  474. // See the AWS API reference guide for Amazon Simple Storage Service's
  475. // API operation DeleteBucketLifecycle for usage and error information.
  476. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  477. req, out := c.DeleteBucketLifecycleRequest(input)
  478. err := req.Send()
  479. return out, err
  480. }
  481. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  482. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  483. // client's request for the DeleteBucketPolicy operation. The "output" return
  484. // value can be used to capture response data after the request's "Send" method
  485. // is called.
  486. //
  487. // See DeleteBucketPolicy for usage and error information.
  488. //
  489. // Creating a request object using this method should be used when you want to inject
  490. // custom logic into the request's lifecycle using a custom handler, or if you want to
  491. // access properties on the request object before or after sending the request. If
  492. // you just want the service response, call the DeleteBucketPolicy method directly
  493. // instead.
  494. //
  495. // Note: You must call the "Send" method on the returned request object in order
  496. // to execute the request.
  497. //
  498. // // Example sending a request using the DeleteBucketPolicyRequest method.
  499. // req, resp := client.DeleteBucketPolicyRequest(params)
  500. //
  501. // err := req.Send()
  502. // if err == nil { // resp is now filled
  503. // fmt.Println(resp)
  504. // }
  505. //
  506. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  507. op := &request.Operation{
  508. Name: opDeleteBucketPolicy,
  509. HTTPMethod: "DELETE",
  510. HTTPPath: "/{Bucket}?policy",
  511. }
  512. if input == nil {
  513. input = &DeleteBucketPolicyInput{}
  514. }
  515. req = c.newRequest(op, input, output)
  516. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  517. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  518. output = &DeleteBucketPolicyOutput{}
  519. req.Data = output
  520. return
  521. }
  522. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  523. //
  524. // Deletes the policy from the bucket.
  525. //
  526. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  527. // with awserr.Error's Code and Message methods to get detailed information about
  528. // the error.
  529. //
  530. // See the AWS API reference guide for Amazon Simple Storage Service's
  531. // API operation DeleteBucketPolicy for usage and error information.
  532. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  533. req, out := c.DeleteBucketPolicyRequest(input)
  534. err := req.Send()
  535. return out, err
  536. }
  537. const opDeleteBucketReplication = "DeleteBucketReplication"
  538. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  539. // client's request for the DeleteBucketReplication operation. The "output" return
  540. // value can be used to capture response data after the request's "Send" method
  541. // is called.
  542. //
  543. // See DeleteBucketReplication for usage and error information.
  544. //
  545. // Creating a request object using this method should be used when you want to inject
  546. // custom logic into the request's lifecycle using a custom handler, or if you want to
  547. // access properties on the request object before or after sending the request. If
  548. // you just want the service response, call the DeleteBucketReplication method directly
  549. // instead.
  550. //
  551. // Note: You must call the "Send" method on the returned request object in order
  552. // to execute the request.
  553. //
  554. // // Example sending a request using the DeleteBucketReplicationRequest method.
  555. // req, resp := client.DeleteBucketReplicationRequest(params)
  556. //
  557. // err := req.Send()
  558. // if err == nil { // resp is now filled
  559. // fmt.Println(resp)
  560. // }
  561. //
  562. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  563. op := &request.Operation{
  564. Name: opDeleteBucketReplication,
  565. HTTPMethod: "DELETE",
  566. HTTPPath: "/{Bucket}?replication",
  567. }
  568. if input == nil {
  569. input = &DeleteBucketReplicationInput{}
  570. }
  571. req = c.newRequest(op, input, output)
  572. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  573. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  574. output = &DeleteBucketReplicationOutput{}
  575. req.Data = output
  576. return
  577. }
  578. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  579. //
  580. // Deletes the replication configuration from the bucket.
  581. //
  582. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  583. // with awserr.Error's Code and Message methods to get detailed information about
  584. // the error.
  585. //
  586. // See the AWS API reference guide for Amazon Simple Storage Service's
  587. // API operation DeleteBucketReplication for usage and error information.
  588. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  589. req, out := c.DeleteBucketReplicationRequest(input)
  590. err := req.Send()
  591. return out, err
  592. }
  593. const opDeleteBucketTagging = "DeleteBucketTagging"
  594. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  595. // client's request for the DeleteBucketTagging operation. The "output" return
  596. // value can be used to capture response data after the request's "Send" method
  597. // is called.
  598. //
  599. // See DeleteBucketTagging for usage and error information.
  600. //
  601. // Creating a request object using this method should be used when you want to inject
  602. // custom logic into the request's lifecycle using a custom handler, or if you want to
  603. // access properties on the request object before or after sending the request. If
  604. // you just want the service response, call the DeleteBucketTagging method directly
  605. // instead.
  606. //
  607. // Note: You must call the "Send" method on the returned request object in order
  608. // to execute the request.
  609. //
  610. // // Example sending a request using the DeleteBucketTaggingRequest method.
  611. // req, resp := client.DeleteBucketTaggingRequest(params)
  612. //
  613. // err := req.Send()
  614. // if err == nil { // resp is now filled
  615. // fmt.Println(resp)
  616. // }
  617. //
  618. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  619. op := &request.Operation{
  620. Name: opDeleteBucketTagging,
  621. HTTPMethod: "DELETE",
  622. HTTPPath: "/{Bucket}?tagging",
  623. }
  624. if input == nil {
  625. input = &DeleteBucketTaggingInput{}
  626. }
  627. req = c.newRequest(op, input, output)
  628. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  629. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  630. output = &DeleteBucketTaggingOutput{}
  631. req.Data = output
  632. return
  633. }
  634. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  635. //
  636. // Deletes the tags from the bucket.
  637. //
  638. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  639. // with awserr.Error's Code and Message methods to get detailed information about
  640. // the error.
  641. //
  642. // See the AWS API reference guide for Amazon Simple Storage Service's
  643. // API operation DeleteBucketTagging for usage and error information.
  644. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  645. req, out := c.DeleteBucketTaggingRequest(input)
  646. err := req.Send()
  647. return out, err
  648. }
  649. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  650. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  651. // client's request for the DeleteBucketWebsite operation. The "output" return
  652. // value can be used to capture response data after the request's "Send" method
  653. // is called.
  654. //
  655. // See DeleteBucketWebsite for usage and error information.
  656. //
  657. // Creating a request object using this method should be used when you want to inject
  658. // custom logic into the request's lifecycle using a custom handler, or if you want to
  659. // access properties on the request object before or after sending the request. If
  660. // you just want the service response, call the DeleteBucketWebsite method directly
  661. // instead.
  662. //
  663. // Note: You must call the "Send" method on the returned request object in order
  664. // to execute the request.
  665. //
  666. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  667. // req, resp := client.DeleteBucketWebsiteRequest(params)
  668. //
  669. // err := req.Send()
  670. // if err == nil { // resp is now filled
  671. // fmt.Println(resp)
  672. // }
  673. //
  674. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  675. op := &request.Operation{
  676. Name: opDeleteBucketWebsite,
  677. HTTPMethod: "DELETE",
  678. HTTPPath: "/{Bucket}?website",
  679. }
  680. if input == nil {
  681. input = &DeleteBucketWebsiteInput{}
  682. }
  683. req = c.newRequest(op, input, output)
  684. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  685. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  686. output = &DeleteBucketWebsiteOutput{}
  687. req.Data = output
  688. return
  689. }
  690. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  691. //
  692. // This operation removes the website configuration from the bucket.
  693. //
  694. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  695. // with awserr.Error's Code and Message methods to get detailed information about
  696. // the error.
  697. //
  698. // See the AWS API reference guide for Amazon Simple Storage Service's
  699. // API operation DeleteBucketWebsite for usage and error information.
  700. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  701. req, out := c.DeleteBucketWebsiteRequest(input)
  702. err := req.Send()
  703. return out, err
  704. }
  705. const opDeleteObject = "DeleteObject"
  706. // DeleteObjectRequest generates a "aws/request.Request" representing the
  707. // client's request for the DeleteObject operation. The "output" return
  708. // value can be used to capture response data after the request's "Send" method
  709. // is called.
  710. //
  711. // See DeleteObject for usage and error information.
  712. //
  713. // Creating a request object using this method should be used when you want to inject
  714. // custom logic into the request's lifecycle using a custom handler, or if you want to
  715. // access properties on the request object before or after sending the request. If
  716. // you just want the service response, call the DeleteObject method directly
  717. // instead.
  718. //
  719. // Note: You must call the "Send" method on the returned request object in order
  720. // to execute the request.
  721. //
  722. // // Example sending a request using the DeleteObjectRequest method.
  723. // req, resp := client.DeleteObjectRequest(params)
  724. //
  725. // err := req.Send()
  726. // if err == nil { // resp is now filled
  727. // fmt.Println(resp)
  728. // }
  729. //
  730. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  731. op := &request.Operation{
  732. Name: opDeleteObject,
  733. HTTPMethod: "DELETE",
  734. HTTPPath: "/{Bucket}/{Key+}",
  735. }
  736. if input == nil {
  737. input = &DeleteObjectInput{}
  738. }
  739. req = c.newRequest(op, input, output)
  740. output = &DeleteObjectOutput{}
  741. req.Data = output
  742. return
  743. }
  744. // DeleteObject API operation for Amazon Simple Storage Service.
  745. //
  746. // Removes the null version (if there is one) of an object and inserts a delete
  747. // marker, which becomes the latest version of the object. If there isn't a
  748. // null version, Amazon S3 does not remove any objects.
  749. //
  750. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  751. // with awserr.Error's Code and Message methods to get detailed information about
  752. // the error.
  753. //
  754. // See the AWS API reference guide for Amazon Simple Storage Service's
  755. // API operation DeleteObject for usage and error information.
  756. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  757. req, out := c.DeleteObjectRequest(input)
  758. err := req.Send()
  759. return out, err
  760. }
  761. const opDeleteObjects = "DeleteObjects"
  762. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  763. // client's request for the DeleteObjects operation. The "output" return
  764. // value can be used to capture response data after the request's "Send" method
  765. // is called.
  766. //
  767. // See DeleteObjects for usage and error information.
  768. //
  769. // Creating a request object using this method should be used when you want to inject
  770. // custom logic into the request's lifecycle using a custom handler, or if you want to
  771. // access properties on the request object before or after sending the request. If
  772. // you just want the service response, call the DeleteObjects method directly
  773. // instead.
  774. //
  775. // Note: You must call the "Send" method on the returned request object in order
  776. // to execute the request.
  777. //
  778. // // Example sending a request using the DeleteObjectsRequest method.
  779. // req, resp := client.DeleteObjectsRequest(params)
  780. //
  781. // err := req.Send()
  782. // if err == nil { // resp is now filled
  783. // fmt.Println(resp)
  784. // }
  785. //
  786. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  787. op := &request.Operation{
  788. Name: opDeleteObjects,
  789. HTTPMethod: "POST",
  790. HTTPPath: "/{Bucket}?delete",
  791. }
  792. if input == nil {
  793. input = &DeleteObjectsInput{}
  794. }
  795. req = c.newRequest(op, input, output)
  796. output = &DeleteObjectsOutput{}
  797. req.Data = output
  798. return
  799. }
  800. // DeleteObjects API operation for Amazon Simple Storage Service.
  801. //
  802. // This operation enables you to delete multiple objects from a bucket using
  803. // a single HTTP request. You may specify up to 1000 keys.
  804. //
  805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  806. // with awserr.Error's Code and Message methods to get detailed information about
  807. // the error.
  808. //
  809. // See the AWS API reference guide for Amazon Simple Storage Service's
  810. // API operation DeleteObjects for usage and error information.
  811. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  812. req, out := c.DeleteObjectsRequest(input)
  813. err := req.Send()
  814. return out, err
  815. }
  816. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  817. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  818. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  819. // value can be used to capture response data after the request's "Send" method
  820. // is called.
  821. //
  822. // See GetBucketAccelerateConfiguration for usage and error information.
  823. //
  824. // Creating a request object using this method should be used when you want to inject
  825. // custom logic into the request's lifecycle using a custom handler, or if you want to
  826. // access properties on the request object before or after sending the request. If
  827. // you just want the service response, call the GetBucketAccelerateConfiguration method directly
  828. // instead.
  829. //
  830. // Note: You must call the "Send" method on the returned request object in order
  831. // to execute the request.
  832. //
  833. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  834. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  835. //
  836. // err := req.Send()
  837. // if err == nil { // resp is now filled
  838. // fmt.Println(resp)
  839. // }
  840. //
  841. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  842. op := &request.Operation{
  843. Name: opGetBucketAccelerateConfiguration,
  844. HTTPMethod: "GET",
  845. HTTPPath: "/{Bucket}?accelerate",
  846. }
  847. if input == nil {
  848. input = &GetBucketAccelerateConfigurationInput{}
  849. }
  850. req = c.newRequest(op, input, output)
  851. output = &GetBucketAccelerateConfigurationOutput{}
  852. req.Data = output
  853. return
  854. }
  855. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  856. //
  857. // Returns the accelerate configuration of a bucket.
  858. //
  859. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  860. // with awserr.Error's Code and Message methods to get detailed information about
  861. // the error.
  862. //
  863. // See the AWS API reference guide for Amazon Simple Storage Service's
  864. // API operation GetBucketAccelerateConfiguration for usage and error information.
  865. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  866. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  867. err := req.Send()
  868. return out, err
  869. }
  870. const opGetBucketAcl = "GetBucketAcl"
  871. // GetBucketAclRequest generates a "aws/request.Request" representing the
  872. // client's request for the GetBucketAcl operation. The "output" return
  873. // value can be used to capture response data after the request's "Send" method
  874. // is called.
  875. //
  876. // See GetBucketAcl for usage and error information.
  877. //
  878. // Creating a request object using this method should be used when you want to inject
  879. // custom logic into the request's lifecycle using a custom handler, or if you want to
  880. // access properties on the request object before or after sending the request. If
  881. // you just want the service response, call the GetBucketAcl method directly
  882. // instead.
  883. //
  884. // Note: You must call the "Send" method on the returned request object in order
  885. // to execute the request.
  886. //
  887. // // Example sending a request using the GetBucketAclRequest method.
  888. // req, resp := client.GetBucketAclRequest(params)
  889. //
  890. // err := req.Send()
  891. // if err == nil { // resp is now filled
  892. // fmt.Println(resp)
  893. // }
  894. //
  895. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  896. op := &request.Operation{
  897. Name: opGetBucketAcl,
  898. HTTPMethod: "GET",
  899. HTTPPath: "/{Bucket}?acl",
  900. }
  901. if input == nil {
  902. input = &GetBucketAclInput{}
  903. }
  904. req = c.newRequest(op, input, output)
  905. output = &GetBucketAclOutput{}
  906. req.Data = output
  907. return
  908. }
  909. // GetBucketAcl API operation for Amazon Simple Storage Service.
  910. //
  911. // Gets the access control policy for the bucket.
  912. //
  913. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  914. // with awserr.Error's Code and Message methods to get detailed information about
  915. // the error.
  916. //
  917. // See the AWS API reference guide for Amazon Simple Storage Service's
  918. // API operation GetBucketAcl for usage and error information.
  919. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  920. req, out := c.GetBucketAclRequest(input)
  921. err := req.Send()
  922. return out, err
  923. }
  924. const opGetBucketCors = "GetBucketCors"
  925. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  926. // client's request for the GetBucketCors operation. The "output" return
  927. // value can be used to capture response data after the request's "Send" method
  928. // is called.
  929. //
  930. // See GetBucketCors for usage and error information.
  931. //
  932. // Creating a request object using this method should be used when you want to inject
  933. // custom logic into the request's lifecycle using a custom handler, or if you want to
  934. // access properties on the request object before or after sending the request. If
  935. // you just want the service response, call the GetBucketCors method directly
  936. // instead.
  937. //
  938. // Note: You must call the "Send" method on the returned request object in order
  939. // to execute the request.
  940. //
  941. // // Example sending a request using the GetBucketCorsRequest method.
  942. // req, resp := client.GetBucketCorsRequest(params)
  943. //
  944. // err := req.Send()
  945. // if err == nil { // resp is now filled
  946. // fmt.Println(resp)
  947. // }
  948. //
  949. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  950. op := &request.Operation{
  951. Name: opGetBucketCors,
  952. HTTPMethod: "GET",
  953. HTTPPath: "/{Bucket}?cors",
  954. }
  955. if input == nil {
  956. input = &GetBucketCorsInput{}
  957. }
  958. req = c.newRequest(op, input, output)
  959. output = &GetBucketCorsOutput{}
  960. req.Data = output
  961. return
  962. }
  963. // GetBucketCors API operation for Amazon Simple Storage Service.
  964. //
  965. // Returns the cors configuration for the bucket.
  966. //
  967. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  968. // with awserr.Error's Code and Message methods to get detailed information about
  969. // the error.
  970. //
  971. // See the AWS API reference guide for Amazon Simple Storage Service's
  972. // API operation GetBucketCors for usage and error information.
  973. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  974. req, out := c.GetBucketCorsRequest(input)
  975. err := req.Send()
  976. return out, err
  977. }
  978. const opGetBucketLifecycle = "GetBucketLifecycle"
  979. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  980. // client's request for the GetBucketLifecycle operation. The "output" return
  981. // value can be used to capture response data after the request's "Send" method
  982. // is called.
  983. //
  984. // See GetBucketLifecycle for usage and error information.
  985. //
  986. // Creating a request object using this method should be used when you want to inject
  987. // custom logic into the request's lifecycle using a custom handler, or if you want to
  988. // access properties on the request object before or after sending the request. If
  989. // you just want the service response, call the GetBucketLifecycle method directly
  990. // instead.
  991. //
  992. // Note: You must call the "Send" method on the returned request object in order
  993. // to execute the request.
  994. //
  995. // // Example sending a request using the GetBucketLifecycleRequest method.
  996. // req, resp := client.GetBucketLifecycleRequest(params)
  997. //
  998. // err := req.Send()
  999. // if err == nil { // resp is now filled
  1000. // fmt.Println(resp)
  1001. // }
  1002. //
  1003. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1004. if c.Client.Config.Logger != nil {
  1005. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1006. }
  1007. op := &request.Operation{
  1008. Name: opGetBucketLifecycle,
  1009. HTTPMethod: "GET",
  1010. HTTPPath: "/{Bucket}?lifecycle",
  1011. }
  1012. if input == nil {
  1013. input = &GetBucketLifecycleInput{}
  1014. }
  1015. req = c.newRequest(op, input, output)
  1016. output = &GetBucketLifecycleOutput{}
  1017. req.Data = output
  1018. return
  1019. }
  1020. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1021. //
  1022. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1023. //
  1024. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1025. // with awserr.Error's Code and Message methods to get detailed information about
  1026. // the error.
  1027. //
  1028. // See the AWS API reference guide for Amazon Simple Storage Service's
  1029. // API operation GetBucketLifecycle for usage and error information.
  1030. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1031. req, out := c.GetBucketLifecycleRequest(input)
  1032. err := req.Send()
  1033. return out, err
  1034. }
  1035. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1036. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1037. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1038. // value can be used to capture response data after the request's "Send" method
  1039. // is called.
  1040. //
  1041. // See GetBucketLifecycleConfiguration for usage and error information.
  1042. //
  1043. // Creating a request object using this method should be used when you want to inject
  1044. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1045. // access properties on the request object before or after sending the request. If
  1046. // you just want the service response, call the GetBucketLifecycleConfiguration method directly
  1047. // instead.
  1048. //
  1049. // Note: You must call the "Send" method on the returned request object in order
  1050. // to execute the request.
  1051. //
  1052. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1053. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1054. //
  1055. // err := req.Send()
  1056. // if err == nil { // resp is now filled
  1057. // fmt.Println(resp)
  1058. // }
  1059. //
  1060. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1061. op := &request.Operation{
  1062. Name: opGetBucketLifecycleConfiguration,
  1063. HTTPMethod: "GET",
  1064. HTTPPath: "/{Bucket}?lifecycle",
  1065. }
  1066. if input == nil {
  1067. input = &GetBucketLifecycleConfigurationInput{}
  1068. }
  1069. req = c.newRequest(op, input, output)
  1070. output = &GetBucketLifecycleConfigurationOutput{}
  1071. req.Data = output
  1072. return
  1073. }
  1074. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1075. //
  1076. // Returns the lifecycle configuration information set on the bucket.
  1077. //
  1078. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1079. // with awserr.Error's Code and Message methods to get detailed information about
  1080. // the error.
  1081. //
  1082. // See the AWS API reference guide for Amazon Simple Storage Service's
  1083. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1084. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1085. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1086. err := req.Send()
  1087. return out, err
  1088. }
  1089. const opGetBucketLocation = "GetBucketLocation"
  1090. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1091. // client's request for the GetBucketLocation operation. The "output" return
  1092. // value can be used to capture response data after the request's "Send" method
  1093. // is called.
  1094. //
  1095. // See GetBucketLocation for usage and error information.
  1096. //
  1097. // Creating a request object using this method should be used when you want to inject
  1098. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1099. // access properties on the request object before or after sending the request. If
  1100. // you just want the service response, call the GetBucketLocation method directly
  1101. // instead.
  1102. //
  1103. // Note: You must call the "Send" method on the returned request object in order
  1104. // to execute the request.
  1105. //
  1106. // // Example sending a request using the GetBucketLocationRequest method.
  1107. // req, resp := client.GetBucketLocationRequest(params)
  1108. //
  1109. // err := req.Send()
  1110. // if err == nil { // resp is now filled
  1111. // fmt.Println(resp)
  1112. // }
  1113. //
  1114. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1115. op := &request.Operation{
  1116. Name: opGetBucketLocation,
  1117. HTTPMethod: "GET",
  1118. HTTPPath: "/{Bucket}?location",
  1119. }
  1120. if input == nil {
  1121. input = &GetBucketLocationInput{}
  1122. }
  1123. req = c.newRequest(op, input, output)
  1124. output = &GetBucketLocationOutput{}
  1125. req.Data = output
  1126. return
  1127. }
  1128. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1129. //
  1130. // Returns the region the bucket resides in.
  1131. //
  1132. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1133. // with awserr.Error's Code and Message methods to get detailed information about
  1134. // the error.
  1135. //
  1136. // See the AWS API reference guide for Amazon Simple Storage Service's
  1137. // API operation GetBucketLocation for usage and error information.
  1138. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1139. req, out := c.GetBucketLocationRequest(input)
  1140. err := req.Send()
  1141. return out, err
  1142. }
  1143. const opGetBucketLogging = "GetBucketLogging"
  1144. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1145. // client's request for the GetBucketLogging operation. The "output" return
  1146. // value can be used to capture response data after the request's "Send" method
  1147. // is called.
  1148. //
  1149. // See GetBucketLogging for usage and error information.
  1150. //
  1151. // Creating a request object using this method should be used when you want to inject
  1152. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1153. // access properties on the request object before or after sending the request. If
  1154. // you just want the service response, call the GetBucketLogging method directly
  1155. // instead.
  1156. //
  1157. // Note: You must call the "Send" method on the returned request object in order
  1158. // to execute the request.
  1159. //
  1160. // // Example sending a request using the GetBucketLoggingRequest method.
  1161. // req, resp := client.GetBucketLoggingRequest(params)
  1162. //
  1163. // err := req.Send()
  1164. // if err == nil { // resp is now filled
  1165. // fmt.Println(resp)
  1166. // }
  1167. //
  1168. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  1169. op := &request.Operation{
  1170. Name: opGetBucketLogging,
  1171. HTTPMethod: "GET",
  1172. HTTPPath: "/{Bucket}?logging",
  1173. }
  1174. if input == nil {
  1175. input = &GetBucketLoggingInput{}
  1176. }
  1177. req = c.newRequest(op, input, output)
  1178. output = &GetBucketLoggingOutput{}
  1179. req.Data = output
  1180. return
  1181. }
  1182. // GetBucketLogging API operation for Amazon Simple Storage Service.
  1183. //
  1184. // Returns the logging status of a bucket and the permissions users have to
  1185. // view and modify that status. To use GET, you must be the bucket owner.
  1186. //
  1187. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1188. // with awserr.Error's Code and Message methods to get detailed information about
  1189. // the error.
  1190. //
  1191. // See the AWS API reference guide for Amazon Simple Storage Service's
  1192. // API operation GetBucketLogging for usage and error information.
  1193. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  1194. req, out := c.GetBucketLoggingRequest(input)
  1195. err := req.Send()
  1196. return out, err
  1197. }
  1198. const opGetBucketNotification = "GetBucketNotification"
  1199. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  1200. // client's request for the GetBucketNotification operation. The "output" return
  1201. // value can be used to capture response data after the request's "Send" method
  1202. // is called.
  1203. //
  1204. // See GetBucketNotification for usage and error information.
  1205. //
  1206. // Creating a request object using this method should be used when you want to inject
  1207. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1208. // access properties on the request object before or after sending the request. If
  1209. // you just want the service response, call the GetBucketNotification method directly
  1210. // instead.
  1211. //
  1212. // Note: You must call the "Send" method on the returned request object in order
  1213. // to execute the request.
  1214. //
  1215. // // Example sending a request using the GetBucketNotificationRequest method.
  1216. // req, resp := client.GetBucketNotificationRequest(params)
  1217. //
  1218. // err := req.Send()
  1219. // if err == nil { // resp is now filled
  1220. // fmt.Println(resp)
  1221. // }
  1222. //
  1223. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  1224. if c.Client.Config.Logger != nil {
  1225. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  1226. }
  1227. op := &request.Operation{
  1228. Name: opGetBucketNotification,
  1229. HTTPMethod: "GET",
  1230. HTTPPath: "/{Bucket}?notification",
  1231. }
  1232. if input == nil {
  1233. input = &GetBucketNotificationConfigurationRequest{}
  1234. }
  1235. req = c.newRequest(op, input, output)
  1236. output = &NotificationConfigurationDeprecated{}
  1237. req.Data = output
  1238. return
  1239. }
  1240. // GetBucketNotification API operation for Amazon Simple Storage Service.
  1241. //
  1242. // Deprecated, see the GetBucketNotificationConfiguration operation.
  1243. //
  1244. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1245. // with awserr.Error's Code and Message methods to get detailed information about
  1246. // the error.
  1247. //
  1248. // See the AWS API reference guide for Amazon Simple Storage Service's
  1249. // API operation GetBucketNotification for usage and error information.
  1250. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  1251. req, out := c.GetBucketNotificationRequest(input)
  1252. err := req.Send()
  1253. return out, err
  1254. }
  1255. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  1256. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  1257. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  1258. // value can be used to capture response data after the request's "Send" method
  1259. // is called.
  1260. //
  1261. // See GetBucketNotificationConfiguration for usage and error information.
  1262. //
  1263. // Creating a request object using this method should be used when you want to inject
  1264. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1265. // access properties on the request object before or after sending the request. If
  1266. // you just want the service response, call the GetBucketNotificationConfiguration method directly
  1267. // instead.
  1268. //
  1269. // Note: You must call the "Send" method on the returned request object in order
  1270. // to execute the request.
  1271. //
  1272. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  1273. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  1274. //
  1275. // err := req.Send()
  1276. // if err == nil { // resp is now filled
  1277. // fmt.Println(resp)
  1278. // }
  1279. //
  1280. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  1281. op := &request.Operation{
  1282. Name: opGetBucketNotificationConfiguration,
  1283. HTTPMethod: "GET",
  1284. HTTPPath: "/{Bucket}?notification",
  1285. }
  1286. if input == nil {
  1287. input = &GetBucketNotificationConfigurationRequest{}
  1288. }
  1289. req = c.newRequest(op, input, output)
  1290. output = &NotificationConfiguration{}
  1291. req.Data = output
  1292. return
  1293. }
  1294. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  1295. //
  1296. // Returns the notification configuration of a bucket.
  1297. //
  1298. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1299. // with awserr.Error's Code and Message methods to get detailed information about
  1300. // the error.
  1301. //
  1302. // See the AWS API reference guide for Amazon Simple Storage Service's
  1303. // API operation GetBucketNotificationConfiguration for usage and error information.
  1304. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  1305. req, out := c.GetBucketNotificationConfigurationRequest(input)
  1306. err := req.Send()
  1307. return out, err
  1308. }
  1309. const opGetBucketPolicy = "GetBucketPolicy"
  1310. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  1311. // client's request for the GetBucketPolicy operation. The "output" return
  1312. // value can be used to capture response data after the request's "Send" method
  1313. // is called.
  1314. //
  1315. // See GetBucketPolicy for usage and error information.
  1316. //
  1317. // Creating a request object using this method should be used when you want to inject
  1318. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1319. // access properties on the request object before or after sending the request. If
  1320. // you just want the service response, call the GetBucketPolicy method directly
  1321. // instead.
  1322. //
  1323. // Note: You must call the "Send" method on the returned request object in order
  1324. // to execute the request.
  1325. //
  1326. // // Example sending a request using the GetBucketPolicyRequest method.
  1327. // req, resp := client.GetBucketPolicyRequest(params)
  1328. //
  1329. // err := req.Send()
  1330. // if err == nil { // resp is now filled
  1331. // fmt.Println(resp)
  1332. // }
  1333. //
  1334. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  1335. op := &request.Operation{
  1336. Name: opGetBucketPolicy,
  1337. HTTPMethod: "GET",
  1338. HTTPPath: "/{Bucket}?policy",
  1339. }
  1340. if input == nil {
  1341. input = &GetBucketPolicyInput{}
  1342. }
  1343. req = c.newRequest(op, input, output)
  1344. output = &GetBucketPolicyOutput{}
  1345. req.Data = output
  1346. return
  1347. }
  1348. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  1349. //
  1350. // Returns the policy of a specified bucket.
  1351. //
  1352. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1353. // with awserr.Error's Code and Message methods to get detailed information about
  1354. // the error.
  1355. //
  1356. // See the AWS API reference guide for Amazon Simple Storage Service's
  1357. // API operation GetBucketPolicy for usage and error information.
  1358. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  1359. req, out := c.GetBucketPolicyRequest(input)
  1360. err := req.Send()
  1361. return out, err
  1362. }
  1363. const opGetBucketReplication = "GetBucketReplication"
  1364. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  1365. // client's request for the GetBucketReplication operation. The "output" return
  1366. // value can be used to capture response data after the request's "Send" method
  1367. // is called.
  1368. //
  1369. // See GetBucketReplication for usage and error information.
  1370. //
  1371. // Creating a request object using this method should be used when you want to inject
  1372. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1373. // access properties on the request object before or after sending the request. If
  1374. // you just want the service response, call the GetBucketReplication method directly
  1375. // instead.
  1376. //
  1377. // Note: You must call the "Send" method on the returned request object in order
  1378. // to execute the request.
  1379. //
  1380. // // Example sending a request using the GetBucketReplicationRequest method.
  1381. // req, resp := client.GetBucketReplicationRequest(params)
  1382. //
  1383. // err := req.Send()
  1384. // if err == nil { // resp is now filled
  1385. // fmt.Println(resp)
  1386. // }
  1387. //
  1388. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  1389. op := &request.Operation{
  1390. Name: opGetBucketReplication,
  1391. HTTPMethod: "GET",
  1392. HTTPPath: "/{Bucket}?replication",
  1393. }
  1394. if input == nil {
  1395. input = &GetBucketReplicationInput{}
  1396. }
  1397. req = c.newRequest(op, input, output)
  1398. output = &GetBucketReplicationOutput{}
  1399. req.Data = output
  1400. return
  1401. }
  1402. // GetBucketReplication API operation for Amazon Simple Storage Service.
  1403. //
  1404. // Returns the replication configuration of a bucket.
  1405. //
  1406. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1407. // with awserr.Error's Code and Message methods to get detailed information about
  1408. // the error.
  1409. //
  1410. // See the AWS API reference guide for Amazon Simple Storage Service's
  1411. // API operation GetBucketReplication for usage and error information.
  1412. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  1413. req, out := c.GetBucketReplicationRequest(input)
  1414. err := req.Send()
  1415. return out, err
  1416. }
  1417. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  1418. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  1419. // client's request for the GetBucketRequestPayment operation. The "output" return
  1420. // value can be used to capture response data after the request's "Send" method
  1421. // is called.
  1422. //
  1423. // See GetBucketRequestPayment for usage and error information.
  1424. //
  1425. // Creating a request object using this method should be used when you want to inject
  1426. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1427. // access properties on the request object before or after sending the request. If
  1428. // you just want the service response, call the GetBucketRequestPayment method directly
  1429. // instead.
  1430. //
  1431. // Note: You must call the "Send" method on the returned request object in order
  1432. // to execute the request.
  1433. //
  1434. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  1435. // req, resp := client.GetBucketRequestPaymentRequest(params)
  1436. //
  1437. // err := req.Send()
  1438. // if err == nil { // resp is now filled
  1439. // fmt.Println(resp)
  1440. // }
  1441. //
  1442. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  1443. op := &request.Operation{
  1444. Name: opGetBucketRequestPayment,
  1445. HTTPMethod: "GET",
  1446. HTTPPath: "/{Bucket}?requestPayment",
  1447. }
  1448. if input == nil {
  1449. input = &GetBucketRequestPaymentInput{}
  1450. }
  1451. req = c.newRequest(op, input, output)
  1452. output = &GetBucketRequestPaymentOutput{}
  1453. req.Data = output
  1454. return
  1455. }
  1456. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  1457. //
  1458. // Returns the request payment configuration of a bucket.
  1459. //
  1460. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1461. // with awserr.Error's Code and Message methods to get detailed information about
  1462. // the error.
  1463. //
  1464. // See the AWS API reference guide for Amazon Simple Storage Service's
  1465. // API operation GetBucketRequestPayment for usage and error information.
  1466. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  1467. req, out := c.GetBucketRequestPaymentRequest(input)
  1468. err := req.Send()
  1469. return out, err
  1470. }
  1471. const opGetBucketTagging = "GetBucketTagging"
  1472. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  1473. // client's request for the GetBucketTagging operation. The "output" return
  1474. // value can be used to capture response data after the request's "Send" method
  1475. // is called.
  1476. //
  1477. // See GetBucketTagging for usage and error information.
  1478. //
  1479. // Creating a request object using this method should be used when you want to inject
  1480. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1481. // access properties on the request object before or after sending the request. If
  1482. // you just want the service response, call the GetBucketTagging method directly
  1483. // instead.
  1484. //
  1485. // Note: You must call the "Send" method on the returned request object in order
  1486. // to execute the request.
  1487. //
  1488. // // Example sending a request using the GetBucketTaggingRequest method.
  1489. // req, resp := client.GetBucketTaggingRequest(params)
  1490. //
  1491. // err := req.Send()
  1492. // if err == nil { // resp is now filled
  1493. // fmt.Println(resp)
  1494. // }
  1495. //
  1496. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  1497. op := &request.Operation{
  1498. Name: opGetBucketTagging,
  1499. HTTPMethod: "GET",
  1500. HTTPPath: "/{Bucket}?tagging",
  1501. }
  1502. if input == nil {
  1503. input = &GetBucketTaggingInput{}
  1504. }
  1505. req = c.newRequest(op, input, output)
  1506. output = &GetBucketTaggingOutput{}
  1507. req.Data = output
  1508. return
  1509. }
  1510. // GetBucketTagging API operation for Amazon Simple Storage Service.
  1511. //
  1512. // Returns the tag set associated with the bucket.
  1513. //
  1514. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1515. // with awserr.Error's Code and Message methods to get detailed information about
  1516. // the error.
  1517. //
  1518. // See the AWS API reference guide for Amazon Simple Storage Service's
  1519. // API operation GetBucketTagging for usage and error information.
  1520. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  1521. req, out := c.GetBucketTaggingRequest(input)
  1522. err := req.Send()
  1523. return out, err
  1524. }
  1525. const opGetBucketVersioning = "GetBucketVersioning"
  1526. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  1527. // client's request for the GetBucketVersioning operation. The "output" return
  1528. // value can be used to capture response data after the request's "Send" method
  1529. // is called.
  1530. //
  1531. // See GetBucketVersioning for usage and error information.
  1532. //
  1533. // Creating a request object using this method should be used when you want to inject
  1534. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1535. // access properties on the request object before or after sending the request. If
  1536. // you just want the service response, call the GetBucketVersioning method directly
  1537. // instead.
  1538. //
  1539. // Note: You must call the "Send" method on the returned request object in order
  1540. // to execute the request.
  1541. //
  1542. // // Example sending a request using the GetBucketVersioningRequest method.
  1543. // req, resp := client.GetBucketVersioningRequest(params)
  1544. //
  1545. // err := req.Send()
  1546. // if err == nil { // resp is now filled
  1547. // fmt.Println(resp)
  1548. // }
  1549. //
  1550. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  1551. op := &request.Operation{
  1552. Name: opGetBucketVersioning,
  1553. HTTPMethod: "GET",
  1554. HTTPPath: "/{Bucket}?versioning",
  1555. }
  1556. if input == nil {
  1557. input = &GetBucketVersioningInput{}
  1558. }
  1559. req = c.newRequest(op, input, output)
  1560. output = &GetBucketVersioningOutput{}
  1561. req.Data = output
  1562. return
  1563. }
  1564. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  1565. //
  1566. // Returns the versioning state of a bucket.
  1567. //
  1568. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1569. // with awserr.Error's Code and Message methods to get detailed information about
  1570. // the error.
  1571. //
  1572. // See the AWS API reference guide for Amazon Simple Storage Service's
  1573. // API operation GetBucketVersioning for usage and error information.
  1574. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  1575. req, out := c.GetBucketVersioningRequest(input)
  1576. err := req.Send()
  1577. return out, err
  1578. }
  1579. const opGetBucketWebsite = "GetBucketWebsite"
  1580. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  1581. // client's request for the GetBucketWebsite operation. The "output" return
  1582. // value can be used to capture response data after the request's "Send" method
  1583. // is called.
  1584. //
  1585. // See GetBucketWebsite for usage and error information.
  1586. //
  1587. // Creating a request object using this method should be used when you want to inject
  1588. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1589. // access properties on the request object before or after sending the request. If
  1590. // you just want the service response, call the GetBucketWebsite method directly
  1591. // instead.
  1592. //
  1593. // Note: You must call the "Send" method on the returned request object in order
  1594. // to execute the request.
  1595. //
  1596. // // Example sending a request using the GetBucketWebsiteRequest method.
  1597. // req, resp := client.GetBucketWebsiteRequest(params)
  1598. //
  1599. // err := req.Send()
  1600. // if err == nil { // resp is now filled
  1601. // fmt.Println(resp)
  1602. // }
  1603. //
  1604. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  1605. op := &request.Operation{
  1606. Name: opGetBucketWebsite,
  1607. HTTPMethod: "GET",
  1608. HTTPPath: "/{Bucket}?website",
  1609. }
  1610. if input == nil {
  1611. input = &GetBucketWebsiteInput{}
  1612. }
  1613. req = c.newRequest(op, input, output)
  1614. output = &GetBucketWebsiteOutput{}
  1615. req.Data = output
  1616. return
  1617. }
  1618. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  1619. //
  1620. // Returns the website configuration for a bucket.
  1621. //
  1622. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1623. // with awserr.Error's Code and Message methods to get detailed information about
  1624. // the error.
  1625. //
  1626. // See the AWS API reference guide for Amazon Simple Storage Service's
  1627. // API operation GetBucketWebsite for usage and error information.
  1628. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  1629. req, out := c.GetBucketWebsiteRequest(input)
  1630. err := req.Send()
  1631. return out, err
  1632. }
  1633. const opGetObject = "GetObject"
  1634. // GetObjectRequest generates a "aws/request.Request" representing the
  1635. // client's request for the GetObject operation. The "output" return
  1636. // value can be used to capture response data after the request's "Send" method
  1637. // is called.
  1638. //
  1639. // See GetObject for usage and error information.
  1640. //
  1641. // Creating a request object using this method should be used when you want to inject
  1642. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1643. // access properties on the request object before or after sending the request. If
  1644. // you just want the service response, call the GetObject method directly
  1645. // instead.
  1646. //
  1647. // Note: You must call the "Send" method on the returned request object in order
  1648. // to execute the request.
  1649. //
  1650. // // Example sending a request using the GetObjectRequest method.
  1651. // req, resp := client.GetObjectRequest(params)
  1652. //
  1653. // err := req.Send()
  1654. // if err == nil { // resp is now filled
  1655. // fmt.Println(resp)
  1656. // }
  1657. //
  1658. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  1659. op := &request.Operation{
  1660. Name: opGetObject,
  1661. HTTPMethod: "GET",
  1662. HTTPPath: "/{Bucket}/{Key+}",
  1663. }
  1664. if input == nil {
  1665. input = &GetObjectInput{}
  1666. }
  1667. req = c.newRequest(op, input, output)
  1668. output = &GetObjectOutput{}
  1669. req.Data = output
  1670. return
  1671. }
  1672. // GetObject API operation for Amazon Simple Storage Service.
  1673. //
  1674. // Retrieves objects from Amazon S3.
  1675. //
  1676. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1677. // with awserr.Error's Code and Message methods to get detailed information about
  1678. // the error.
  1679. //
  1680. // See the AWS API reference guide for Amazon Simple Storage Service's
  1681. // API operation GetObject for usage and error information.
  1682. //
  1683. // Returned Error Codes:
  1684. // * NoSuchKey
  1685. // The specified key does not exist.
  1686. //
  1687. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  1688. req, out := c.GetObjectRequest(input)
  1689. err := req.Send()
  1690. return out, err
  1691. }
  1692. const opGetObjectAcl = "GetObjectAcl"
  1693. // GetObjectAclRequest generates a "aws/request.Request" representing the
  1694. // client's request for the GetObjectAcl operation. The "output" return
  1695. // value can be used to capture response data after the request's "Send" method
  1696. // is called.
  1697. //
  1698. // See GetObjectAcl for usage and error information.
  1699. //
  1700. // Creating a request object using this method should be used when you want to inject
  1701. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1702. // access properties on the request object before or after sending the request. If
  1703. // you just want the service response, call the GetObjectAcl method directly
  1704. // instead.
  1705. //
  1706. // Note: You must call the "Send" method on the returned request object in order
  1707. // to execute the request.
  1708. //
  1709. // // Example sending a request using the GetObjectAclRequest method.
  1710. // req, resp := client.GetObjectAclRequest(params)
  1711. //
  1712. // err := req.Send()
  1713. // if err == nil { // resp is now filled
  1714. // fmt.Println(resp)
  1715. // }
  1716. //
  1717. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  1718. op := &request.Operation{
  1719. Name: opGetObjectAcl,
  1720. HTTPMethod: "GET",
  1721. HTTPPath: "/{Bucket}/{Key+}?acl",
  1722. }
  1723. if input == nil {
  1724. input = &GetObjectAclInput{}
  1725. }
  1726. req = c.newRequest(op, input, output)
  1727. output = &GetObjectAclOutput{}
  1728. req.Data = output
  1729. return
  1730. }
  1731. // GetObjectAcl API operation for Amazon Simple Storage Service.
  1732. //
  1733. // Returns the access control list (ACL) of an object.
  1734. //
  1735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1736. // with awserr.Error's Code and Message methods to get detailed information about
  1737. // the error.
  1738. //
  1739. // See the AWS API reference guide for Amazon Simple Storage Service's
  1740. // API operation GetObjectAcl for usage and error information.
  1741. //
  1742. // Returned Error Codes:
  1743. // * NoSuchKey
  1744. // The specified key does not exist.
  1745. //
  1746. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  1747. req, out := c.GetObjectAclRequest(input)
  1748. err := req.Send()
  1749. return out, err
  1750. }
  1751. const opGetObjectTorrent = "GetObjectTorrent"
  1752. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  1753. // client's request for the GetObjectTorrent operation. The "output" return
  1754. // value can be used to capture response data after the request's "Send" method
  1755. // is called.
  1756. //
  1757. // See GetObjectTorrent for usage and error information.
  1758. //
  1759. // Creating a request object using this method should be used when you want to inject
  1760. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1761. // access properties on the request object before or after sending the request. If
  1762. // you just want the service response, call the GetObjectTorrent method directly
  1763. // instead.
  1764. //
  1765. // Note: You must call the "Send" method on the returned request object in order
  1766. // to execute the request.
  1767. //
  1768. // // Example sending a request using the GetObjectTorrentRequest method.
  1769. // req, resp := client.GetObjectTorrentRequest(params)
  1770. //
  1771. // err := req.Send()
  1772. // if err == nil { // resp is now filled
  1773. // fmt.Println(resp)
  1774. // }
  1775. //
  1776. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  1777. op := &request.Operation{
  1778. Name: opGetObjectTorrent,
  1779. HTTPMethod: "GET",
  1780. HTTPPath: "/{Bucket}/{Key+}?torrent",
  1781. }
  1782. if input == nil {
  1783. input = &GetObjectTorrentInput{}
  1784. }
  1785. req = c.newRequest(op, input, output)
  1786. output = &GetObjectTorrentOutput{}
  1787. req.Data = output
  1788. return
  1789. }
  1790. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  1791. //
  1792. // Return torrent files from a bucket.
  1793. //
  1794. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1795. // with awserr.Error's Code and Message methods to get detailed information about
  1796. // the error.
  1797. //
  1798. // See the AWS API reference guide for Amazon Simple Storage Service's
  1799. // API operation GetObjectTorrent for usage and error information.
  1800. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  1801. req, out := c.GetObjectTorrentRequest(input)
  1802. err := req.Send()
  1803. return out, err
  1804. }
  1805. const opHeadBucket = "HeadBucket"
  1806. // HeadBucketRequest generates a "aws/request.Request" representing the
  1807. // client's request for the HeadBucket operation. The "output" return
  1808. // value can be used to capture response data after the request's "Send" method
  1809. // is called.
  1810. //
  1811. // See HeadBucket for usage and error information.
  1812. //
  1813. // Creating a request object using this method should be used when you want to inject
  1814. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1815. // access properties on the request object before or after sending the request. If
  1816. // you just want the service response, call the HeadBucket method directly
  1817. // instead.
  1818. //
  1819. // Note: You must call the "Send" method on the returned request object in order
  1820. // to execute the request.
  1821. //
  1822. // // Example sending a request using the HeadBucketRequest method.
  1823. // req, resp := client.HeadBucketRequest(params)
  1824. //
  1825. // err := req.Send()
  1826. // if err == nil { // resp is now filled
  1827. // fmt.Println(resp)
  1828. // }
  1829. //
  1830. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  1831. op := &request.Operation{
  1832. Name: opHeadBucket,
  1833. HTTPMethod: "HEAD",
  1834. HTTPPath: "/{Bucket}",
  1835. }
  1836. if input == nil {
  1837. input = &HeadBucketInput{}
  1838. }
  1839. req = c.newRequest(op, input, output)
  1840. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1841. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1842. output = &HeadBucketOutput{}
  1843. req.Data = output
  1844. return
  1845. }
  1846. // HeadBucket API operation for Amazon Simple Storage Service.
  1847. //
  1848. // This operation is useful to determine if a bucket exists and you have permission
  1849. // to access it.
  1850. //
  1851. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1852. // with awserr.Error's Code and Message methods to get detailed information about
  1853. // the error.
  1854. //
  1855. // See the AWS API reference guide for Amazon Simple Storage Service's
  1856. // API operation HeadBucket for usage and error information.
  1857. //
  1858. // Returned Error Codes:
  1859. // * NoSuchBucket
  1860. // The specified bucket does not exist.
  1861. //
  1862. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  1863. req, out := c.HeadBucketRequest(input)
  1864. err := req.Send()
  1865. return out, err
  1866. }
  1867. const opHeadObject = "HeadObject"
  1868. // HeadObjectRequest generates a "aws/request.Request" representing the
  1869. // client's request for the HeadObject operation. The "output" return
  1870. // value can be used to capture response data after the request's "Send" method
  1871. // is called.
  1872. //
  1873. // See HeadObject for usage and error information.
  1874. //
  1875. // Creating a request object using this method should be used when you want to inject
  1876. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1877. // access properties on the request object before or after sending the request. If
  1878. // you just want the service response, call the HeadObject method directly
  1879. // instead.
  1880. //
  1881. // Note: You must call the "Send" method on the returned request object in order
  1882. // to execute the request.
  1883. //
  1884. // // Example sending a request using the HeadObjectRequest method.
  1885. // req, resp := client.HeadObjectRequest(params)
  1886. //
  1887. // err := req.Send()
  1888. // if err == nil { // resp is now filled
  1889. // fmt.Println(resp)
  1890. // }
  1891. //
  1892. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  1893. op := &request.Operation{
  1894. Name: opHeadObject,
  1895. HTTPMethod: "HEAD",
  1896. HTTPPath: "/{Bucket}/{Key+}",
  1897. }
  1898. if input == nil {
  1899. input = &HeadObjectInput{}
  1900. }
  1901. req = c.newRequest(op, input, output)
  1902. output = &HeadObjectOutput{}
  1903. req.Data = output
  1904. return
  1905. }
  1906. // HeadObject API operation for Amazon Simple Storage Service.
  1907. //
  1908. // The HEAD operation retrieves metadata from an object without returning the
  1909. // object itself. This operation is useful if you're only interested in an object's
  1910. // metadata. To use HEAD, you must have READ access to the object.
  1911. //
  1912. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1913. // with awserr.Error's Code and Message methods to get detailed information about
  1914. // the error.
  1915. //
  1916. // See the AWS API reference guide for Amazon Simple Storage Service's
  1917. // API operation HeadObject for usage and error information.
  1918. //
  1919. // Returned Error Codes:
  1920. // * NoSuchKey
  1921. // The specified key does not exist.
  1922. //
  1923. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  1924. req, out := c.HeadObjectRequest(input)
  1925. err := req.Send()
  1926. return out, err
  1927. }
  1928. const opListBuckets = "ListBuckets"
  1929. // ListBucketsRequest generates a "aws/request.Request" representing the
  1930. // client's request for the ListBuckets operation. The "output" return
  1931. // value can be used to capture response data after the request's "Send" method
  1932. // is called.
  1933. //
  1934. // See ListBuckets for usage and error information.
  1935. //
  1936. // Creating a request object using this method should be used when you want to inject
  1937. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1938. // access properties on the request object before or after sending the request. If
  1939. // you just want the service response, call the ListBuckets method directly
  1940. // instead.
  1941. //
  1942. // Note: You must call the "Send" method on the returned request object in order
  1943. // to execute the request.
  1944. //
  1945. // // Example sending a request using the ListBucketsRequest method.
  1946. // req, resp := client.ListBucketsRequest(params)
  1947. //
  1948. // err := req.Send()
  1949. // if err == nil { // resp is now filled
  1950. // fmt.Println(resp)
  1951. // }
  1952. //
  1953. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  1954. op := &request.Operation{
  1955. Name: opListBuckets,
  1956. HTTPMethod: "GET",
  1957. HTTPPath: "/",
  1958. }
  1959. if input == nil {
  1960. input = &ListBucketsInput{}
  1961. }
  1962. req = c.newRequest(op, input, output)
  1963. output = &ListBucketsOutput{}
  1964. req.Data = output
  1965. return
  1966. }
  1967. // ListBuckets API operation for Amazon Simple Storage Service.
  1968. //
  1969. // Returns a list of all buckets owned by the authenticated sender of the request.
  1970. //
  1971. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1972. // with awserr.Error's Code and Message methods to get detailed information about
  1973. // the error.
  1974. //
  1975. // See the AWS API reference guide for Amazon Simple Storage Service's
  1976. // API operation ListBuckets for usage and error information.
  1977. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  1978. req, out := c.ListBucketsRequest(input)
  1979. err := req.Send()
  1980. return out, err
  1981. }
  1982. const opListMultipartUploads = "ListMultipartUploads"
  1983. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  1984. // client's request for the ListMultipartUploads operation. The "output" return
  1985. // value can be used to capture response data after the request's "Send" method
  1986. // is called.
  1987. //
  1988. // See ListMultipartUploads for usage and error information.
  1989. //
  1990. // Creating a request object using this method should be used when you want to inject
  1991. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1992. // access properties on the request object before or after sending the request. If
  1993. // you just want the service response, call the ListMultipartUploads method directly
  1994. // instead.
  1995. //
  1996. // Note: You must call the "Send" method on the returned request object in order
  1997. // to execute the request.
  1998. //
  1999. // // Example sending a request using the ListMultipartUploadsRequest method.
  2000. // req, resp := client.ListMultipartUploadsRequest(params)
  2001. //
  2002. // err := req.Send()
  2003. // if err == nil { // resp is now filled
  2004. // fmt.Println(resp)
  2005. // }
  2006. //
  2007. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  2008. op := &request.Operation{
  2009. Name: opListMultipartUploads,
  2010. HTTPMethod: "GET",
  2011. HTTPPath: "/{Bucket}?uploads",
  2012. Paginator: &request.Paginator{
  2013. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  2014. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  2015. LimitToken: "MaxUploads",
  2016. TruncationToken: "IsTruncated",
  2017. },
  2018. }
  2019. if input == nil {
  2020. input = &ListMultipartUploadsInput{}
  2021. }
  2022. req = c.newRequest(op, input, output)
  2023. output = &ListMultipartUploadsOutput{}
  2024. req.Data = output
  2025. return
  2026. }
  2027. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  2028. //
  2029. // This operation lists in-progress multipart uploads.
  2030. //
  2031. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2032. // with awserr.Error's Code and Message methods to get detailed information about
  2033. // the error.
  2034. //
  2035. // See the AWS API reference guide for Amazon Simple Storage Service's
  2036. // API operation ListMultipartUploads for usage and error information.
  2037. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  2038. req, out := c.ListMultipartUploadsRequest(input)
  2039. err := req.Send()
  2040. return out, err
  2041. }
  2042. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  2043. // calling the "fn" function with the response data for each page. To stop
  2044. // iterating, return false from the fn function.
  2045. //
  2046. // See ListMultipartUploads method for more information on how to use this operation.
  2047. //
  2048. // Note: This operation can generate multiple requests to a service.
  2049. //
  2050. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  2051. // pageNum := 0
  2052. // err := client.ListMultipartUploadsPages(params,
  2053. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  2054. // pageNum++
  2055. // fmt.Println(page)
  2056. // return pageNum <= 3
  2057. // })
  2058. //
  2059. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(p *ListMultipartUploadsOutput, lastPage bool) (shouldContinue bool)) error {
  2060. page, _ := c.ListMultipartUploadsRequest(input)
  2061. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2062. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2063. return fn(p.(*ListMultipartUploadsOutput), lastPage)
  2064. })
  2065. }
  2066. const opListObjectVersions = "ListObjectVersions"
  2067. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  2068. // client's request for the ListObjectVersions operation. The "output" return
  2069. // value can be used to capture response data after the request's "Send" method
  2070. // is called.
  2071. //
  2072. // See ListObjectVersions for usage and error information.
  2073. //
  2074. // Creating a request object using this method should be used when you want to inject
  2075. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2076. // access properties on the request object before or after sending the request. If
  2077. // you just want the service response, call the ListObjectVersions method directly
  2078. // instead.
  2079. //
  2080. // Note: You must call the "Send" method on the returned request object in order
  2081. // to execute the request.
  2082. //
  2083. // // Example sending a request using the ListObjectVersionsRequest method.
  2084. // req, resp := client.ListObjectVersionsRequest(params)
  2085. //
  2086. // err := req.Send()
  2087. // if err == nil { // resp is now filled
  2088. // fmt.Println(resp)
  2089. // }
  2090. //
  2091. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  2092. op := &request.Operation{
  2093. Name: opListObjectVersions,
  2094. HTTPMethod: "GET",
  2095. HTTPPath: "/{Bucket}?versions",
  2096. Paginator: &request.Paginator{
  2097. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  2098. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  2099. LimitToken: "MaxKeys",
  2100. TruncationToken: "IsTruncated",
  2101. },
  2102. }
  2103. if input == nil {
  2104. input = &ListObjectVersionsInput{}
  2105. }
  2106. req = c.newRequest(op, input, output)
  2107. output = &ListObjectVersionsOutput{}
  2108. req.Data = output
  2109. return
  2110. }
  2111. // ListObjectVersions API operation for Amazon Simple Storage Service.
  2112. //
  2113. // Returns metadata about all of the versions of objects in a bucket.
  2114. //
  2115. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2116. // with awserr.Error's Code and Message methods to get detailed information about
  2117. // the error.
  2118. //
  2119. // See the AWS API reference guide for Amazon Simple Storage Service's
  2120. // API operation ListObjectVersions for usage and error information.
  2121. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  2122. req, out := c.ListObjectVersionsRequest(input)
  2123. err := req.Send()
  2124. return out, err
  2125. }
  2126. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  2127. // calling the "fn" function with the response data for each page. To stop
  2128. // iterating, return false from the fn function.
  2129. //
  2130. // See ListObjectVersions method for more information on how to use this operation.
  2131. //
  2132. // Note: This operation can generate multiple requests to a service.
  2133. //
  2134. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  2135. // pageNum := 0
  2136. // err := client.ListObjectVersionsPages(params,
  2137. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  2138. // pageNum++
  2139. // fmt.Println(page)
  2140. // return pageNum <= 3
  2141. // })
  2142. //
  2143. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(p *ListObjectVersionsOutput, lastPage bool) (shouldContinue bool)) error {
  2144. page, _ := c.ListObjectVersionsRequest(input)
  2145. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2146. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2147. return fn(p.(*ListObjectVersionsOutput), lastPage)
  2148. })
  2149. }
  2150. const opListObjects = "ListObjects"
  2151. // ListObjectsRequest generates a "aws/request.Request" representing the
  2152. // client's request for the ListObjects operation. The "output" return
  2153. // value can be used to capture response data after the request's "Send" method
  2154. // is called.
  2155. //
  2156. // See ListObjects for usage and error information.
  2157. //
  2158. // Creating a request object using this method should be used when you want to inject
  2159. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2160. // access properties on the request object before or after sending the request. If
  2161. // you just want the service response, call the ListObjects method directly
  2162. // instead.
  2163. //
  2164. // Note: You must call the "Send" method on the returned request object in order
  2165. // to execute the request.
  2166. //
  2167. // // Example sending a request using the ListObjectsRequest method.
  2168. // req, resp := client.ListObjectsRequest(params)
  2169. //
  2170. // err := req.Send()
  2171. // if err == nil { // resp is now filled
  2172. // fmt.Println(resp)
  2173. // }
  2174. //
  2175. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  2176. op := &request.Operation{
  2177. Name: opListObjects,
  2178. HTTPMethod: "GET",
  2179. HTTPPath: "/{Bucket}",
  2180. Paginator: &request.Paginator{
  2181. InputTokens: []string{"Marker"},
  2182. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  2183. LimitToken: "MaxKeys",
  2184. TruncationToken: "IsTruncated",
  2185. },
  2186. }
  2187. if input == nil {
  2188. input = &ListObjectsInput{}
  2189. }
  2190. req = c.newRequest(op, input, output)
  2191. output = &ListObjectsOutput{}
  2192. req.Data = output
  2193. return
  2194. }
  2195. // ListObjects API operation for Amazon Simple Storage Service.
  2196. //
  2197. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  2198. // the request parameters as selection criteria to return a subset of the objects
  2199. // in a bucket.
  2200. //
  2201. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2202. // with awserr.Error's Code and Message methods to get detailed information about
  2203. // the error.
  2204. //
  2205. // See the AWS API reference guide for Amazon Simple Storage Service's
  2206. // API operation ListObjects for usage and error information.
  2207. //
  2208. // Returned Error Codes:
  2209. // * NoSuchBucket
  2210. // The specified bucket does not exist.
  2211. //
  2212. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  2213. req, out := c.ListObjectsRequest(input)
  2214. err := req.Send()
  2215. return out, err
  2216. }
  2217. // ListObjectsPages iterates over the pages of a ListObjects operation,
  2218. // calling the "fn" function with the response data for each page. To stop
  2219. // iterating, return false from the fn function.
  2220. //
  2221. // See ListObjects method for more information on how to use this operation.
  2222. //
  2223. // Note: This operation can generate multiple requests to a service.
  2224. //
  2225. // // Example iterating over at most 3 pages of a ListObjects operation.
  2226. // pageNum := 0
  2227. // err := client.ListObjectsPages(params,
  2228. // func(page *ListObjectsOutput, lastPage bool) bool {
  2229. // pageNum++
  2230. // fmt.Println(page)
  2231. // return pageNum <= 3
  2232. // })
  2233. //
  2234. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(p *ListObjectsOutput, lastPage bool) (shouldContinue bool)) error {
  2235. page, _ := c.ListObjectsRequest(input)
  2236. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2237. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2238. return fn(p.(*ListObjectsOutput), lastPage)
  2239. })
  2240. }
  2241. const opListObjectsV2 = "ListObjectsV2"
  2242. // ListObjectsV2Request generates a "aws/request.Request" representing the
  2243. // client's request for the ListObjectsV2 operation. The "output" return
  2244. // value can be used to capture response data after the request's "Send" method
  2245. // is called.
  2246. //
  2247. // See ListObjectsV2 for usage and error information.
  2248. //
  2249. // Creating a request object using this method should be used when you want to inject
  2250. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2251. // access properties on the request object before or after sending the request. If
  2252. // you just want the service response, call the ListObjectsV2 method directly
  2253. // instead.
  2254. //
  2255. // Note: You must call the "Send" method on the returned request object in order
  2256. // to execute the request.
  2257. //
  2258. // // Example sending a request using the ListObjectsV2Request method.
  2259. // req, resp := client.ListObjectsV2Request(params)
  2260. //
  2261. // err := req.Send()
  2262. // if err == nil { // resp is now filled
  2263. // fmt.Println(resp)
  2264. // }
  2265. //
  2266. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  2267. op := &request.Operation{
  2268. Name: opListObjectsV2,
  2269. HTTPMethod: "GET",
  2270. HTTPPath: "/{Bucket}?list-type=2",
  2271. Paginator: &request.Paginator{
  2272. InputTokens: []string{"ContinuationToken"},
  2273. OutputTokens: []string{"NextContinuationToken"},
  2274. LimitToken: "MaxKeys",
  2275. TruncationToken: "",
  2276. },
  2277. }
  2278. if input == nil {
  2279. input = &ListObjectsV2Input{}
  2280. }
  2281. req = c.newRequest(op, input, output)
  2282. output = &ListObjectsV2Output{}
  2283. req.Data = output
  2284. return
  2285. }
  2286. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  2287. //
  2288. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  2289. // the request parameters as selection criteria to return a subset of the objects
  2290. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  2291. // you use this revised API for new application development.
  2292. //
  2293. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2294. // with awserr.Error's Code and Message methods to get detailed information about
  2295. // the error.
  2296. //
  2297. // See the AWS API reference guide for Amazon Simple Storage Service's
  2298. // API operation ListObjectsV2 for usage and error information.
  2299. //
  2300. // Returned Error Codes:
  2301. // * NoSuchBucket
  2302. // The specified bucket does not exist.
  2303. //
  2304. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  2305. req, out := c.ListObjectsV2Request(input)
  2306. err := req.Send()
  2307. return out, err
  2308. }
  2309. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  2310. // calling the "fn" function with the response data for each page. To stop
  2311. // iterating, return false from the fn function.
  2312. //
  2313. // See ListObjectsV2 method for more information on how to use this operation.
  2314. //
  2315. // Note: This operation can generate multiple requests to a service.
  2316. //
  2317. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  2318. // pageNum := 0
  2319. // err := client.ListObjectsV2Pages(params,
  2320. // func(page *ListObjectsV2Output, lastPage bool) bool {
  2321. // pageNum++
  2322. // fmt.Println(page)
  2323. // return pageNum <= 3
  2324. // })
  2325. //
  2326. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(p *ListObjectsV2Output, lastPage bool) (shouldContinue bool)) error {
  2327. page, _ := c.ListObjectsV2Request(input)
  2328. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2329. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2330. return fn(p.(*ListObjectsV2Output), lastPage)
  2331. })
  2332. }
  2333. const opListParts = "ListParts"
  2334. // ListPartsRequest generates a "aws/request.Request" representing the
  2335. // client's request for the ListParts operation. The "output" return
  2336. // value can be used to capture response data after the request's "Send" method
  2337. // is called.
  2338. //
  2339. // See ListParts for usage and error information.
  2340. //
  2341. // Creating a request object using this method should be used when you want to inject
  2342. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2343. // access properties on the request object before or after sending the request. If
  2344. // you just want the service response, call the ListParts method directly
  2345. // instead.
  2346. //
  2347. // Note: You must call the "Send" method on the returned request object in order
  2348. // to execute the request.
  2349. //
  2350. // // Example sending a request using the ListPartsRequest method.
  2351. // req, resp := client.ListPartsRequest(params)
  2352. //
  2353. // err := req.Send()
  2354. // if err == nil { // resp is now filled
  2355. // fmt.Println(resp)
  2356. // }
  2357. //
  2358. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  2359. op := &request.Operation{
  2360. Name: opListParts,
  2361. HTTPMethod: "GET",
  2362. HTTPPath: "/{Bucket}/{Key+}",
  2363. Paginator: &request.Paginator{
  2364. InputTokens: []string{"PartNumberMarker"},
  2365. OutputTokens: []string{"NextPartNumberMarker"},
  2366. LimitToken: "MaxParts",
  2367. TruncationToken: "IsTruncated",
  2368. },
  2369. }
  2370. if input == nil {
  2371. input = &ListPartsInput{}
  2372. }
  2373. req = c.newRequest(op, input, output)
  2374. output = &ListPartsOutput{}
  2375. req.Data = output
  2376. return
  2377. }
  2378. // ListParts API operation for Amazon Simple Storage Service.
  2379. //
  2380. // Lists the parts that have been uploaded for a specific multipart upload.
  2381. //
  2382. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2383. // with awserr.Error's Code and Message methods to get detailed information about
  2384. // the error.
  2385. //
  2386. // See the AWS API reference guide for Amazon Simple Storage Service's
  2387. // API operation ListParts for usage and error information.
  2388. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  2389. req, out := c.ListPartsRequest(input)
  2390. err := req.Send()
  2391. return out, err
  2392. }
  2393. // ListPartsPages iterates over the pages of a ListParts operation,
  2394. // calling the "fn" function with the response data for each page. To stop
  2395. // iterating, return false from the fn function.
  2396. //
  2397. // See ListParts method for more information on how to use this operation.
  2398. //
  2399. // Note: This operation can generate multiple requests to a service.
  2400. //
  2401. // // Example iterating over at most 3 pages of a ListParts operation.
  2402. // pageNum := 0
  2403. // err := client.ListPartsPages(params,
  2404. // func(page *ListPartsOutput, lastPage bool) bool {
  2405. // pageNum++
  2406. // fmt.Println(page)
  2407. // return pageNum <= 3
  2408. // })
  2409. //
  2410. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(p *ListPartsOutput, lastPage bool) (shouldContinue bool)) error {
  2411. page, _ := c.ListPartsRequest(input)
  2412. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  2413. return page.EachPage(func(p interface{}, lastPage bool) bool {
  2414. return fn(p.(*ListPartsOutput), lastPage)
  2415. })
  2416. }
  2417. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  2418. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  2419. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  2420. // value can be used to capture response data after the request's "Send" method
  2421. // is called.
  2422. //
  2423. // See PutBucketAccelerateConfiguration for usage and error information.
  2424. //
  2425. // Creating a request object using this method should be used when you want to inject
  2426. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2427. // access properties on the request object before or after sending the request. If
  2428. // you just want the service response, call the PutBucketAccelerateConfiguration method directly
  2429. // instead.
  2430. //
  2431. // Note: You must call the "Send" method on the returned request object in order
  2432. // to execute the request.
  2433. //
  2434. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  2435. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  2436. //
  2437. // err := req.Send()
  2438. // if err == nil { // resp is now filled
  2439. // fmt.Println(resp)
  2440. // }
  2441. //
  2442. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  2443. op := &request.Operation{
  2444. Name: opPutBucketAccelerateConfiguration,
  2445. HTTPMethod: "PUT",
  2446. HTTPPath: "/{Bucket}?accelerate",
  2447. }
  2448. if input == nil {
  2449. input = &PutBucketAccelerateConfigurationInput{}
  2450. }
  2451. req = c.newRequest(op, input, output)
  2452. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2453. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2454. output = &PutBucketAccelerateConfigurationOutput{}
  2455. req.Data = output
  2456. return
  2457. }
  2458. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  2459. //
  2460. // Sets the accelerate configuration of an existing bucket.
  2461. //
  2462. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2463. // with awserr.Error's Code and Message methods to get detailed information about
  2464. // the error.
  2465. //
  2466. // See the AWS API reference guide for Amazon Simple Storage Service's
  2467. // API operation PutBucketAccelerateConfiguration for usage and error information.
  2468. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  2469. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  2470. err := req.Send()
  2471. return out, err
  2472. }
  2473. const opPutBucketAcl = "PutBucketAcl"
  2474. // PutBucketAclRequest generates a "aws/request.Request" representing the
  2475. // client's request for the PutBucketAcl operation. The "output" return
  2476. // value can be used to capture response data after the request's "Send" method
  2477. // is called.
  2478. //
  2479. // See PutBucketAcl for usage and error information.
  2480. //
  2481. // Creating a request object using this method should be used when you want to inject
  2482. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2483. // access properties on the request object before or after sending the request. If
  2484. // you just want the service response, call the PutBucketAcl method directly
  2485. // instead.
  2486. //
  2487. // Note: You must call the "Send" method on the returned request object in order
  2488. // to execute the request.
  2489. //
  2490. // // Example sending a request using the PutBucketAclRequest method.
  2491. // req, resp := client.PutBucketAclRequest(params)
  2492. //
  2493. // err := req.Send()
  2494. // if err == nil { // resp is now filled
  2495. // fmt.Println(resp)
  2496. // }
  2497. //
  2498. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  2499. op := &request.Operation{
  2500. Name: opPutBucketAcl,
  2501. HTTPMethod: "PUT",
  2502. HTTPPath: "/{Bucket}?acl",
  2503. }
  2504. if input == nil {
  2505. input = &PutBucketAclInput{}
  2506. }
  2507. req = c.newRequest(op, input, output)
  2508. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2509. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2510. output = &PutBucketAclOutput{}
  2511. req.Data = output
  2512. return
  2513. }
  2514. // PutBucketAcl API operation for Amazon Simple Storage Service.
  2515. //
  2516. // Sets the permissions on a bucket using access control lists (ACL).
  2517. //
  2518. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2519. // with awserr.Error's Code and Message methods to get detailed information about
  2520. // the error.
  2521. //
  2522. // See the AWS API reference guide for Amazon Simple Storage Service's
  2523. // API operation PutBucketAcl for usage and error information.
  2524. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  2525. req, out := c.PutBucketAclRequest(input)
  2526. err := req.Send()
  2527. return out, err
  2528. }
  2529. const opPutBucketCors = "PutBucketCors"
  2530. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  2531. // client's request for the PutBucketCors operation. The "output" return
  2532. // value can be used to capture response data after the request's "Send" method
  2533. // is called.
  2534. //
  2535. // See PutBucketCors for usage and error information.
  2536. //
  2537. // Creating a request object using this method should be used when you want to inject
  2538. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2539. // access properties on the request object before or after sending the request. If
  2540. // you just want the service response, call the PutBucketCors method directly
  2541. // instead.
  2542. //
  2543. // Note: You must call the "Send" method on the returned request object in order
  2544. // to execute the request.
  2545. //
  2546. // // Example sending a request using the PutBucketCorsRequest method.
  2547. // req, resp := client.PutBucketCorsRequest(params)
  2548. //
  2549. // err := req.Send()
  2550. // if err == nil { // resp is now filled
  2551. // fmt.Println(resp)
  2552. // }
  2553. //
  2554. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  2555. op := &request.Operation{
  2556. Name: opPutBucketCors,
  2557. HTTPMethod: "PUT",
  2558. HTTPPath: "/{Bucket}?cors",
  2559. }
  2560. if input == nil {
  2561. input = &PutBucketCorsInput{}
  2562. }
  2563. req = c.newRequest(op, input, output)
  2564. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2565. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2566. output = &PutBucketCorsOutput{}
  2567. req.Data = output
  2568. return
  2569. }
  2570. // PutBucketCors API operation for Amazon Simple Storage Service.
  2571. //
  2572. // Sets the cors configuration for a bucket.
  2573. //
  2574. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2575. // with awserr.Error's Code and Message methods to get detailed information about
  2576. // the error.
  2577. //
  2578. // See the AWS API reference guide for Amazon Simple Storage Service's
  2579. // API operation PutBucketCors for usage and error information.
  2580. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  2581. req, out := c.PutBucketCorsRequest(input)
  2582. err := req.Send()
  2583. return out, err
  2584. }
  2585. const opPutBucketLifecycle = "PutBucketLifecycle"
  2586. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  2587. // client's request for the PutBucketLifecycle operation. The "output" return
  2588. // value can be used to capture response data after the request's "Send" method
  2589. // is called.
  2590. //
  2591. // See PutBucketLifecycle for usage and error information.
  2592. //
  2593. // Creating a request object using this method should be used when you want to inject
  2594. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2595. // access properties on the request object before or after sending the request. If
  2596. // you just want the service response, call the PutBucketLifecycle method directly
  2597. // instead.
  2598. //
  2599. // Note: You must call the "Send" method on the returned request object in order
  2600. // to execute the request.
  2601. //
  2602. // // Example sending a request using the PutBucketLifecycleRequest method.
  2603. // req, resp := client.PutBucketLifecycleRequest(params)
  2604. //
  2605. // err := req.Send()
  2606. // if err == nil { // resp is now filled
  2607. // fmt.Println(resp)
  2608. // }
  2609. //
  2610. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  2611. if c.Client.Config.Logger != nil {
  2612. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  2613. }
  2614. op := &request.Operation{
  2615. Name: opPutBucketLifecycle,
  2616. HTTPMethod: "PUT",
  2617. HTTPPath: "/{Bucket}?lifecycle",
  2618. }
  2619. if input == nil {
  2620. input = &PutBucketLifecycleInput{}
  2621. }
  2622. req = c.newRequest(op, input, output)
  2623. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2624. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2625. output = &PutBucketLifecycleOutput{}
  2626. req.Data = output
  2627. return
  2628. }
  2629. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  2630. //
  2631. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  2632. //
  2633. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2634. // with awserr.Error's Code and Message methods to get detailed information about
  2635. // the error.
  2636. //
  2637. // See the AWS API reference guide for Amazon Simple Storage Service's
  2638. // API operation PutBucketLifecycle for usage and error information.
  2639. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  2640. req, out := c.PutBucketLifecycleRequest(input)
  2641. err := req.Send()
  2642. return out, err
  2643. }
  2644. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  2645. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  2646. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  2647. // value can be used to capture response data after the request's "Send" method
  2648. // is called.
  2649. //
  2650. // See PutBucketLifecycleConfiguration for usage and error information.
  2651. //
  2652. // Creating a request object using this method should be used when you want to inject
  2653. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2654. // access properties on the request object before or after sending the request. If
  2655. // you just want the service response, call the PutBucketLifecycleConfiguration method directly
  2656. // instead.
  2657. //
  2658. // Note: You must call the "Send" method on the returned request object in order
  2659. // to execute the request.
  2660. //
  2661. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  2662. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  2663. //
  2664. // err := req.Send()
  2665. // if err == nil { // resp is now filled
  2666. // fmt.Println(resp)
  2667. // }
  2668. //
  2669. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  2670. op := &request.Operation{
  2671. Name: opPutBucketLifecycleConfiguration,
  2672. HTTPMethod: "PUT",
  2673. HTTPPath: "/{Bucket}?lifecycle",
  2674. }
  2675. if input == nil {
  2676. input = &PutBucketLifecycleConfigurationInput{}
  2677. }
  2678. req = c.newRequest(op, input, output)
  2679. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2680. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2681. output = &PutBucketLifecycleConfigurationOutput{}
  2682. req.Data = output
  2683. return
  2684. }
  2685. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  2686. //
  2687. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  2688. // exists, it replaces it.
  2689. //
  2690. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2691. // with awserr.Error's Code and Message methods to get detailed information about
  2692. // the error.
  2693. //
  2694. // See the AWS API reference guide for Amazon Simple Storage Service's
  2695. // API operation PutBucketLifecycleConfiguration for usage and error information.
  2696. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  2697. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  2698. err := req.Send()
  2699. return out, err
  2700. }
  2701. const opPutBucketLogging = "PutBucketLogging"
  2702. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  2703. // client's request for the PutBucketLogging operation. The "output" return
  2704. // value can be used to capture response data after the request's "Send" method
  2705. // is called.
  2706. //
  2707. // See PutBucketLogging for usage and error information.
  2708. //
  2709. // Creating a request object using this method should be used when you want to inject
  2710. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2711. // access properties on the request object before or after sending the request. If
  2712. // you just want the service response, call the PutBucketLogging method directly
  2713. // instead.
  2714. //
  2715. // Note: You must call the "Send" method on the returned request object in order
  2716. // to execute the request.
  2717. //
  2718. // // Example sending a request using the PutBucketLoggingRequest method.
  2719. // req, resp := client.PutBucketLoggingRequest(params)
  2720. //
  2721. // err := req.Send()
  2722. // if err == nil { // resp is now filled
  2723. // fmt.Println(resp)
  2724. // }
  2725. //
  2726. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  2727. op := &request.Operation{
  2728. Name: opPutBucketLogging,
  2729. HTTPMethod: "PUT",
  2730. HTTPPath: "/{Bucket}?logging",
  2731. }
  2732. if input == nil {
  2733. input = &PutBucketLoggingInput{}
  2734. }
  2735. req = c.newRequest(op, input, output)
  2736. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2737. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2738. output = &PutBucketLoggingOutput{}
  2739. req.Data = output
  2740. return
  2741. }
  2742. // PutBucketLogging API operation for Amazon Simple Storage Service.
  2743. //
  2744. // Set the logging parameters for a bucket and to specify permissions for who
  2745. // can view and modify the logging parameters. To set the logging status of
  2746. // a bucket, you must be the bucket owner.
  2747. //
  2748. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2749. // with awserr.Error's Code and Message methods to get detailed information about
  2750. // the error.
  2751. //
  2752. // See the AWS API reference guide for Amazon Simple Storage Service's
  2753. // API operation PutBucketLogging for usage and error information.
  2754. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  2755. req, out := c.PutBucketLoggingRequest(input)
  2756. err := req.Send()
  2757. return out, err
  2758. }
  2759. const opPutBucketNotification = "PutBucketNotification"
  2760. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  2761. // client's request for the PutBucketNotification operation. The "output" return
  2762. // value can be used to capture response data after the request's "Send" method
  2763. // is called.
  2764. //
  2765. // See PutBucketNotification for usage and error information.
  2766. //
  2767. // Creating a request object using this method should be used when you want to inject
  2768. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2769. // access properties on the request object before or after sending the request. If
  2770. // you just want the service response, call the PutBucketNotification method directly
  2771. // instead.
  2772. //
  2773. // Note: You must call the "Send" method on the returned request object in order
  2774. // to execute the request.
  2775. //
  2776. // // Example sending a request using the PutBucketNotificationRequest method.
  2777. // req, resp := client.PutBucketNotificationRequest(params)
  2778. //
  2779. // err := req.Send()
  2780. // if err == nil { // resp is now filled
  2781. // fmt.Println(resp)
  2782. // }
  2783. //
  2784. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  2785. if c.Client.Config.Logger != nil {
  2786. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  2787. }
  2788. op := &request.Operation{
  2789. Name: opPutBucketNotification,
  2790. HTTPMethod: "PUT",
  2791. HTTPPath: "/{Bucket}?notification",
  2792. }
  2793. if input == nil {
  2794. input = &PutBucketNotificationInput{}
  2795. }
  2796. req = c.newRequest(op, input, output)
  2797. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2798. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2799. output = &PutBucketNotificationOutput{}
  2800. req.Data = output
  2801. return
  2802. }
  2803. // PutBucketNotification API operation for Amazon Simple Storage Service.
  2804. //
  2805. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  2806. //
  2807. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2808. // with awserr.Error's Code and Message methods to get detailed information about
  2809. // the error.
  2810. //
  2811. // See the AWS API reference guide for Amazon Simple Storage Service's
  2812. // API operation PutBucketNotification for usage and error information.
  2813. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  2814. req, out := c.PutBucketNotificationRequest(input)
  2815. err := req.Send()
  2816. return out, err
  2817. }
  2818. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  2819. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2820. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  2821. // value can be used to capture response data after the request's "Send" method
  2822. // is called.
  2823. //
  2824. // See PutBucketNotificationConfiguration for usage and error information.
  2825. //
  2826. // Creating a request object using this method should be used when you want to inject
  2827. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2828. // access properties on the request object before or after sending the request. If
  2829. // you just want the service response, call the PutBucketNotificationConfiguration method directly
  2830. // instead.
  2831. //
  2832. // Note: You must call the "Send" method on the returned request object in order
  2833. // to execute the request.
  2834. //
  2835. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  2836. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  2837. //
  2838. // err := req.Send()
  2839. // if err == nil { // resp is now filled
  2840. // fmt.Println(resp)
  2841. // }
  2842. //
  2843. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  2844. op := &request.Operation{
  2845. Name: opPutBucketNotificationConfiguration,
  2846. HTTPMethod: "PUT",
  2847. HTTPPath: "/{Bucket}?notification",
  2848. }
  2849. if input == nil {
  2850. input = &PutBucketNotificationConfigurationInput{}
  2851. }
  2852. req = c.newRequest(op, input, output)
  2853. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2854. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2855. output = &PutBucketNotificationConfigurationOutput{}
  2856. req.Data = output
  2857. return
  2858. }
  2859. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2860. //
  2861. // Enables notifications of specified events for a bucket.
  2862. //
  2863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2864. // with awserr.Error's Code and Message methods to get detailed information about
  2865. // the error.
  2866. //
  2867. // See the AWS API reference guide for Amazon Simple Storage Service's
  2868. // API operation PutBucketNotificationConfiguration for usage and error information.
  2869. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  2870. req, out := c.PutBucketNotificationConfigurationRequest(input)
  2871. err := req.Send()
  2872. return out, err
  2873. }
  2874. const opPutBucketPolicy = "PutBucketPolicy"
  2875. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  2876. // client's request for the PutBucketPolicy operation. The "output" return
  2877. // value can be used to capture response data after the request's "Send" method
  2878. // is called.
  2879. //
  2880. // See PutBucketPolicy for usage and error information.
  2881. //
  2882. // Creating a request object using this method should be used when you want to inject
  2883. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2884. // access properties on the request object before or after sending the request. If
  2885. // you just want the service response, call the PutBucketPolicy method directly
  2886. // instead.
  2887. //
  2888. // Note: You must call the "Send" method on the returned request object in order
  2889. // to execute the request.
  2890. //
  2891. // // Example sending a request using the PutBucketPolicyRequest method.
  2892. // req, resp := client.PutBucketPolicyRequest(params)
  2893. //
  2894. // err := req.Send()
  2895. // if err == nil { // resp is now filled
  2896. // fmt.Println(resp)
  2897. // }
  2898. //
  2899. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  2900. op := &request.Operation{
  2901. Name: opPutBucketPolicy,
  2902. HTTPMethod: "PUT",
  2903. HTTPPath: "/{Bucket}?policy",
  2904. }
  2905. if input == nil {
  2906. input = &PutBucketPolicyInput{}
  2907. }
  2908. req = c.newRequest(op, input, output)
  2909. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2910. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2911. output = &PutBucketPolicyOutput{}
  2912. req.Data = output
  2913. return
  2914. }
  2915. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  2916. //
  2917. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  2918. // in this request completely replaces it.
  2919. //
  2920. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2921. // with awserr.Error's Code and Message methods to get detailed information about
  2922. // the error.
  2923. //
  2924. // See the AWS API reference guide for Amazon Simple Storage Service's
  2925. // API operation PutBucketPolicy for usage and error information.
  2926. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  2927. req, out := c.PutBucketPolicyRequest(input)
  2928. err := req.Send()
  2929. return out, err
  2930. }
  2931. const opPutBucketReplication = "PutBucketReplication"
  2932. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  2933. // client's request for the PutBucketReplication operation. The "output" return
  2934. // value can be used to capture response data after the request's "Send" method
  2935. // is called.
  2936. //
  2937. // See PutBucketReplication for usage and error information.
  2938. //
  2939. // Creating a request object using this method should be used when you want to inject
  2940. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2941. // access properties on the request object before or after sending the request. If
  2942. // you just want the service response, call the PutBucketReplication method directly
  2943. // instead.
  2944. //
  2945. // Note: You must call the "Send" method on the returned request object in order
  2946. // to execute the request.
  2947. //
  2948. // // Example sending a request using the PutBucketReplicationRequest method.
  2949. // req, resp := client.PutBucketReplicationRequest(params)
  2950. //
  2951. // err := req.Send()
  2952. // if err == nil { // resp is now filled
  2953. // fmt.Println(resp)
  2954. // }
  2955. //
  2956. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  2957. op := &request.Operation{
  2958. Name: opPutBucketReplication,
  2959. HTTPMethod: "PUT",
  2960. HTTPPath: "/{Bucket}?replication",
  2961. }
  2962. if input == nil {
  2963. input = &PutBucketReplicationInput{}
  2964. }
  2965. req = c.newRequest(op, input, output)
  2966. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2967. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2968. output = &PutBucketReplicationOutput{}
  2969. req.Data = output
  2970. return
  2971. }
  2972. // PutBucketReplication API operation for Amazon Simple Storage Service.
  2973. //
  2974. // Creates a new replication configuration (or replaces an existing one, if
  2975. // present).
  2976. //
  2977. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2978. // with awserr.Error's Code and Message methods to get detailed information about
  2979. // the error.
  2980. //
  2981. // See the AWS API reference guide for Amazon Simple Storage Service's
  2982. // API operation PutBucketReplication for usage and error information.
  2983. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  2984. req, out := c.PutBucketReplicationRequest(input)
  2985. err := req.Send()
  2986. return out, err
  2987. }
  2988. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  2989. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2990. // client's request for the PutBucketRequestPayment operation. The "output" return
  2991. // value can be used to capture response data after the request's "Send" method
  2992. // is called.
  2993. //
  2994. // See PutBucketRequestPayment for usage and error information.
  2995. //
  2996. // Creating a request object using this method should be used when you want to inject
  2997. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2998. // access properties on the request object before or after sending the request. If
  2999. // you just want the service response, call the PutBucketRequestPayment method directly
  3000. // instead.
  3001. //
  3002. // Note: You must call the "Send" method on the returned request object in order
  3003. // to execute the request.
  3004. //
  3005. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  3006. // req, resp := client.PutBucketRequestPaymentRequest(params)
  3007. //
  3008. // err := req.Send()
  3009. // if err == nil { // resp is now filled
  3010. // fmt.Println(resp)
  3011. // }
  3012. //
  3013. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  3014. op := &request.Operation{
  3015. Name: opPutBucketRequestPayment,
  3016. HTTPMethod: "PUT",
  3017. HTTPPath: "/{Bucket}?requestPayment",
  3018. }
  3019. if input == nil {
  3020. input = &PutBucketRequestPaymentInput{}
  3021. }
  3022. req = c.newRequest(op, input, output)
  3023. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3024. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3025. output = &PutBucketRequestPaymentOutput{}
  3026. req.Data = output
  3027. return
  3028. }
  3029. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  3030. //
  3031. // Sets the request payment configuration for a bucket. By default, the bucket
  3032. // owner pays for downloads from the bucket. This configuration parameter enables
  3033. // the bucket owner (only) to specify that the person requesting the download
  3034. // will be charged for the download. Documentation on requester pays buckets
  3035. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  3036. //
  3037. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3038. // with awserr.Error's Code and Message methods to get detailed information about
  3039. // the error.
  3040. //
  3041. // See the AWS API reference guide for Amazon Simple Storage Service's
  3042. // API operation PutBucketRequestPayment for usage and error information.
  3043. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  3044. req, out := c.PutBucketRequestPaymentRequest(input)
  3045. err := req.Send()
  3046. return out, err
  3047. }
  3048. const opPutBucketTagging = "PutBucketTagging"
  3049. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  3050. // client's request for the PutBucketTagging operation. The "output" return
  3051. // value can be used to capture response data after the request's "Send" method
  3052. // is called.
  3053. //
  3054. // See PutBucketTagging for usage and error information.
  3055. //
  3056. // Creating a request object using this method should be used when you want to inject
  3057. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3058. // access properties on the request object before or after sending the request. If
  3059. // you just want the service response, call the PutBucketTagging method directly
  3060. // instead.
  3061. //
  3062. // Note: You must call the "Send" method on the returned request object in order
  3063. // to execute the request.
  3064. //
  3065. // // Example sending a request using the PutBucketTaggingRequest method.
  3066. // req, resp := client.PutBucketTaggingRequest(params)
  3067. //
  3068. // err := req.Send()
  3069. // if err == nil { // resp is now filled
  3070. // fmt.Println(resp)
  3071. // }
  3072. //
  3073. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  3074. op := &request.Operation{
  3075. Name: opPutBucketTagging,
  3076. HTTPMethod: "PUT",
  3077. HTTPPath: "/{Bucket}?tagging",
  3078. }
  3079. if input == nil {
  3080. input = &PutBucketTaggingInput{}
  3081. }
  3082. req = c.newRequest(op, input, output)
  3083. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3084. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3085. output = &PutBucketTaggingOutput{}
  3086. req.Data = output
  3087. return
  3088. }
  3089. // PutBucketTagging API operation for Amazon Simple Storage Service.
  3090. //
  3091. // Sets the tags for a bucket.
  3092. //
  3093. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3094. // with awserr.Error's Code and Message methods to get detailed information about
  3095. // the error.
  3096. //
  3097. // See the AWS API reference guide for Amazon Simple Storage Service's
  3098. // API operation PutBucketTagging for usage and error information.
  3099. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  3100. req, out := c.PutBucketTaggingRequest(input)
  3101. err := req.Send()
  3102. return out, err
  3103. }
  3104. const opPutBucketVersioning = "PutBucketVersioning"
  3105. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  3106. // client's request for the PutBucketVersioning operation. The "output" return
  3107. // value can be used to capture response data after the request's "Send" method
  3108. // is called.
  3109. //
  3110. // See PutBucketVersioning for usage and error information.
  3111. //
  3112. // Creating a request object using this method should be used when you want to inject
  3113. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3114. // access properties on the request object before or after sending the request. If
  3115. // you just want the service response, call the PutBucketVersioning method directly
  3116. // instead.
  3117. //
  3118. // Note: You must call the "Send" method on the returned request object in order
  3119. // to execute the request.
  3120. //
  3121. // // Example sending a request using the PutBucketVersioningRequest method.
  3122. // req, resp := client.PutBucketVersioningRequest(params)
  3123. //
  3124. // err := req.Send()
  3125. // if err == nil { // resp is now filled
  3126. // fmt.Println(resp)
  3127. // }
  3128. //
  3129. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  3130. op := &request.Operation{
  3131. Name: opPutBucketVersioning,
  3132. HTTPMethod: "PUT",
  3133. HTTPPath: "/{Bucket}?versioning",
  3134. }
  3135. if input == nil {
  3136. input = &PutBucketVersioningInput{}
  3137. }
  3138. req = c.newRequest(op, input, output)
  3139. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3140. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3141. output = &PutBucketVersioningOutput{}
  3142. req.Data = output
  3143. return
  3144. }
  3145. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  3146. //
  3147. // Sets the versioning state of an existing bucket. To set the versioning state,
  3148. // you must be the bucket owner.
  3149. //
  3150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3151. // with awserr.Error's Code and Message methods to get detailed information about
  3152. // the error.
  3153. //
  3154. // See the AWS API reference guide for Amazon Simple Storage Service's
  3155. // API operation PutBucketVersioning for usage and error information.
  3156. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  3157. req, out := c.PutBucketVersioningRequest(input)
  3158. err := req.Send()
  3159. return out, err
  3160. }
  3161. const opPutBucketWebsite = "PutBucketWebsite"
  3162. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  3163. // client's request for the PutBucketWebsite operation. The "output" return
  3164. // value can be used to capture response data after the request's "Send" method
  3165. // is called.
  3166. //
  3167. // See PutBucketWebsite for usage and error information.
  3168. //
  3169. // Creating a request object using this method should be used when you want to inject
  3170. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3171. // access properties on the request object before or after sending the request. If
  3172. // you just want the service response, call the PutBucketWebsite method directly
  3173. // instead.
  3174. //
  3175. // Note: You must call the "Send" method on the returned request object in order
  3176. // to execute the request.
  3177. //
  3178. // // Example sending a request using the PutBucketWebsiteRequest method.
  3179. // req, resp := client.PutBucketWebsiteRequest(params)
  3180. //
  3181. // err := req.Send()
  3182. // if err == nil { // resp is now filled
  3183. // fmt.Println(resp)
  3184. // }
  3185. //
  3186. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  3187. op := &request.Operation{
  3188. Name: opPutBucketWebsite,
  3189. HTTPMethod: "PUT",
  3190. HTTPPath: "/{Bucket}?website",
  3191. }
  3192. if input == nil {
  3193. input = &PutBucketWebsiteInput{}
  3194. }
  3195. req = c.newRequest(op, input, output)
  3196. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3197. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3198. output = &PutBucketWebsiteOutput{}
  3199. req.Data = output
  3200. return
  3201. }
  3202. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  3203. //
  3204. // Set the website configuration for a bucket.
  3205. //
  3206. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3207. // with awserr.Error's Code and Message methods to get detailed information about
  3208. // the error.
  3209. //
  3210. // See the AWS API reference guide for Amazon Simple Storage Service's
  3211. // API operation PutBucketWebsite for usage and error information.
  3212. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  3213. req, out := c.PutBucketWebsiteRequest(input)
  3214. err := req.Send()
  3215. return out, err
  3216. }
  3217. const opPutObject = "PutObject"
  3218. // PutObjectRequest generates a "aws/request.Request" representing the
  3219. // client's request for the PutObject operation. The "output" return
  3220. // value can be used to capture response data after the request's "Send" method
  3221. // is called.
  3222. //
  3223. // See PutObject for usage and error information.
  3224. //
  3225. // Creating a request object using this method should be used when you want to inject
  3226. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3227. // access properties on the request object before or after sending the request. If
  3228. // you just want the service response, call the PutObject method directly
  3229. // instead.
  3230. //
  3231. // Note: You must call the "Send" method on the returned request object in order
  3232. // to execute the request.
  3233. //
  3234. // // Example sending a request using the PutObjectRequest method.
  3235. // req, resp := client.PutObjectRequest(params)
  3236. //
  3237. // err := req.Send()
  3238. // if err == nil { // resp is now filled
  3239. // fmt.Println(resp)
  3240. // }
  3241. //
  3242. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  3243. op := &request.Operation{
  3244. Name: opPutObject,
  3245. HTTPMethod: "PUT",
  3246. HTTPPath: "/{Bucket}/{Key+}",
  3247. }
  3248. if input == nil {
  3249. input = &PutObjectInput{}
  3250. }
  3251. req = c.newRequest(op, input, output)
  3252. output = &PutObjectOutput{}
  3253. req.Data = output
  3254. return
  3255. }
  3256. // PutObject API operation for Amazon Simple Storage Service.
  3257. //
  3258. // Adds an object to a bucket.
  3259. //
  3260. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3261. // with awserr.Error's Code and Message methods to get detailed information about
  3262. // the error.
  3263. //
  3264. // See the AWS API reference guide for Amazon Simple Storage Service's
  3265. // API operation PutObject for usage and error information.
  3266. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  3267. req, out := c.PutObjectRequest(input)
  3268. err := req.Send()
  3269. return out, err
  3270. }
  3271. const opPutObjectAcl = "PutObjectAcl"
  3272. // PutObjectAclRequest generates a "aws/request.Request" representing the
  3273. // client's request for the PutObjectAcl operation. The "output" return
  3274. // value can be used to capture response data after the request's "Send" method
  3275. // is called.
  3276. //
  3277. // See PutObjectAcl for usage and error information.
  3278. //
  3279. // Creating a request object using this method should be used when you want to inject
  3280. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3281. // access properties on the request object before or after sending the request. If
  3282. // you just want the service response, call the PutObjectAcl method directly
  3283. // instead.
  3284. //
  3285. // Note: You must call the "Send" method on the returned request object in order
  3286. // to execute the request.
  3287. //
  3288. // // Example sending a request using the PutObjectAclRequest method.
  3289. // req, resp := client.PutObjectAclRequest(params)
  3290. //
  3291. // err := req.Send()
  3292. // if err == nil { // resp is now filled
  3293. // fmt.Println(resp)
  3294. // }
  3295. //
  3296. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  3297. op := &request.Operation{
  3298. Name: opPutObjectAcl,
  3299. HTTPMethod: "PUT",
  3300. HTTPPath: "/{Bucket}/{Key+}?acl",
  3301. }
  3302. if input == nil {
  3303. input = &PutObjectAclInput{}
  3304. }
  3305. req = c.newRequest(op, input, output)
  3306. output = &PutObjectAclOutput{}
  3307. req.Data = output
  3308. return
  3309. }
  3310. // PutObjectAcl API operation for Amazon Simple Storage Service.
  3311. //
  3312. // uses the acl subresource to set the access control list (ACL) permissions
  3313. // for an object that already exists in a bucket
  3314. //
  3315. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3316. // with awserr.Error's Code and Message methods to get detailed information about
  3317. // the error.
  3318. //
  3319. // See the AWS API reference guide for Amazon Simple Storage Service's
  3320. // API operation PutObjectAcl for usage and error information.
  3321. //
  3322. // Returned Error Codes:
  3323. // * NoSuchKey
  3324. // The specified key does not exist.
  3325. //
  3326. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  3327. req, out := c.PutObjectAclRequest(input)
  3328. err := req.Send()
  3329. return out, err
  3330. }
  3331. const opRestoreObject = "RestoreObject"
  3332. // RestoreObjectRequest generates a "aws/request.Request" representing the
  3333. // client's request for the RestoreObject operation. The "output" return
  3334. // value can be used to capture response data after the request's "Send" method
  3335. // is called.
  3336. //
  3337. // See RestoreObject for usage and error information.
  3338. //
  3339. // Creating a request object using this method should be used when you want to inject
  3340. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3341. // access properties on the request object before or after sending the request. If
  3342. // you just want the service response, call the RestoreObject method directly
  3343. // instead.
  3344. //
  3345. // Note: You must call the "Send" method on the returned request object in order
  3346. // to execute the request.
  3347. //
  3348. // // Example sending a request using the RestoreObjectRequest method.
  3349. // req, resp := client.RestoreObjectRequest(params)
  3350. //
  3351. // err := req.Send()
  3352. // if err == nil { // resp is now filled
  3353. // fmt.Println(resp)
  3354. // }
  3355. //
  3356. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  3357. op := &request.Operation{
  3358. Name: opRestoreObject,
  3359. HTTPMethod: "POST",
  3360. HTTPPath: "/{Bucket}/{Key+}?restore",
  3361. }
  3362. if input == nil {
  3363. input = &RestoreObjectInput{}
  3364. }
  3365. req = c.newRequest(op, input, output)
  3366. output = &RestoreObjectOutput{}
  3367. req.Data = output
  3368. return
  3369. }
  3370. // RestoreObject API operation for Amazon Simple Storage Service.
  3371. //
  3372. // Restores an archived copy of an object back into Amazon S3
  3373. //
  3374. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3375. // with awserr.Error's Code and Message methods to get detailed information about
  3376. // the error.
  3377. //
  3378. // See the AWS API reference guide for Amazon Simple Storage Service's
  3379. // API operation RestoreObject for usage and error information.
  3380. //
  3381. // Returned Error Codes:
  3382. // * ObjectAlreadyInActiveTierError
  3383. // This operation is not allowed against this storage tier
  3384. //
  3385. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  3386. req, out := c.RestoreObjectRequest(input)
  3387. err := req.Send()
  3388. return out, err
  3389. }
  3390. const opUploadPart = "UploadPart"
  3391. // UploadPartRequest generates a "aws/request.Request" representing the
  3392. // client's request for the UploadPart operation. The "output" return
  3393. // value can be used to capture response data after the request's "Send" method
  3394. // is called.
  3395. //
  3396. // See UploadPart for usage and error information.
  3397. //
  3398. // Creating a request object using this method should be used when you want to inject
  3399. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3400. // access properties on the request object before or after sending the request. If
  3401. // you just want the service response, call the UploadPart method directly
  3402. // instead.
  3403. //
  3404. // Note: You must call the "Send" method on the returned request object in order
  3405. // to execute the request.
  3406. //
  3407. // // Example sending a request using the UploadPartRequest method.
  3408. // req, resp := client.UploadPartRequest(params)
  3409. //
  3410. // err := req.Send()
  3411. // if err == nil { // resp is now filled
  3412. // fmt.Println(resp)
  3413. // }
  3414. //
  3415. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  3416. op := &request.Operation{
  3417. Name: opUploadPart,
  3418. HTTPMethod: "PUT",
  3419. HTTPPath: "/{Bucket}/{Key+}",
  3420. }
  3421. if input == nil {
  3422. input = &UploadPartInput{}
  3423. }
  3424. req = c.newRequest(op, input, output)
  3425. output = &UploadPartOutput{}
  3426. req.Data = output
  3427. return
  3428. }
  3429. // UploadPart API operation for Amazon Simple Storage Service.
  3430. //
  3431. // Uploads a part in a multipart upload.
  3432. //
  3433. // Note: After you initiate multipart upload and upload one or more parts, you
  3434. // must either complete or abort multipart upload in order to stop getting charged
  3435. // for storage of the uploaded parts. Only after you either complete or abort
  3436. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  3437. // you for the parts storage.
  3438. //
  3439. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3440. // with awserr.Error's Code and Message methods to get detailed information about
  3441. // the error.
  3442. //
  3443. // See the AWS API reference guide for Amazon Simple Storage Service's
  3444. // API operation UploadPart for usage and error information.
  3445. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  3446. req, out := c.UploadPartRequest(input)
  3447. err := req.Send()
  3448. return out, err
  3449. }
  3450. const opUploadPartCopy = "UploadPartCopy"
  3451. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  3452. // client's request for the UploadPartCopy operation. The "output" return
  3453. // value can be used to capture response data after the request's "Send" method
  3454. // is called.
  3455. //
  3456. // See UploadPartCopy for usage and error information.
  3457. //
  3458. // Creating a request object using this method should be used when you want to inject
  3459. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3460. // access properties on the request object before or after sending the request. If
  3461. // you just want the service response, call the UploadPartCopy method directly
  3462. // instead.
  3463. //
  3464. // Note: You must call the "Send" method on the returned request object in order
  3465. // to execute the request.
  3466. //
  3467. // // Example sending a request using the UploadPartCopyRequest method.
  3468. // req, resp := client.UploadPartCopyRequest(params)
  3469. //
  3470. // err := req.Send()
  3471. // if err == nil { // resp is now filled
  3472. // fmt.Println(resp)
  3473. // }
  3474. //
  3475. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  3476. op := &request.Operation{
  3477. Name: opUploadPartCopy,
  3478. HTTPMethod: "PUT",
  3479. HTTPPath: "/{Bucket}/{Key+}",
  3480. }
  3481. if input == nil {
  3482. input = &UploadPartCopyInput{}
  3483. }
  3484. req = c.newRequest(op, input, output)
  3485. output = &UploadPartCopyOutput{}
  3486. req.Data = output
  3487. return
  3488. }
  3489. // UploadPartCopy API operation for Amazon Simple Storage Service.
  3490. //
  3491. // Uploads a part by copying data from an existing object as data source.
  3492. //
  3493. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3494. // with awserr.Error's Code and Message methods to get detailed information about
  3495. // the error.
  3496. //
  3497. // See the AWS API reference guide for Amazon Simple Storage Service's
  3498. // API operation UploadPartCopy for usage and error information.
  3499. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  3500. req, out := c.UploadPartCopyRequest(input)
  3501. err := req.Send()
  3502. return out, err
  3503. }
  3504. // Specifies the days since the initiation of an Incomplete Multipart Upload
  3505. // that Lifecycle will wait before permanently removing all parts of the upload.
  3506. type AbortIncompleteMultipartUpload struct {
  3507. _ struct{} `type:"structure"`
  3508. // Indicates the number of days that must pass since initiation for Lifecycle
  3509. // to abort an Incomplete Multipart Upload.
  3510. DaysAfterInitiation *int64 `type:"integer"`
  3511. }
  3512. // String returns the string representation
  3513. func (s AbortIncompleteMultipartUpload) String() string {
  3514. return awsutil.Prettify(s)
  3515. }
  3516. // GoString returns the string representation
  3517. func (s AbortIncompleteMultipartUpload) GoString() string {
  3518. return s.String()
  3519. }
  3520. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  3521. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  3522. s.DaysAfterInitiation = &v
  3523. return s
  3524. }
  3525. type AbortMultipartUploadInput struct {
  3526. _ struct{} `type:"structure"`
  3527. // Bucket is a required field
  3528. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3529. // Key is a required field
  3530. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  3531. // Confirms that the requester knows that she or he will be charged for the
  3532. // request. Bucket owners need not specify this parameter in their requests.
  3533. // Documentation on downloading objects from requester pays buckets can be found
  3534. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3535. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  3536. // UploadId is a required field
  3537. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3538. }
  3539. // String returns the string representation
  3540. func (s AbortMultipartUploadInput) String() string {
  3541. return awsutil.Prettify(s)
  3542. }
  3543. // GoString returns the string representation
  3544. func (s AbortMultipartUploadInput) GoString() string {
  3545. return s.String()
  3546. }
  3547. // Validate inspects the fields of the type to determine if they are valid.
  3548. func (s *AbortMultipartUploadInput) Validate() error {
  3549. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  3550. if s.Bucket == nil {
  3551. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  3552. }
  3553. if s.Key == nil {
  3554. invalidParams.Add(request.NewErrParamRequired("Key"))
  3555. }
  3556. if s.Key != nil && len(*s.Key) < 1 {
  3557. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  3558. }
  3559. if s.UploadId == nil {
  3560. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  3561. }
  3562. if invalidParams.Len() > 0 {
  3563. return invalidParams
  3564. }
  3565. return nil
  3566. }
  3567. // SetBucket sets the Bucket field's value.
  3568. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  3569. s.Bucket = &v
  3570. return s
  3571. }
  3572. // SetKey sets the Key field's value.
  3573. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  3574. s.Key = &v
  3575. return s
  3576. }
  3577. // SetRequestPayer sets the RequestPayer field's value.
  3578. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  3579. s.RequestPayer = &v
  3580. return s
  3581. }
  3582. // SetUploadId sets the UploadId field's value.
  3583. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  3584. s.UploadId = &v
  3585. return s
  3586. }
  3587. type AbortMultipartUploadOutput struct {
  3588. _ struct{} `type:"structure"`
  3589. // If present, indicates that the requester was successfully charged for the
  3590. // request.
  3591. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  3592. }
  3593. // String returns the string representation
  3594. func (s AbortMultipartUploadOutput) String() string {
  3595. return awsutil.Prettify(s)
  3596. }
  3597. // GoString returns the string representation
  3598. func (s AbortMultipartUploadOutput) GoString() string {
  3599. return s.String()
  3600. }
  3601. // SetRequestCharged sets the RequestCharged field's value.
  3602. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  3603. s.RequestCharged = &v
  3604. return s
  3605. }
  3606. type AccelerateConfiguration struct {
  3607. _ struct{} `type:"structure"`
  3608. // The accelerate configuration of the bucket.
  3609. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  3610. }
  3611. // String returns the string representation
  3612. func (s AccelerateConfiguration) String() string {
  3613. return awsutil.Prettify(s)
  3614. }
  3615. // GoString returns the string representation
  3616. func (s AccelerateConfiguration) GoString() string {
  3617. return s.String()
  3618. }
  3619. // SetStatus sets the Status field's value.
  3620. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  3621. s.Status = &v
  3622. return s
  3623. }
  3624. type AccessControlPolicy struct {
  3625. _ struct{} `type:"structure"`
  3626. // A list of grants.
  3627. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  3628. Owner *Owner `type:"structure"`
  3629. }
  3630. // String returns the string representation
  3631. func (s AccessControlPolicy) String() string {
  3632. return awsutil.Prettify(s)
  3633. }
  3634. // GoString returns the string representation
  3635. func (s AccessControlPolicy) GoString() string {
  3636. return s.String()
  3637. }
  3638. // Validate inspects the fields of the type to determine if they are valid.
  3639. func (s *AccessControlPolicy) Validate() error {
  3640. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  3641. if s.Grants != nil {
  3642. for i, v := range s.Grants {
  3643. if v == nil {
  3644. continue
  3645. }
  3646. if err := v.Validate(); err != nil {
  3647. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  3648. }
  3649. }
  3650. }
  3651. if invalidParams.Len() > 0 {
  3652. return invalidParams
  3653. }
  3654. return nil
  3655. }
  3656. // SetGrants sets the Grants field's value.
  3657. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  3658. s.Grants = v
  3659. return s
  3660. }
  3661. // SetOwner sets the Owner field's value.
  3662. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  3663. s.Owner = v
  3664. return s
  3665. }
  3666. type Bucket struct {
  3667. _ struct{} `type:"structure"`
  3668. // Date the bucket was created.
  3669. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  3670. // The name of the bucket.
  3671. Name *string `type:"string"`
  3672. }
  3673. // String returns the string representation
  3674. func (s Bucket) String() string {
  3675. return awsutil.Prettify(s)
  3676. }
  3677. // GoString returns the string representation
  3678. func (s Bucket) GoString() string {
  3679. return s.String()
  3680. }
  3681. // SetCreationDate sets the CreationDate field's value.
  3682. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  3683. s.CreationDate = &v
  3684. return s
  3685. }
  3686. // SetName sets the Name field's value.
  3687. func (s *Bucket) SetName(v string) *Bucket {
  3688. s.Name = &v
  3689. return s
  3690. }
  3691. type BucketLifecycleConfiguration struct {
  3692. _ struct{} `type:"structure"`
  3693. // Rules is a required field
  3694. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  3695. }
  3696. // String returns the string representation
  3697. func (s BucketLifecycleConfiguration) String() string {
  3698. return awsutil.Prettify(s)
  3699. }
  3700. // GoString returns the string representation
  3701. func (s BucketLifecycleConfiguration) GoString() string {
  3702. return s.String()
  3703. }
  3704. // Validate inspects the fields of the type to determine if they are valid.
  3705. func (s *BucketLifecycleConfiguration) Validate() error {
  3706. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  3707. if s.Rules == nil {
  3708. invalidParams.Add(request.NewErrParamRequired("Rules"))
  3709. }
  3710. if s.Rules != nil {
  3711. for i, v := range s.Rules {
  3712. if v == nil {
  3713. continue
  3714. }
  3715. if err := v.Validate(); err != nil {
  3716. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  3717. }
  3718. }
  3719. }
  3720. if invalidParams.Len() > 0 {
  3721. return invalidParams
  3722. }
  3723. return nil
  3724. }
  3725. // SetRules sets the Rules field's value.
  3726. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  3727. s.Rules = v
  3728. return s
  3729. }
  3730. type BucketLoggingStatus struct {
  3731. _ struct{} `type:"structure"`
  3732. LoggingEnabled *LoggingEnabled `type:"structure"`
  3733. }
  3734. // String returns the string representation
  3735. func (s BucketLoggingStatus) String() string {
  3736. return awsutil.Prettify(s)
  3737. }
  3738. // GoString returns the string representation
  3739. func (s BucketLoggingStatus) GoString() string {
  3740. return s.String()
  3741. }
  3742. // Validate inspects the fields of the type to determine if they are valid.
  3743. func (s *BucketLoggingStatus) Validate() error {
  3744. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  3745. if s.LoggingEnabled != nil {
  3746. if err := s.LoggingEnabled.Validate(); err != nil {
  3747. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  3748. }
  3749. }
  3750. if invalidParams.Len() > 0 {
  3751. return invalidParams
  3752. }
  3753. return nil
  3754. }
  3755. // SetLoggingEnabled sets the LoggingEnabled field's value.
  3756. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  3757. s.LoggingEnabled = v
  3758. return s
  3759. }
  3760. type CORSConfiguration struct {
  3761. _ struct{} `type:"structure"`
  3762. // CORSRules is a required field
  3763. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  3764. }
  3765. // String returns the string representation
  3766. func (s CORSConfiguration) String() string {
  3767. return awsutil.Prettify(s)
  3768. }
  3769. // GoString returns the string representation
  3770. func (s CORSConfiguration) GoString() string {
  3771. return s.String()
  3772. }
  3773. // Validate inspects the fields of the type to determine if they are valid.
  3774. func (s *CORSConfiguration) Validate() error {
  3775. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  3776. if s.CORSRules == nil {
  3777. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  3778. }
  3779. if s.CORSRules != nil {
  3780. for i, v := range s.CORSRules {
  3781. if v == nil {
  3782. continue
  3783. }
  3784. if err := v.Validate(); err != nil {
  3785. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  3786. }
  3787. }
  3788. }
  3789. if invalidParams.Len() > 0 {
  3790. return invalidParams
  3791. }
  3792. return nil
  3793. }
  3794. // SetCORSRules sets the CORSRules field's value.
  3795. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  3796. s.CORSRules = v
  3797. return s
  3798. }
  3799. type CORSRule struct {
  3800. _ struct{} `type:"structure"`
  3801. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  3802. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  3803. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  3804. // to execute.
  3805. //
  3806. // AllowedMethods is a required field
  3807. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  3808. // One or more origins you want customers to be able to access the bucket from.
  3809. //
  3810. // AllowedOrigins is a required field
  3811. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  3812. // One or more headers in the response that you want customers to be able to
  3813. // access from their applications (for example, from a JavaScript XMLHttpRequest
  3814. // object).
  3815. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  3816. // The time in seconds that your browser is to cache the preflight response
  3817. // for the specified resource.
  3818. MaxAgeSeconds *int64 `type:"integer"`
  3819. }
  3820. // String returns the string representation
  3821. func (s CORSRule) String() string {
  3822. return awsutil.Prettify(s)
  3823. }
  3824. // GoString returns the string representation
  3825. func (s CORSRule) GoString() string {
  3826. return s.String()
  3827. }
  3828. // Validate inspects the fields of the type to determine if they are valid.
  3829. func (s *CORSRule) Validate() error {
  3830. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  3831. if s.AllowedMethods == nil {
  3832. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  3833. }
  3834. if s.AllowedOrigins == nil {
  3835. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  3836. }
  3837. if invalidParams.Len() > 0 {
  3838. return invalidParams
  3839. }
  3840. return nil
  3841. }
  3842. // SetAllowedHeaders sets the AllowedHeaders field's value.
  3843. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  3844. s.AllowedHeaders = v
  3845. return s
  3846. }
  3847. // SetAllowedMethods sets the AllowedMethods field's value.
  3848. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  3849. s.AllowedMethods = v
  3850. return s
  3851. }
  3852. // SetAllowedOrigins sets the AllowedOrigins field's value.
  3853. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  3854. s.AllowedOrigins = v
  3855. return s
  3856. }
  3857. // SetExposeHeaders sets the ExposeHeaders field's value.
  3858. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  3859. s.ExposeHeaders = v
  3860. return s
  3861. }
  3862. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  3863. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  3864. s.MaxAgeSeconds = &v
  3865. return s
  3866. }
  3867. type CloudFunctionConfiguration struct {
  3868. _ struct{} `type:"structure"`
  3869. CloudFunction *string `type:"string"`
  3870. // Bucket event for which to send notifications.
  3871. Event *string `deprecated:"true" type:"string" enum:"Event"`
  3872. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  3873. // Optional unique identifier for configurations in a notification configuration.
  3874. // If you don't provide one, Amazon S3 will assign an ID.
  3875. Id *string `type:"string"`
  3876. InvocationRole *string `type:"string"`
  3877. }
  3878. // String returns the string representation
  3879. func (s CloudFunctionConfiguration) String() string {
  3880. return awsutil.Prettify(s)
  3881. }
  3882. // GoString returns the string representation
  3883. func (s CloudFunctionConfiguration) GoString() string {
  3884. return s.String()
  3885. }
  3886. // SetCloudFunction sets the CloudFunction field's value.
  3887. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  3888. s.CloudFunction = &v
  3889. return s
  3890. }
  3891. // SetEvent sets the Event field's value.
  3892. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  3893. s.Event = &v
  3894. return s
  3895. }
  3896. // SetEvents sets the Events field's value.
  3897. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  3898. s.Events = v
  3899. return s
  3900. }
  3901. // SetId sets the Id field's value.
  3902. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  3903. s.Id = &v
  3904. return s
  3905. }
  3906. // SetInvocationRole sets the InvocationRole field's value.
  3907. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  3908. s.InvocationRole = &v
  3909. return s
  3910. }
  3911. type CommonPrefix struct {
  3912. _ struct{} `type:"structure"`
  3913. Prefix *string `type:"string"`
  3914. }
  3915. // String returns the string representation
  3916. func (s CommonPrefix) String() string {
  3917. return awsutil.Prettify(s)
  3918. }
  3919. // GoString returns the string representation
  3920. func (s CommonPrefix) GoString() string {
  3921. return s.String()
  3922. }
  3923. // SetPrefix sets the Prefix field's value.
  3924. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  3925. s.Prefix = &v
  3926. return s
  3927. }
  3928. type CompleteMultipartUploadInput struct {
  3929. _ struct{} `type:"structure" payload:"MultipartUpload"`
  3930. // Bucket is a required field
  3931. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  3932. // Key is a required field
  3933. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  3934. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"`
  3935. // Confirms that the requester knows that she or he will be charged for the
  3936. // request. Bucket owners need not specify this parameter in their requests.
  3937. // Documentation on downloading objects from requester pays buckets can be found
  3938. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  3939. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  3940. // UploadId is a required field
  3941. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  3942. }
  3943. // String returns the string representation
  3944. func (s CompleteMultipartUploadInput) String() string {
  3945. return awsutil.Prettify(s)
  3946. }
  3947. // GoString returns the string representation
  3948. func (s CompleteMultipartUploadInput) GoString() string {
  3949. return s.String()
  3950. }
  3951. // Validate inspects the fields of the type to determine if they are valid.
  3952. func (s *CompleteMultipartUploadInput) Validate() error {
  3953. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  3954. if s.Bucket == nil {
  3955. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  3956. }
  3957. if s.Key == nil {
  3958. invalidParams.Add(request.NewErrParamRequired("Key"))
  3959. }
  3960. if s.Key != nil && len(*s.Key) < 1 {
  3961. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  3962. }
  3963. if s.UploadId == nil {
  3964. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  3965. }
  3966. if invalidParams.Len() > 0 {
  3967. return invalidParams
  3968. }
  3969. return nil
  3970. }
  3971. // SetBucket sets the Bucket field's value.
  3972. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  3973. s.Bucket = &v
  3974. return s
  3975. }
  3976. // SetKey sets the Key field's value.
  3977. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  3978. s.Key = &v
  3979. return s
  3980. }
  3981. // SetMultipartUpload sets the MultipartUpload field's value.
  3982. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  3983. s.MultipartUpload = v
  3984. return s
  3985. }
  3986. // SetRequestPayer sets the RequestPayer field's value.
  3987. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  3988. s.RequestPayer = &v
  3989. return s
  3990. }
  3991. // SetUploadId sets the UploadId field's value.
  3992. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  3993. s.UploadId = &v
  3994. return s
  3995. }
  3996. type CompleteMultipartUploadOutput struct {
  3997. _ struct{} `type:"structure"`
  3998. Bucket *string `type:"string"`
  3999. // Entity tag of the object.
  4000. ETag *string `type:"string"`
  4001. // If the object expiration is configured, this will contain the expiration
  4002. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  4003. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  4004. Key *string `min:"1" type:"string"`
  4005. Location *string `type:"string"`
  4006. // If present, indicates that the requester was successfully charged for the
  4007. // request.
  4008. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4009. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  4010. // encryption key that was used for the object.
  4011. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4012. // The Server-side encryption algorithm used when storing this object in S3
  4013. // (e.g., AES256, aws:kms).
  4014. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4015. // Version of the object.
  4016. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  4017. }
  4018. // String returns the string representation
  4019. func (s CompleteMultipartUploadOutput) String() string {
  4020. return awsutil.Prettify(s)
  4021. }
  4022. // GoString returns the string representation
  4023. func (s CompleteMultipartUploadOutput) GoString() string {
  4024. return s.String()
  4025. }
  4026. // SetBucket sets the Bucket field's value.
  4027. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  4028. s.Bucket = &v
  4029. return s
  4030. }
  4031. // SetETag sets the ETag field's value.
  4032. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  4033. s.ETag = &v
  4034. return s
  4035. }
  4036. // SetExpiration sets the Expiration field's value.
  4037. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  4038. s.Expiration = &v
  4039. return s
  4040. }
  4041. // SetKey sets the Key field's value.
  4042. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  4043. s.Key = &v
  4044. return s
  4045. }
  4046. // SetLocation sets the Location field's value.
  4047. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  4048. s.Location = &v
  4049. return s
  4050. }
  4051. // SetRequestCharged sets the RequestCharged field's value.
  4052. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  4053. s.RequestCharged = &v
  4054. return s
  4055. }
  4056. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  4057. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  4058. s.SSEKMSKeyId = &v
  4059. return s
  4060. }
  4061. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  4062. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  4063. s.ServerSideEncryption = &v
  4064. return s
  4065. }
  4066. // SetVersionId sets the VersionId field's value.
  4067. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  4068. s.VersionId = &v
  4069. return s
  4070. }
  4071. type CompletedMultipartUpload struct {
  4072. _ struct{} `type:"structure"`
  4073. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  4074. }
  4075. // String returns the string representation
  4076. func (s CompletedMultipartUpload) String() string {
  4077. return awsutil.Prettify(s)
  4078. }
  4079. // GoString returns the string representation
  4080. func (s CompletedMultipartUpload) GoString() string {
  4081. return s.String()
  4082. }
  4083. // SetParts sets the Parts field's value.
  4084. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  4085. s.Parts = v
  4086. return s
  4087. }
  4088. type CompletedPart struct {
  4089. _ struct{} `type:"structure"`
  4090. // Entity tag returned when the part was uploaded.
  4091. ETag *string `type:"string"`
  4092. // Part number that identifies the part. This is a positive integer between
  4093. // 1 and 10,000.
  4094. PartNumber *int64 `type:"integer"`
  4095. }
  4096. // String returns the string representation
  4097. func (s CompletedPart) String() string {
  4098. return awsutil.Prettify(s)
  4099. }
  4100. // GoString returns the string representation
  4101. func (s CompletedPart) GoString() string {
  4102. return s.String()
  4103. }
  4104. // SetETag sets the ETag field's value.
  4105. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  4106. s.ETag = &v
  4107. return s
  4108. }
  4109. // SetPartNumber sets the PartNumber field's value.
  4110. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  4111. s.PartNumber = &v
  4112. return s
  4113. }
  4114. type Condition struct {
  4115. _ struct{} `type:"structure"`
  4116. // The HTTP error code when the redirect is applied. In the event of an error,
  4117. // if the error code equals this value, then the specified redirect is applied.
  4118. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  4119. // is not specified. If both are specified, then both must be true for the redirect
  4120. // to be applied.
  4121. HttpErrorCodeReturnedEquals *string `type:"string"`
  4122. // The object key name prefix when the redirect is applied. For example, to
  4123. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  4124. // To redirect request for all pages with the prefix docs/, the key prefix will
  4125. // be /docs, which identifies all objects in the docs/ folder. Required when
  4126. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  4127. // is not specified. If both conditions are specified, both must be true for
  4128. // the redirect to be applied.
  4129. KeyPrefixEquals *string `type:"string"`
  4130. }
  4131. // String returns the string representation
  4132. func (s Condition) String() string {
  4133. return awsutil.Prettify(s)
  4134. }
  4135. // GoString returns the string representation
  4136. func (s Condition) GoString() string {
  4137. return s.String()
  4138. }
  4139. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  4140. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  4141. s.HttpErrorCodeReturnedEquals = &v
  4142. return s
  4143. }
  4144. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  4145. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  4146. s.KeyPrefixEquals = &v
  4147. return s
  4148. }
  4149. type CopyObjectInput struct {
  4150. _ struct{} `type:"structure"`
  4151. // The canned ACL to apply to the object.
  4152. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  4153. // Bucket is a required field
  4154. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4155. // Specifies caching behavior along the request/reply chain.
  4156. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  4157. // Specifies presentational information for the object.
  4158. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  4159. // Specifies what content encodings have been applied to the object and thus
  4160. // what decoding mechanisms must be applied to obtain the media-type referenced
  4161. // by the Content-Type header field.
  4162. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  4163. // The language the content is in.
  4164. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  4165. // A standard MIME type describing the format of the object data.
  4166. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4167. // The name of the source bucket and key name of the source object, separated
  4168. // by a slash (/). Must be URL-encoded.
  4169. //
  4170. // CopySource is a required field
  4171. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  4172. // Copies the object if its entity tag (ETag) matches the specified tag.
  4173. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  4174. // Copies the object if it has been modified since the specified time.
  4175. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  4176. // Copies the object if its entity tag (ETag) is different than the specified
  4177. // ETag.
  4178. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  4179. // Copies the object if it hasn't been modified since the specified time.
  4180. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  4181. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  4182. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  4183. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  4184. // the source object. The encryption key provided in this header must be one
  4185. // that was used when the source object was created.
  4186. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  4187. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  4188. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  4189. // key was transmitted without error.
  4190. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  4191. // The date and time at which the object is no longer cacheable.
  4192. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  4193. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  4194. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  4195. // Allows grantee to read the object data and its metadata.
  4196. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  4197. // Allows grantee to read the object ACL.
  4198. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  4199. // Allows grantee to write the ACL for the applicable object.
  4200. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  4201. // Key is a required field
  4202. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  4203. // A map of metadata to store with the object in S3.
  4204. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  4205. // Specifies whether the metadata is copied from the source object or replaced
  4206. // with metadata provided in the request.
  4207. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  4208. // Confirms that the requester knows that she or he will be charged for the
  4209. // request. Bucket owners need not specify this parameter in their requests.
  4210. // Documentation on downloading objects from requester pays buckets can be found
  4211. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  4212. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  4213. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  4214. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4215. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  4216. // data. This value is used to store the object and then it is discarded; Amazon
  4217. // does not store the encryption key. The key must be appropriate for use with
  4218. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  4219. // header.
  4220. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  4221. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  4222. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  4223. // key was transmitted without error.
  4224. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4225. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  4226. // requests for an object protected by AWS KMS will fail if not made via SSL
  4227. // or using SigV4. Documentation on configuring any of the officially supported
  4228. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  4229. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4230. // The Server-side encryption algorithm used when storing this object in S3
  4231. // (e.g., AES256, aws:kms).
  4232. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4233. // The type of storage to use for the object. Defaults to 'STANDARD'.
  4234. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  4235. // If the bucket is configured as a website, redirects requests for this object
  4236. // to another object in the same bucket or to an external URL. Amazon S3 stores
  4237. // the value of this header in the object metadata.
  4238. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  4239. }
  4240. // String returns the string representation
  4241. func (s CopyObjectInput) String() string {
  4242. return awsutil.Prettify(s)
  4243. }
  4244. // GoString returns the string representation
  4245. func (s CopyObjectInput) GoString() string {
  4246. return s.String()
  4247. }
  4248. // Validate inspects the fields of the type to determine if they are valid.
  4249. func (s *CopyObjectInput) Validate() error {
  4250. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  4251. if s.Bucket == nil {
  4252. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4253. }
  4254. if s.CopySource == nil {
  4255. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  4256. }
  4257. if s.Key == nil {
  4258. invalidParams.Add(request.NewErrParamRequired("Key"))
  4259. }
  4260. if s.Key != nil && len(*s.Key) < 1 {
  4261. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4262. }
  4263. if invalidParams.Len() > 0 {
  4264. return invalidParams
  4265. }
  4266. return nil
  4267. }
  4268. // SetACL sets the ACL field's value.
  4269. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  4270. s.ACL = &v
  4271. return s
  4272. }
  4273. // SetBucket sets the Bucket field's value.
  4274. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  4275. s.Bucket = &v
  4276. return s
  4277. }
  4278. // SetCacheControl sets the CacheControl field's value.
  4279. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  4280. s.CacheControl = &v
  4281. return s
  4282. }
  4283. // SetContentDisposition sets the ContentDisposition field's value.
  4284. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  4285. s.ContentDisposition = &v
  4286. return s
  4287. }
  4288. // SetContentEncoding sets the ContentEncoding field's value.
  4289. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  4290. s.ContentEncoding = &v
  4291. return s
  4292. }
  4293. // SetContentLanguage sets the ContentLanguage field's value.
  4294. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  4295. s.ContentLanguage = &v
  4296. return s
  4297. }
  4298. // SetContentType sets the ContentType field's value.
  4299. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  4300. s.ContentType = &v
  4301. return s
  4302. }
  4303. // SetCopySource sets the CopySource field's value.
  4304. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  4305. s.CopySource = &v
  4306. return s
  4307. }
  4308. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  4309. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  4310. s.CopySourceIfMatch = &v
  4311. return s
  4312. }
  4313. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  4314. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  4315. s.CopySourceIfModifiedSince = &v
  4316. return s
  4317. }
  4318. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  4319. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  4320. s.CopySourceIfNoneMatch = &v
  4321. return s
  4322. }
  4323. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  4324. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  4325. s.CopySourceIfUnmodifiedSince = &v
  4326. return s
  4327. }
  4328. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  4329. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  4330. s.CopySourceSSECustomerAlgorithm = &v
  4331. return s
  4332. }
  4333. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  4334. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  4335. s.CopySourceSSECustomerKey = &v
  4336. return s
  4337. }
  4338. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  4339. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  4340. s.CopySourceSSECustomerKeyMD5 = &v
  4341. return s
  4342. }
  4343. // SetExpires sets the Expires field's value.
  4344. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  4345. s.Expires = &v
  4346. return s
  4347. }
  4348. // SetGrantFullControl sets the GrantFullControl field's value.
  4349. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  4350. s.GrantFullControl = &v
  4351. return s
  4352. }
  4353. // SetGrantRead sets the GrantRead field's value.
  4354. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  4355. s.GrantRead = &v
  4356. return s
  4357. }
  4358. // SetGrantReadACP sets the GrantReadACP field's value.
  4359. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  4360. s.GrantReadACP = &v
  4361. return s
  4362. }
  4363. // SetGrantWriteACP sets the GrantWriteACP field's value.
  4364. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  4365. s.GrantWriteACP = &v
  4366. return s
  4367. }
  4368. // SetKey sets the Key field's value.
  4369. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  4370. s.Key = &v
  4371. return s
  4372. }
  4373. // SetMetadata sets the Metadata field's value.
  4374. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  4375. s.Metadata = v
  4376. return s
  4377. }
  4378. // SetMetadataDirective sets the MetadataDirective field's value.
  4379. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  4380. s.MetadataDirective = &v
  4381. return s
  4382. }
  4383. // SetRequestPayer sets the RequestPayer field's value.
  4384. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  4385. s.RequestPayer = &v
  4386. return s
  4387. }
  4388. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  4389. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  4390. s.SSECustomerAlgorithm = &v
  4391. return s
  4392. }
  4393. // SetSSECustomerKey sets the SSECustomerKey field's value.
  4394. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  4395. s.SSECustomerKey = &v
  4396. return s
  4397. }
  4398. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  4399. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  4400. s.SSECustomerKeyMD5 = &v
  4401. return s
  4402. }
  4403. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  4404. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  4405. s.SSEKMSKeyId = &v
  4406. return s
  4407. }
  4408. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  4409. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  4410. s.ServerSideEncryption = &v
  4411. return s
  4412. }
  4413. // SetStorageClass sets the StorageClass field's value.
  4414. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  4415. s.StorageClass = &v
  4416. return s
  4417. }
  4418. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  4419. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  4420. s.WebsiteRedirectLocation = &v
  4421. return s
  4422. }
  4423. type CopyObjectOutput struct {
  4424. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  4425. CopyObjectResult *CopyObjectResult `type:"structure"`
  4426. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  4427. // If the object expiration is configured, the response includes this header.
  4428. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  4429. // If present, indicates that the requester was successfully charged for the
  4430. // request.
  4431. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4432. // If server-side encryption with a customer-provided encryption key was requested,
  4433. // the response will include this header confirming the encryption algorithm
  4434. // used.
  4435. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4436. // If server-side encryption with a customer-provided encryption key was requested,
  4437. // the response will include this header to provide round trip message integrity
  4438. // verification of the customer-provided encryption key.
  4439. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4440. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  4441. // encryption key that was used for the object.
  4442. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4443. // The Server-side encryption algorithm used when storing this object in S3
  4444. // (e.g., AES256, aws:kms).
  4445. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4446. // Version ID of the newly created copy.
  4447. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  4448. }
  4449. // String returns the string representation
  4450. func (s CopyObjectOutput) String() string {
  4451. return awsutil.Prettify(s)
  4452. }
  4453. // GoString returns the string representation
  4454. func (s CopyObjectOutput) GoString() string {
  4455. return s.String()
  4456. }
  4457. // SetCopyObjectResult sets the CopyObjectResult field's value.
  4458. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  4459. s.CopyObjectResult = v
  4460. return s
  4461. }
  4462. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  4463. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  4464. s.CopySourceVersionId = &v
  4465. return s
  4466. }
  4467. // SetExpiration sets the Expiration field's value.
  4468. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  4469. s.Expiration = &v
  4470. return s
  4471. }
  4472. // SetRequestCharged sets the RequestCharged field's value.
  4473. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  4474. s.RequestCharged = &v
  4475. return s
  4476. }
  4477. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  4478. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  4479. s.SSECustomerAlgorithm = &v
  4480. return s
  4481. }
  4482. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  4483. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  4484. s.SSECustomerKeyMD5 = &v
  4485. return s
  4486. }
  4487. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  4488. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  4489. s.SSEKMSKeyId = &v
  4490. return s
  4491. }
  4492. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  4493. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  4494. s.ServerSideEncryption = &v
  4495. return s
  4496. }
  4497. // SetVersionId sets the VersionId field's value.
  4498. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  4499. s.VersionId = &v
  4500. return s
  4501. }
  4502. type CopyObjectResult struct {
  4503. _ struct{} `type:"structure"`
  4504. ETag *string `type:"string"`
  4505. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  4506. }
  4507. // String returns the string representation
  4508. func (s CopyObjectResult) String() string {
  4509. return awsutil.Prettify(s)
  4510. }
  4511. // GoString returns the string representation
  4512. func (s CopyObjectResult) GoString() string {
  4513. return s.String()
  4514. }
  4515. // SetETag sets the ETag field's value.
  4516. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  4517. s.ETag = &v
  4518. return s
  4519. }
  4520. // SetLastModified sets the LastModified field's value.
  4521. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  4522. s.LastModified = &v
  4523. return s
  4524. }
  4525. type CopyPartResult struct {
  4526. _ struct{} `type:"structure"`
  4527. // Entity tag of the object.
  4528. ETag *string `type:"string"`
  4529. // Date and time at which the object was uploaded.
  4530. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  4531. }
  4532. // String returns the string representation
  4533. func (s CopyPartResult) String() string {
  4534. return awsutil.Prettify(s)
  4535. }
  4536. // GoString returns the string representation
  4537. func (s CopyPartResult) GoString() string {
  4538. return s.String()
  4539. }
  4540. // SetETag sets the ETag field's value.
  4541. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  4542. s.ETag = &v
  4543. return s
  4544. }
  4545. // SetLastModified sets the LastModified field's value.
  4546. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  4547. s.LastModified = &v
  4548. return s
  4549. }
  4550. type CreateBucketConfiguration struct {
  4551. _ struct{} `type:"structure"`
  4552. // Specifies the region where the bucket will be created. If you don't specify
  4553. // a region, the bucket will be created in US Standard.
  4554. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  4555. }
  4556. // String returns the string representation
  4557. func (s CreateBucketConfiguration) String() string {
  4558. return awsutil.Prettify(s)
  4559. }
  4560. // GoString returns the string representation
  4561. func (s CreateBucketConfiguration) GoString() string {
  4562. return s.String()
  4563. }
  4564. // SetLocationConstraint sets the LocationConstraint field's value.
  4565. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  4566. s.LocationConstraint = &v
  4567. return s
  4568. }
  4569. type CreateBucketInput struct {
  4570. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  4571. // The canned ACL to apply to the bucket.
  4572. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  4573. // Bucket is a required field
  4574. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4575. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure"`
  4576. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  4577. // bucket.
  4578. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  4579. // Allows grantee to list the objects in the bucket.
  4580. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  4581. // Allows grantee to read the bucket ACL.
  4582. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  4583. // Allows grantee to create, overwrite, and delete any object in the bucket.
  4584. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  4585. // Allows grantee to write the ACL for the applicable bucket.
  4586. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  4587. }
  4588. // String returns the string representation
  4589. func (s CreateBucketInput) String() string {
  4590. return awsutil.Prettify(s)
  4591. }
  4592. // GoString returns the string representation
  4593. func (s CreateBucketInput) GoString() string {
  4594. return s.String()
  4595. }
  4596. // Validate inspects the fields of the type to determine if they are valid.
  4597. func (s *CreateBucketInput) Validate() error {
  4598. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  4599. if s.Bucket == nil {
  4600. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4601. }
  4602. if invalidParams.Len() > 0 {
  4603. return invalidParams
  4604. }
  4605. return nil
  4606. }
  4607. // SetACL sets the ACL field's value.
  4608. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  4609. s.ACL = &v
  4610. return s
  4611. }
  4612. // SetBucket sets the Bucket field's value.
  4613. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  4614. s.Bucket = &v
  4615. return s
  4616. }
  4617. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  4618. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  4619. s.CreateBucketConfiguration = v
  4620. return s
  4621. }
  4622. // SetGrantFullControl sets the GrantFullControl field's value.
  4623. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  4624. s.GrantFullControl = &v
  4625. return s
  4626. }
  4627. // SetGrantRead sets the GrantRead field's value.
  4628. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  4629. s.GrantRead = &v
  4630. return s
  4631. }
  4632. // SetGrantReadACP sets the GrantReadACP field's value.
  4633. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  4634. s.GrantReadACP = &v
  4635. return s
  4636. }
  4637. // SetGrantWrite sets the GrantWrite field's value.
  4638. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  4639. s.GrantWrite = &v
  4640. return s
  4641. }
  4642. // SetGrantWriteACP sets the GrantWriteACP field's value.
  4643. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  4644. s.GrantWriteACP = &v
  4645. return s
  4646. }
  4647. type CreateBucketOutput struct {
  4648. _ struct{} `type:"structure"`
  4649. Location *string `location:"header" locationName:"Location" type:"string"`
  4650. }
  4651. // String returns the string representation
  4652. func (s CreateBucketOutput) String() string {
  4653. return awsutil.Prettify(s)
  4654. }
  4655. // GoString returns the string representation
  4656. func (s CreateBucketOutput) GoString() string {
  4657. return s.String()
  4658. }
  4659. // SetLocation sets the Location field's value.
  4660. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  4661. s.Location = &v
  4662. return s
  4663. }
  4664. type CreateMultipartUploadInput struct {
  4665. _ struct{} `type:"structure"`
  4666. // The canned ACL to apply to the object.
  4667. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  4668. // Bucket is a required field
  4669. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  4670. // Specifies caching behavior along the request/reply chain.
  4671. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  4672. // Specifies presentational information for the object.
  4673. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  4674. // Specifies what content encodings have been applied to the object and thus
  4675. // what decoding mechanisms must be applied to obtain the media-type referenced
  4676. // by the Content-Type header field.
  4677. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  4678. // The language the content is in.
  4679. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  4680. // A standard MIME type describing the format of the object data.
  4681. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  4682. // The date and time at which the object is no longer cacheable.
  4683. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  4684. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  4685. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  4686. // Allows grantee to read the object data and its metadata.
  4687. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  4688. // Allows grantee to read the object ACL.
  4689. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  4690. // Allows grantee to write the ACL for the applicable object.
  4691. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  4692. // Key is a required field
  4693. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  4694. // A map of metadata to store with the object in S3.
  4695. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  4696. // Confirms that the requester knows that she or he will be charged for the
  4697. // request. Bucket owners need not specify this parameter in their requests.
  4698. // Documentation on downloading objects from requester pays buckets can be found
  4699. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  4700. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  4701. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  4702. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4703. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  4704. // data. This value is used to store the object and then it is discarded; Amazon
  4705. // does not store the encryption key. The key must be appropriate for use with
  4706. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  4707. // header.
  4708. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  4709. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  4710. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  4711. // key was transmitted without error.
  4712. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4713. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  4714. // requests for an object protected by AWS KMS will fail if not made via SSL
  4715. // or using SigV4. Documentation on configuring any of the officially supported
  4716. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  4717. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4718. // The Server-side encryption algorithm used when storing this object in S3
  4719. // (e.g., AES256, aws:kms).
  4720. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4721. // The type of storage to use for the object. Defaults to 'STANDARD'.
  4722. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  4723. // If the bucket is configured as a website, redirects requests for this object
  4724. // to another object in the same bucket or to an external URL. Amazon S3 stores
  4725. // the value of this header in the object metadata.
  4726. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  4727. }
  4728. // String returns the string representation
  4729. func (s CreateMultipartUploadInput) String() string {
  4730. return awsutil.Prettify(s)
  4731. }
  4732. // GoString returns the string representation
  4733. func (s CreateMultipartUploadInput) GoString() string {
  4734. return s.String()
  4735. }
  4736. // Validate inspects the fields of the type to determine if they are valid.
  4737. func (s *CreateMultipartUploadInput) Validate() error {
  4738. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  4739. if s.Bucket == nil {
  4740. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  4741. }
  4742. if s.Key == nil {
  4743. invalidParams.Add(request.NewErrParamRequired("Key"))
  4744. }
  4745. if s.Key != nil && len(*s.Key) < 1 {
  4746. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  4747. }
  4748. if invalidParams.Len() > 0 {
  4749. return invalidParams
  4750. }
  4751. return nil
  4752. }
  4753. // SetACL sets the ACL field's value.
  4754. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  4755. s.ACL = &v
  4756. return s
  4757. }
  4758. // SetBucket sets the Bucket field's value.
  4759. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  4760. s.Bucket = &v
  4761. return s
  4762. }
  4763. // SetCacheControl sets the CacheControl field's value.
  4764. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  4765. s.CacheControl = &v
  4766. return s
  4767. }
  4768. // SetContentDisposition sets the ContentDisposition field's value.
  4769. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  4770. s.ContentDisposition = &v
  4771. return s
  4772. }
  4773. // SetContentEncoding sets the ContentEncoding field's value.
  4774. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  4775. s.ContentEncoding = &v
  4776. return s
  4777. }
  4778. // SetContentLanguage sets the ContentLanguage field's value.
  4779. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  4780. s.ContentLanguage = &v
  4781. return s
  4782. }
  4783. // SetContentType sets the ContentType field's value.
  4784. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  4785. s.ContentType = &v
  4786. return s
  4787. }
  4788. // SetExpires sets the Expires field's value.
  4789. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  4790. s.Expires = &v
  4791. return s
  4792. }
  4793. // SetGrantFullControl sets the GrantFullControl field's value.
  4794. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  4795. s.GrantFullControl = &v
  4796. return s
  4797. }
  4798. // SetGrantRead sets the GrantRead field's value.
  4799. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  4800. s.GrantRead = &v
  4801. return s
  4802. }
  4803. // SetGrantReadACP sets the GrantReadACP field's value.
  4804. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  4805. s.GrantReadACP = &v
  4806. return s
  4807. }
  4808. // SetGrantWriteACP sets the GrantWriteACP field's value.
  4809. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  4810. s.GrantWriteACP = &v
  4811. return s
  4812. }
  4813. // SetKey sets the Key field's value.
  4814. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  4815. s.Key = &v
  4816. return s
  4817. }
  4818. // SetMetadata sets the Metadata field's value.
  4819. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  4820. s.Metadata = v
  4821. return s
  4822. }
  4823. // SetRequestPayer sets the RequestPayer field's value.
  4824. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  4825. s.RequestPayer = &v
  4826. return s
  4827. }
  4828. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  4829. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  4830. s.SSECustomerAlgorithm = &v
  4831. return s
  4832. }
  4833. // SetSSECustomerKey sets the SSECustomerKey field's value.
  4834. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  4835. s.SSECustomerKey = &v
  4836. return s
  4837. }
  4838. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  4839. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  4840. s.SSECustomerKeyMD5 = &v
  4841. return s
  4842. }
  4843. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  4844. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  4845. s.SSEKMSKeyId = &v
  4846. return s
  4847. }
  4848. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  4849. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  4850. s.ServerSideEncryption = &v
  4851. return s
  4852. }
  4853. // SetStorageClass sets the StorageClass field's value.
  4854. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  4855. s.StorageClass = &v
  4856. return s
  4857. }
  4858. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  4859. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  4860. s.WebsiteRedirectLocation = &v
  4861. return s
  4862. }
  4863. type CreateMultipartUploadOutput struct {
  4864. _ struct{} `type:"structure"`
  4865. // Date when multipart upload will become eligible for abort operation by lifecycle.
  4866. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  4867. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  4868. // operation.
  4869. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  4870. // Name of the bucket to which the multipart upload was initiated.
  4871. Bucket *string `locationName:"Bucket" type:"string"`
  4872. // Object key for which the multipart upload was initiated.
  4873. Key *string `min:"1" type:"string"`
  4874. // If present, indicates that the requester was successfully charged for the
  4875. // request.
  4876. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  4877. // If server-side encryption with a customer-provided encryption key was requested,
  4878. // the response will include this header confirming the encryption algorithm
  4879. // used.
  4880. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  4881. // If server-side encryption with a customer-provided encryption key was requested,
  4882. // the response will include this header to provide round trip message integrity
  4883. // verification of the customer-provided encryption key.
  4884. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  4885. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  4886. // encryption key that was used for the object.
  4887. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  4888. // The Server-side encryption algorithm used when storing this object in S3
  4889. // (e.g., AES256, aws:kms).
  4890. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  4891. // ID for the initiated multipart upload.
  4892. UploadId *string `type:"string"`
  4893. }
  4894. // String returns the string representation
  4895. func (s CreateMultipartUploadOutput) String() string {
  4896. return awsutil.Prettify(s)
  4897. }
  4898. // GoString returns the string representation
  4899. func (s CreateMultipartUploadOutput) GoString() string {
  4900. return s.String()
  4901. }
  4902. // SetAbortDate sets the AbortDate field's value.
  4903. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  4904. s.AbortDate = &v
  4905. return s
  4906. }
  4907. // SetAbortRuleId sets the AbortRuleId field's value.
  4908. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  4909. s.AbortRuleId = &v
  4910. return s
  4911. }
  4912. // SetBucket sets the Bucket field's value.
  4913. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  4914. s.Bucket = &v
  4915. return s
  4916. }
  4917. // SetKey sets the Key field's value.
  4918. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  4919. s.Key = &v
  4920. return s
  4921. }
  4922. // SetRequestCharged sets the RequestCharged field's value.
  4923. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  4924. s.RequestCharged = &v
  4925. return s
  4926. }
  4927. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  4928. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  4929. s.SSECustomerAlgorithm = &v
  4930. return s
  4931. }
  4932. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  4933. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  4934. s.SSECustomerKeyMD5 = &v
  4935. return s
  4936. }
  4937. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  4938. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  4939. s.SSEKMSKeyId = &v
  4940. return s
  4941. }
  4942. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  4943. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  4944. s.ServerSideEncryption = &v
  4945. return s
  4946. }
  4947. // SetUploadId sets the UploadId field's value.
  4948. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  4949. s.UploadId = &v
  4950. return s
  4951. }
  4952. type Delete struct {
  4953. _ struct{} `type:"structure"`
  4954. // Objects is a required field
  4955. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  4956. // Element to enable quiet mode for the request. When you add this element,
  4957. // you must set its value to true.
  4958. Quiet *bool `type:"boolean"`
  4959. }
  4960. // String returns the string representation
  4961. func (s Delete) String() string {
  4962. return awsutil.Prettify(s)
  4963. }
  4964. // GoString returns the string representation
  4965. func (s Delete) GoString() string {
  4966. return s.String()
  4967. }
  4968. // Validate inspects the fields of the type to determine if they are valid.
  4969. func (s *Delete) Validate() error {
  4970. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  4971. if s.Objects == nil {
  4972. invalidParams.Add(request.NewErrParamRequired("Objects"))
  4973. }
  4974. if s.Objects != nil {
  4975. for i, v := range s.Objects {
  4976. if v == nil {
  4977. continue
  4978. }
  4979. if err := v.Validate(); err != nil {
  4980. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  4981. }
  4982. }
  4983. }
  4984. if invalidParams.Len() > 0 {
  4985. return invalidParams
  4986. }
  4987. return nil
  4988. }
  4989. // SetObjects sets the Objects field's value.
  4990. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  4991. s.Objects = v
  4992. return s
  4993. }
  4994. // SetQuiet sets the Quiet field's value.
  4995. func (s *Delete) SetQuiet(v bool) *Delete {
  4996. s.Quiet = &v
  4997. return s
  4998. }
  4999. type DeleteBucketCorsInput struct {
  5000. _ struct{} `type:"structure"`
  5001. // Bucket is a required field
  5002. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5003. }
  5004. // String returns the string representation
  5005. func (s DeleteBucketCorsInput) String() string {
  5006. return awsutil.Prettify(s)
  5007. }
  5008. // GoString returns the string representation
  5009. func (s DeleteBucketCorsInput) GoString() string {
  5010. return s.String()
  5011. }
  5012. // Validate inspects the fields of the type to determine if they are valid.
  5013. func (s *DeleteBucketCorsInput) Validate() error {
  5014. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  5015. if s.Bucket == nil {
  5016. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5017. }
  5018. if invalidParams.Len() > 0 {
  5019. return invalidParams
  5020. }
  5021. return nil
  5022. }
  5023. // SetBucket sets the Bucket field's value.
  5024. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  5025. s.Bucket = &v
  5026. return s
  5027. }
  5028. type DeleteBucketCorsOutput struct {
  5029. _ struct{} `type:"structure"`
  5030. }
  5031. // String returns the string representation
  5032. func (s DeleteBucketCorsOutput) String() string {
  5033. return awsutil.Prettify(s)
  5034. }
  5035. // GoString returns the string representation
  5036. func (s DeleteBucketCorsOutput) GoString() string {
  5037. return s.String()
  5038. }
  5039. type DeleteBucketInput struct {
  5040. _ struct{} `type:"structure"`
  5041. // Bucket is a required field
  5042. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5043. }
  5044. // String returns the string representation
  5045. func (s DeleteBucketInput) String() string {
  5046. return awsutil.Prettify(s)
  5047. }
  5048. // GoString returns the string representation
  5049. func (s DeleteBucketInput) GoString() string {
  5050. return s.String()
  5051. }
  5052. // Validate inspects the fields of the type to determine if they are valid.
  5053. func (s *DeleteBucketInput) Validate() error {
  5054. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  5055. if s.Bucket == nil {
  5056. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5057. }
  5058. if invalidParams.Len() > 0 {
  5059. return invalidParams
  5060. }
  5061. return nil
  5062. }
  5063. // SetBucket sets the Bucket field's value.
  5064. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  5065. s.Bucket = &v
  5066. return s
  5067. }
  5068. type DeleteBucketLifecycleInput struct {
  5069. _ struct{} `type:"structure"`
  5070. // Bucket is a required field
  5071. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5072. }
  5073. // String returns the string representation
  5074. func (s DeleteBucketLifecycleInput) String() string {
  5075. return awsutil.Prettify(s)
  5076. }
  5077. // GoString returns the string representation
  5078. func (s DeleteBucketLifecycleInput) GoString() string {
  5079. return s.String()
  5080. }
  5081. // Validate inspects the fields of the type to determine if they are valid.
  5082. func (s *DeleteBucketLifecycleInput) Validate() error {
  5083. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  5084. if s.Bucket == nil {
  5085. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5086. }
  5087. if invalidParams.Len() > 0 {
  5088. return invalidParams
  5089. }
  5090. return nil
  5091. }
  5092. // SetBucket sets the Bucket field's value.
  5093. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  5094. s.Bucket = &v
  5095. return s
  5096. }
  5097. type DeleteBucketLifecycleOutput struct {
  5098. _ struct{} `type:"structure"`
  5099. }
  5100. // String returns the string representation
  5101. func (s DeleteBucketLifecycleOutput) String() string {
  5102. return awsutil.Prettify(s)
  5103. }
  5104. // GoString returns the string representation
  5105. func (s DeleteBucketLifecycleOutput) GoString() string {
  5106. return s.String()
  5107. }
  5108. type DeleteBucketOutput struct {
  5109. _ struct{} `type:"structure"`
  5110. }
  5111. // String returns the string representation
  5112. func (s DeleteBucketOutput) String() string {
  5113. return awsutil.Prettify(s)
  5114. }
  5115. // GoString returns the string representation
  5116. func (s DeleteBucketOutput) GoString() string {
  5117. return s.String()
  5118. }
  5119. type DeleteBucketPolicyInput struct {
  5120. _ struct{} `type:"structure"`
  5121. // Bucket is a required field
  5122. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5123. }
  5124. // String returns the string representation
  5125. func (s DeleteBucketPolicyInput) String() string {
  5126. return awsutil.Prettify(s)
  5127. }
  5128. // GoString returns the string representation
  5129. func (s DeleteBucketPolicyInput) GoString() string {
  5130. return s.String()
  5131. }
  5132. // Validate inspects the fields of the type to determine if they are valid.
  5133. func (s *DeleteBucketPolicyInput) Validate() error {
  5134. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  5135. if s.Bucket == nil {
  5136. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5137. }
  5138. if invalidParams.Len() > 0 {
  5139. return invalidParams
  5140. }
  5141. return nil
  5142. }
  5143. // SetBucket sets the Bucket field's value.
  5144. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  5145. s.Bucket = &v
  5146. return s
  5147. }
  5148. type DeleteBucketPolicyOutput struct {
  5149. _ struct{} `type:"structure"`
  5150. }
  5151. // String returns the string representation
  5152. func (s DeleteBucketPolicyOutput) String() string {
  5153. return awsutil.Prettify(s)
  5154. }
  5155. // GoString returns the string representation
  5156. func (s DeleteBucketPolicyOutput) GoString() string {
  5157. return s.String()
  5158. }
  5159. type DeleteBucketReplicationInput struct {
  5160. _ struct{} `type:"structure"`
  5161. // Bucket is a required field
  5162. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5163. }
  5164. // String returns the string representation
  5165. func (s DeleteBucketReplicationInput) String() string {
  5166. return awsutil.Prettify(s)
  5167. }
  5168. // GoString returns the string representation
  5169. func (s DeleteBucketReplicationInput) GoString() string {
  5170. return s.String()
  5171. }
  5172. // Validate inspects the fields of the type to determine if they are valid.
  5173. func (s *DeleteBucketReplicationInput) Validate() error {
  5174. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  5175. if s.Bucket == nil {
  5176. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5177. }
  5178. if invalidParams.Len() > 0 {
  5179. return invalidParams
  5180. }
  5181. return nil
  5182. }
  5183. // SetBucket sets the Bucket field's value.
  5184. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  5185. s.Bucket = &v
  5186. return s
  5187. }
  5188. type DeleteBucketReplicationOutput struct {
  5189. _ struct{} `type:"structure"`
  5190. }
  5191. // String returns the string representation
  5192. func (s DeleteBucketReplicationOutput) String() string {
  5193. return awsutil.Prettify(s)
  5194. }
  5195. // GoString returns the string representation
  5196. func (s DeleteBucketReplicationOutput) GoString() string {
  5197. return s.String()
  5198. }
  5199. type DeleteBucketTaggingInput struct {
  5200. _ struct{} `type:"structure"`
  5201. // Bucket is a required field
  5202. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5203. }
  5204. // String returns the string representation
  5205. func (s DeleteBucketTaggingInput) String() string {
  5206. return awsutil.Prettify(s)
  5207. }
  5208. // GoString returns the string representation
  5209. func (s DeleteBucketTaggingInput) GoString() string {
  5210. return s.String()
  5211. }
  5212. // Validate inspects the fields of the type to determine if they are valid.
  5213. func (s *DeleteBucketTaggingInput) Validate() error {
  5214. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  5215. if s.Bucket == nil {
  5216. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5217. }
  5218. if invalidParams.Len() > 0 {
  5219. return invalidParams
  5220. }
  5221. return nil
  5222. }
  5223. // SetBucket sets the Bucket field's value.
  5224. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  5225. s.Bucket = &v
  5226. return s
  5227. }
  5228. type DeleteBucketTaggingOutput struct {
  5229. _ struct{} `type:"structure"`
  5230. }
  5231. // String returns the string representation
  5232. func (s DeleteBucketTaggingOutput) String() string {
  5233. return awsutil.Prettify(s)
  5234. }
  5235. // GoString returns the string representation
  5236. func (s DeleteBucketTaggingOutput) GoString() string {
  5237. return s.String()
  5238. }
  5239. type DeleteBucketWebsiteInput struct {
  5240. _ struct{} `type:"structure"`
  5241. // Bucket is a required field
  5242. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5243. }
  5244. // String returns the string representation
  5245. func (s DeleteBucketWebsiteInput) String() string {
  5246. return awsutil.Prettify(s)
  5247. }
  5248. // GoString returns the string representation
  5249. func (s DeleteBucketWebsiteInput) GoString() string {
  5250. return s.String()
  5251. }
  5252. // Validate inspects the fields of the type to determine if they are valid.
  5253. func (s *DeleteBucketWebsiteInput) Validate() error {
  5254. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  5255. if s.Bucket == nil {
  5256. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5257. }
  5258. if invalidParams.Len() > 0 {
  5259. return invalidParams
  5260. }
  5261. return nil
  5262. }
  5263. // SetBucket sets the Bucket field's value.
  5264. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  5265. s.Bucket = &v
  5266. return s
  5267. }
  5268. type DeleteBucketWebsiteOutput struct {
  5269. _ struct{} `type:"structure"`
  5270. }
  5271. // String returns the string representation
  5272. func (s DeleteBucketWebsiteOutput) String() string {
  5273. return awsutil.Prettify(s)
  5274. }
  5275. // GoString returns the string representation
  5276. func (s DeleteBucketWebsiteOutput) GoString() string {
  5277. return s.String()
  5278. }
  5279. type DeleteMarkerEntry struct {
  5280. _ struct{} `type:"structure"`
  5281. // Specifies whether the object is (true) or is not (false) the latest version
  5282. // of an object.
  5283. IsLatest *bool `type:"boolean"`
  5284. // The object key.
  5285. Key *string `min:"1" type:"string"`
  5286. // Date and time the object was last modified.
  5287. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5288. Owner *Owner `type:"structure"`
  5289. // Version ID of an object.
  5290. VersionId *string `type:"string"`
  5291. }
  5292. // String returns the string representation
  5293. func (s DeleteMarkerEntry) String() string {
  5294. return awsutil.Prettify(s)
  5295. }
  5296. // GoString returns the string representation
  5297. func (s DeleteMarkerEntry) GoString() string {
  5298. return s.String()
  5299. }
  5300. // SetIsLatest sets the IsLatest field's value.
  5301. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  5302. s.IsLatest = &v
  5303. return s
  5304. }
  5305. // SetKey sets the Key field's value.
  5306. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  5307. s.Key = &v
  5308. return s
  5309. }
  5310. // SetLastModified sets the LastModified field's value.
  5311. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  5312. s.LastModified = &v
  5313. return s
  5314. }
  5315. // SetOwner sets the Owner field's value.
  5316. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  5317. s.Owner = v
  5318. return s
  5319. }
  5320. // SetVersionId sets the VersionId field's value.
  5321. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  5322. s.VersionId = &v
  5323. return s
  5324. }
  5325. type DeleteObjectInput struct {
  5326. _ struct{} `type:"structure"`
  5327. // Bucket is a required field
  5328. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5329. // Key is a required field
  5330. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5331. // The concatenation of the authentication device's serial number, a space,
  5332. // and the value that is displayed on your authentication device.
  5333. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  5334. // Confirms that the requester knows that she or he will be charged for the
  5335. // request. Bucket owners need not specify this parameter in their requests.
  5336. // Documentation on downloading objects from requester pays buckets can be found
  5337. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5338. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5339. // VersionId used to reference a specific version of the object.
  5340. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  5341. }
  5342. // String returns the string representation
  5343. func (s DeleteObjectInput) String() string {
  5344. return awsutil.Prettify(s)
  5345. }
  5346. // GoString returns the string representation
  5347. func (s DeleteObjectInput) GoString() string {
  5348. return s.String()
  5349. }
  5350. // Validate inspects the fields of the type to determine if they are valid.
  5351. func (s *DeleteObjectInput) Validate() error {
  5352. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  5353. if s.Bucket == nil {
  5354. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5355. }
  5356. if s.Key == nil {
  5357. invalidParams.Add(request.NewErrParamRequired("Key"))
  5358. }
  5359. if s.Key != nil && len(*s.Key) < 1 {
  5360. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5361. }
  5362. if invalidParams.Len() > 0 {
  5363. return invalidParams
  5364. }
  5365. return nil
  5366. }
  5367. // SetBucket sets the Bucket field's value.
  5368. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  5369. s.Bucket = &v
  5370. return s
  5371. }
  5372. // SetKey sets the Key field's value.
  5373. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  5374. s.Key = &v
  5375. return s
  5376. }
  5377. // SetMFA sets the MFA field's value.
  5378. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  5379. s.MFA = &v
  5380. return s
  5381. }
  5382. // SetRequestPayer sets the RequestPayer field's value.
  5383. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  5384. s.RequestPayer = &v
  5385. return s
  5386. }
  5387. // SetVersionId sets the VersionId field's value.
  5388. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  5389. s.VersionId = &v
  5390. return s
  5391. }
  5392. type DeleteObjectOutput struct {
  5393. _ struct{} `type:"structure"`
  5394. // Specifies whether the versioned object that was permanently deleted was (true)
  5395. // or was not (false) a delete marker.
  5396. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  5397. // If present, indicates that the requester was successfully charged for the
  5398. // request.
  5399. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5400. // Returns the version ID of the delete marker created as a result of the DELETE
  5401. // operation.
  5402. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  5403. }
  5404. // String returns the string representation
  5405. func (s DeleteObjectOutput) String() string {
  5406. return awsutil.Prettify(s)
  5407. }
  5408. // GoString returns the string representation
  5409. func (s DeleteObjectOutput) GoString() string {
  5410. return s.String()
  5411. }
  5412. // SetDeleteMarker sets the DeleteMarker field's value.
  5413. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  5414. s.DeleteMarker = &v
  5415. return s
  5416. }
  5417. // SetRequestCharged sets the RequestCharged field's value.
  5418. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  5419. s.RequestCharged = &v
  5420. return s
  5421. }
  5422. // SetVersionId sets the VersionId field's value.
  5423. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  5424. s.VersionId = &v
  5425. return s
  5426. }
  5427. type DeleteObjectsInput struct {
  5428. _ struct{} `type:"structure" payload:"Delete"`
  5429. // Bucket is a required field
  5430. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5431. // Delete is a required field
  5432. Delete *Delete `locationName:"Delete" type:"structure" required:"true"`
  5433. // The concatenation of the authentication device's serial number, a space,
  5434. // and the value that is displayed on your authentication device.
  5435. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  5436. // Confirms that the requester knows that she or he will be charged for the
  5437. // request. Bucket owners need not specify this parameter in their requests.
  5438. // Documentation on downloading objects from requester pays buckets can be found
  5439. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5440. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5441. }
  5442. // String returns the string representation
  5443. func (s DeleteObjectsInput) String() string {
  5444. return awsutil.Prettify(s)
  5445. }
  5446. // GoString returns the string representation
  5447. func (s DeleteObjectsInput) GoString() string {
  5448. return s.String()
  5449. }
  5450. // Validate inspects the fields of the type to determine if they are valid.
  5451. func (s *DeleteObjectsInput) Validate() error {
  5452. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  5453. if s.Bucket == nil {
  5454. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5455. }
  5456. if s.Delete == nil {
  5457. invalidParams.Add(request.NewErrParamRequired("Delete"))
  5458. }
  5459. if s.Delete != nil {
  5460. if err := s.Delete.Validate(); err != nil {
  5461. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  5462. }
  5463. }
  5464. if invalidParams.Len() > 0 {
  5465. return invalidParams
  5466. }
  5467. return nil
  5468. }
  5469. // SetBucket sets the Bucket field's value.
  5470. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  5471. s.Bucket = &v
  5472. return s
  5473. }
  5474. // SetDelete sets the Delete field's value.
  5475. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  5476. s.Delete = v
  5477. return s
  5478. }
  5479. // SetMFA sets the MFA field's value.
  5480. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  5481. s.MFA = &v
  5482. return s
  5483. }
  5484. // SetRequestPayer sets the RequestPayer field's value.
  5485. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  5486. s.RequestPayer = &v
  5487. return s
  5488. }
  5489. type DeleteObjectsOutput struct {
  5490. _ struct{} `type:"structure"`
  5491. Deleted []*DeletedObject `type:"list" flattened:"true"`
  5492. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  5493. // If present, indicates that the requester was successfully charged for the
  5494. // request.
  5495. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5496. }
  5497. // String returns the string representation
  5498. func (s DeleteObjectsOutput) String() string {
  5499. return awsutil.Prettify(s)
  5500. }
  5501. // GoString returns the string representation
  5502. func (s DeleteObjectsOutput) GoString() string {
  5503. return s.String()
  5504. }
  5505. // SetDeleted sets the Deleted field's value.
  5506. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  5507. s.Deleted = v
  5508. return s
  5509. }
  5510. // SetErrors sets the Errors field's value.
  5511. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  5512. s.Errors = v
  5513. return s
  5514. }
  5515. // SetRequestCharged sets the RequestCharged field's value.
  5516. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  5517. s.RequestCharged = &v
  5518. return s
  5519. }
  5520. type DeletedObject struct {
  5521. _ struct{} `type:"structure"`
  5522. DeleteMarker *bool `type:"boolean"`
  5523. DeleteMarkerVersionId *string `type:"string"`
  5524. Key *string `min:"1" type:"string"`
  5525. VersionId *string `type:"string"`
  5526. }
  5527. // String returns the string representation
  5528. func (s DeletedObject) String() string {
  5529. return awsutil.Prettify(s)
  5530. }
  5531. // GoString returns the string representation
  5532. func (s DeletedObject) GoString() string {
  5533. return s.String()
  5534. }
  5535. // SetDeleteMarker sets the DeleteMarker field's value.
  5536. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  5537. s.DeleteMarker = &v
  5538. return s
  5539. }
  5540. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  5541. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  5542. s.DeleteMarkerVersionId = &v
  5543. return s
  5544. }
  5545. // SetKey sets the Key field's value.
  5546. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  5547. s.Key = &v
  5548. return s
  5549. }
  5550. // SetVersionId sets the VersionId field's value.
  5551. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  5552. s.VersionId = &v
  5553. return s
  5554. }
  5555. type Destination struct {
  5556. _ struct{} `type:"structure"`
  5557. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  5558. // replicas of the object identified by the rule.
  5559. //
  5560. // Bucket is a required field
  5561. Bucket *string `type:"string" required:"true"`
  5562. // The class of storage used to store the object.
  5563. StorageClass *string `type:"string" enum:"StorageClass"`
  5564. }
  5565. // String returns the string representation
  5566. func (s Destination) String() string {
  5567. return awsutil.Prettify(s)
  5568. }
  5569. // GoString returns the string representation
  5570. func (s Destination) GoString() string {
  5571. return s.String()
  5572. }
  5573. // Validate inspects the fields of the type to determine if they are valid.
  5574. func (s *Destination) Validate() error {
  5575. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  5576. if s.Bucket == nil {
  5577. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5578. }
  5579. if invalidParams.Len() > 0 {
  5580. return invalidParams
  5581. }
  5582. return nil
  5583. }
  5584. // SetBucket sets the Bucket field's value.
  5585. func (s *Destination) SetBucket(v string) *Destination {
  5586. s.Bucket = &v
  5587. return s
  5588. }
  5589. // SetStorageClass sets the StorageClass field's value.
  5590. func (s *Destination) SetStorageClass(v string) *Destination {
  5591. s.StorageClass = &v
  5592. return s
  5593. }
  5594. type Error struct {
  5595. _ struct{} `type:"structure"`
  5596. Code *string `type:"string"`
  5597. Key *string `min:"1" type:"string"`
  5598. Message *string `type:"string"`
  5599. VersionId *string `type:"string"`
  5600. }
  5601. // String returns the string representation
  5602. func (s Error) String() string {
  5603. return awsutil.Prettify(s)
  5604. }
  5605. // GoString returns the string representation
  5606. func (s Error) GoString() string {
  5607. return s.String()
  5608. }
  5609. // SetCode sets the Code field's value.
  5610. func (s *Error) SetCode(v string) *Error {
  5611. s.Code = &v
  5612. return s
  5613. }
  5614. // SetKey sets the Key field's value.
  5615. func (s *Error) SetKey(v string) *Error {
  5616. s.Key = &v
  5617. return s
  5618. }
  5619. // SetMessage sets the Message field's value.
  5620. func (s *Error) SetMessage(v string) *Error {
  5621. s.Message = &v
  5622. return s
  5623. }
  5624. // SetVersionId sets the VersionId field's value.
  5625. func (s *Error) SetVersionId(v string) *Error {
  5626. s.VersionId = &v
  5627. return s
  5628. }
  5629. type ErrorDocument struct {
  5630. _ struct{} `type:"structure"`
  5631. // The object key name to use when a 4XX class error occurs.
  5632. //
  5633. // Key is a required field
  5634. Key *string `min:"1" type:"string" required:"true"`
  5635. }
  5636. // String returns the string representation
  5637. func (s ErrorDocument) String() string {
  5638. return awsutil.Prettify(s)
  5639. }
  5640. // GoString returns the string representation
  5641. func (s ErrorDocument) GoString() string {
  5642. return s.String()
  5643. }
  5644. // Validate inspects the fields of the type to determine if they are valid.
  5645. func (s *ErrorDocument) Validate() error {
  5646. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  5647. if s.Key == nil {
  5648. invalidParams.Add(request.NewErrParamRequired("Key"))
  5649. }
  5650. if s.Key != nil && len(*s.Key) < 1 {
  5651. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5652. }
  5653. if invalidParams.Len() > 0 {
  5654. return invalidParams
  5655. }
  5656. return nil
  5657. }
  5658. // SetKey sets the Key field's value.
  5659. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  5660. s.Key = &v
  5661. return s
  5662. }
  5663. // Container for key value pair that defines the criteria for the filter rule.
  5664. type FilterRule struct {
  5665. _ struct{} `type:"structure"`
  5666. // Object key name prefix or suffix identifying one or more objects to which
  5667. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  5668. // Overlapping prefixes and suffixes are not supported. For more information,
  5669. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  5670. Name *string `type:"string" enum:"FilterRuleName"`
  5671. Value *string `type:"string"`
  5672. }
  5673. // String returns the string representation
  5674. func (s FilterRule) String() string {
  5675. return awsutil.Prettify(s)
  5676. }
  5677. // GoString returns the string representation
  5678. func (s FilterRule) GoString() string {
  5679. return s.String()
  5680. }
  5681. // SetName sets the Name field's value.
  5682. func (s *FilterRule) SetName(v string) *FilterRule {
  5683. s.Name = &v
  5684. return s
  5685. }
  5686. // SetValue sets the Value field's value.
  5687. func (s *FilterRule) SetValue(v string) *FilterRule {
  5688. s.Value = &v
  5689. return s
  5690. }
  5691. type GetBucketAccelerateConfigurationInput struct {
  5692. _ struct{} `type:"structure"`
  5693. // Name of the bucket for which the accelerate configuration is retrieved.
  5694. //
  5695. // Bucket is a required field
  5696. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5697. }
  5698. // String returns the string representation
  5699. func (s GetBucketAccelerateConfigurationInput) String() string {
  5700. return awsutil.Prettify(s)
  5701. }
  5702. // GoString returns the string representation
  5703. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  5704. return s.String()
  5705. }
  5706. // Validate inspects the fields of the type to determine if they are valid.
  5707. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  5708. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  5709. if s.Bucket == nil {
  5710. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5711. }
  5712. if invalidParams.Len() > 0 {
  5713. return invalidParams
  5714. }
  5715. return nil
  5716. }
  5717. // SetBucket sets the Bucket field's value.
  5718. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  5719. s.Bucket = &v
  5720. return s
  5721. }
  5722. type GetBucketAccelerateConfigurationOutput struct {
  5723. _ struct{} `type:"structure"`
  5724. // The accelerate configuration of the bucket.
  5725. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  5726. }
  5727. // String returns the string representation
  5728. func (s GetBucketAccelerateConfigurationOutput) String() string {
  5729. return awsutil.Prettify(s)
  5730. }
  5731. // GoString returns the string representation
  5732. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  5733. return s.String()
  5734. }
  5735. // SetStatus sets the Status field's value.
  5736. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  5737. s.Status = &v
  5738. return s
  5739. }
  5740. type GetBucketAclInput struct {
  5741. _ struct{} `type:"structure"`
  5742. // Bucket is a required field
  5743. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5744. }
  5745. // String returns the string representation
  5746. func (s GetBucketAclInput) String() string {
  5747. return awsutil.Prettify(s)
  5748. }
  5749. // GoString returns the string representation
  5750. func (s GetBucketAclInput) GoString() string {
  5751. return s.String()
  5752. }
  5753. // Validate inspects the fields of the type to determine if they are valid.
  5754. func (s *GetBucketAclInput) Validate() error {
  5755. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  5756. if s.Bucket == nil {
  5757. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5758. }
  5759. if invalidParams.Len() > 0 {
  5760. return invalidParams
  5761. }
  5762. return nil
  5763. }
  5764. // SetBucket sets the Bucket field's value.
  5765. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  5766. s.Bucket = &v
  5767. return s
  5768. }
  5769. type GetBucketAclOutput struct {
  5770. _ struct{} `type:"structure"`
  5771. // A list of grants.
  5772. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5773. Owner *Owner `type:"structure"`
  5774. }
  5775. // String returns the string representation
  5776. func (s GetBucketAclOutput) String() string {
  5777. return awsutil.Prettify(s)
  5778. }
  5779. // GoString returns the string representation
  5780. func (s GetBucketAclOutput) GoString() string {
  5781. return s.String()
  5782. }
  5783. // SetGrants sets the Grants field's value.
  5784. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  5785. s.Grants = v
  5786. return s
  5787. }
  5788. // SetOwner sets the Owner field's value.
  5789. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  5790. s.Owner = v
  5791. return s
  5792. }
  5793. type GetBucketCorsInput struct {
  5794. _ struct{} `type:"structure"`
  5795. // Bucket is a required field
  5796. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5797. }
  5798. // String returns the string representation
  5799. func (s GetBucketCorsInput) String() string {
  5800. return awsutil.Prettify(s)
  5801. }
  5802. // GoString returns the string representation
  5803. func (s GetBucketCorsInput) GoString() string {
  5804. return s.String()
  5805. }
  5806. // Validate inspects the fields of the type to determine if they are valid.
  5807. func (s *GetBucketCorsInput) Validate() error {
  5808. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  5809. if s.Bucket == nil {
  5810. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5811. }
  5812. if invalidParams.Len() > 0 {
  5813. return invalidParams
  5814. }
  5815. return nil
  5816. }
  5817. // SetBucket sets the Bucket field's value.
  5818. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  5819. s.Bucket = &v
  5820. return s
  5821. }
  5822. type GetBucketCorsOutput struct {
  5823. _ struct{} `type:"structure"`
  5824. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  5825. }
  5826. // String returns the string representation
  5827. func (s GetBucketCorsOutput) String() string {
  5828. return awsutil.Prettify(s)
  5829. }
  5830. // GoString returns the string representation
  5831. func (s GetBucketCorsOutput) GoString() string {
  5832. return s.String()
  5833. }
  5834. // SetCORSRules sets the CORSRules field's value.
  5835. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  5836. s.CORSRules = v
  5837. return s
  5838. }
  5839. type GetBucketLifecycleConfigurationInput struct {
  5840. _ struct{} `type:"structure"`
  5841. // Bucket is a required field
  5842. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5843. }
  5844. // String returns the string representation
  5845. func (s GetBucketLifecycleConfigurationInput) String() string {
  5846. return awsutil.Prettify(s)
  5847. }
  5848. // GoString returns the string representation
  5849. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  5850. return s.String()
  5851. }
  5852. // Validate inspects the fields of the type to determine if they are valid.
  5853. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  5854. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  5855. if s.Bucket == nil {
  5856. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5857. }
  5858. if invalidParams.Len() > 0 {
  5859. return invalidParams
  5860. }
  5861. return nil
  5862. }
  5863. // SetBucket sets the Bucket field's value.
  5864. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  5865. s.Bucket = &v
  5866. return s
  5867. }
  5868. type GetBucketLifecycleConfigurationOutput struct {
  5869. _ struct{} `type:"structure"`
  5870. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  5871. }
  5872. // String returns the string representation
  5873. func (s GetBucketLifecycleConfigurationOutput) String() string {
  5874. return awsutil.Prettify(s)
  5875. }
  5876. // GoString returns the string representation
  5877. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  5878. return s.String()
  5879. }
  5880. // SetRules sets the Rules field's value.
  5881. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  5882. s.Rules = v
  5883. return s
  5884. }
  5885. type GetBucketLifecycleInput struct {
  5886. _ struct{} `type:"structure"`
  5887. // Bucket is a required field
  5888. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5889. }
  5890. // String returns the string representation
  5891. func (s GetBucketLifecycleInput) String() string {
  5892. return awsutil.Prettify(s)
  5893. }
  5894. // GoString returns the string representation
  5895. func (s GetBucketLifecycleInput) GoString() string {
  5896. return s.String()
  5897. }
  5898. // Validate inspects the fields of the type to determine if they are valid.
  5899. func (s *GetBucketLifecycleInput) Validate() error {
  5900. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  5901. if s.Bucket == nil {
  5902. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5903. }
  5904. if invalidParams.Len() > 0 {
  5905. return invalidParams
  5906. }
  5907. return nil
  5908. }
  5909. // SetBucket sets the Bucket field's value.
  5910. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  5911. s.Bucket = &v
  5912. return s
  5913. }
  5914. type GetBucketLifecycleOutput struct {
  5915. _ struct{} `type:"structure"`
  5916. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  5917. }
  5918. // String returns the string representation
  5919. func (s GetBucketLifecycleOutput) String() string {
  5920. return awsutil.Prettify(s)
  5921. }
  5922. // GoString returns the string representation
  5923. func (s GetBucketLifecycleOutput) GoString() string {
  5924. return s.String()
  5925. }
  5926. // SetRules sets the Rules field's value.
  5927. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  5928. s.Rules = v
  5929. return s
  5930. }
  5931. type GetBucketLocationInput struct {
  5932. _ struct{} `type:"structure"`
  5933. // Bucket is a required field
  5934. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5935. }
  5936. // String returns the string representation
  5937. func (s GetBucketLocationInput) String() string {
  5938. return awsutil.Prettify(s)
  5939. }
  5940. // GoString returns the string representation
  5941. func (s GetBucketLocationInput) GoString() string {
  5942. return s.String()
  5943. }
  5944. // Validate inspects the fields of the type to determine if they are valid.
  5945. func (s *GetBucketLocationInput) Validate() error {
  5946. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  5947. if s.Bucket == nil {
  5948. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5949. }
  5950. if invalidParams.Len() > 0 {
  5951. return invalidParams
  5952. }
  5953. return nil
  5954. }
  5955. // SetBucket sets the Bucket field's value.
  5956. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  5957. s.Bucket = &v
  5958. return s
  5959. }
  5960. type GetBucketLocationOutput struct {
  5961. _ struct{} `type:"structure"`
  5962. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  5963. }
  5964. // String returns the string representation
  5965. func (s GetBucketLocationOutput) String() string {
  5966. return awsutil.Prettify(s)
  5967. }
  5968. // GoString returns the string representation
  5969. func (s GetBucketLocationOutput) GoString() string {
  5970. return s.String()
  5971. }
  5972. // SetLocationConstraint sets the LocationConstraint field's value.
  5973. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  5974. s.LocationConstraint = &v
  5975. return s
  5976. }
  5977. type GetBucketLoggingInput struct {
  5978. _ struct{} `type:"structure"`
  5979. // Bucket is a required field
  5980. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5981. }
  5982. // String returns the string representation
  5983. func (s GetBucketLoggingInput) String() string {
  5984. return awsutil.Prettify(s)
  5985. }
  5986. // GoString returns the string representation
  5987. func (s GetBucketLoggingInput) GoString() string {
  5988. return s.String()
  5989. }
  5990. // Validate inspects the fields of the type to determine if they are valid.
  5991. func (s *GetBucketLoggingInput) Validate() error {
  5992. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  5993. if s.Bucket == nil {
  5994. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5995. }
  5996. if invalidParams.Len() > 0 {
  5997. return invalidParams
  5998. }
  5999. return nil
  6000. }
  6001. // SetBucket sets the Bucket field's value.
  6002. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  6003. s.Bucket = &v
  6004. return s
  6005. }
  6006. type GetBucketLoggingOutput struct {
  6007. _ struct{} `type:"structure"`
  6008. LoggingEnabled *LoggingEnabled `type:"structure"`
  6009. }
  6010. // String returns the string representation
  6011. func (s GetBucketLoggingOutput) String() string {
  6012. return awsutil.Prettify(s)
  6013. }
  6014. // GoString returns the string representation
  6015. func (s GetBucketLoggingOutput) GoString() string {
  6016. return s.String()
  6017. }
  6018. // SetLoggingEnabled sets the LoggingEnabled field's value.
  6019. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  6020. s.LoggingEnabled = v
  6021. return s
  6022. }
  6023. type GetBucketNotificationConfigurationRequest struct {
  6024. _ struct{} `type:"structure"`
  6025. // Name of the bucket to get the notification configuration for.
  6026. //
  6027. // Bucket is a required field
  6028. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6029. }
  6030. // String returns the string representation
  6031. func (s GetBucketNotificationConfigurationRequest) String() string {
  6032. return awsutil.Prettify(s)
  6033. }
  6034. // GoString returns the string representation
  6035. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  6036. return s.String()
  6037. }
  6038. // Validate inspects the fields of the type to determine if they are valid.
  6039. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  6040. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  6041. if s.Bucket == nil {
  6042. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6043. }
  6044. if invalidParams.Len() > 0 {
  6045. return invalidParams
  6046. }
  6047. return nil
  6048. }
  6049. // SetBucket sets the Bucket field's value.
  6050. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  6051. s.Bucket = &v
  6052. return s
  6053. }
  6054. type GetBucketPolicyInput struct {
  6055. _ struct{} `type:"structure"`
  6056. // Bucket is a required field
  6057. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6058. }
  6059. // String returns the string representation
  6060. func (s GetBucketPolicyInput) String() string {
  6061. return awsutil.Prettify(s)
  6062. }
  6063. // GoString returns the string representation
  6064. func (s GetBucketPolicyInput) GoString() string {
  6065. return s.String()
  6066. }
  6067. // Validate inspects the fields of the type to determine if they are valid.
  6068. func (s *GetBucketPolicyInput) Validate() error {
  6069. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  6070. if s.Bucket == nil {
  6071. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6072. }
  6073. if invalidParams.Len() > 0 {
  6074. return invalidParams
  6075. }
  6076. return nil
  6077. }
  6078. // SetBucket sets the Bucket field's value.
  6079. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  6080. s.Bucket = &v
  6081. return s
  6082. }
  6083. type GetBucketPolicyOutput struct {
  6084. _ struct{} `type:"structure" payload:"Policy"`
  6085. // The bucket policy as a JSON document.
  6086. Policy *string `type:"string"`
  6087. }
  6088. // String returns the string representation
  6089. func (s GetBucketPolicyOutput) String() string {
  6090. return awsutil.Prettify(s)
  6091. }
  6092. // GoString returns the string representation
  6093. func (s GetBucketPolicyOutput) GoString() string {
  6094. return s.String()
  6095. }
  6096. // SetPolicy sets the Policy field's value.
  6097. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  6098. s.Policy = &v
  6099. return s
  6100. }
  6101. type GetBucketReplicationInput struct {
  6102. _ struct{} `type:"structure"`
  6103. // Bucket is a required field
  6104. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6105. }
  6106. // String returns the string representation
  6107. func (s GetBucketReplicationInput) String() string {
  6108. return awsutil.Prettify(s)
  6109. }
  6110. // GoString returns the string representation
  6111. func (s GetBucketReplicationInput) GoString() string {
  6112. return s.String()
  6113. }
  6114. // Validate inspects the fields of the type to determine if they are valid.
  6115. func (s *GetBucketReplicationInput) Validate() error {
  6116. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  6117. if s.Bucket == nil {
  6118. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6119. }
  6120. if invalidParams.Len() > 0 {
  6121. return invalidParams
  6122. }
  6123. return nil
  6124. }
  6125. // SetBucket sets the Bucket field's value.
  6126. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  6127. s.Bucket = &v
  6128. return s
  6129. }
  6130. type GetBucketReplicationOutput struct {
  6131. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  6132. // Container for replication rules. You can add as many as 1,000 rules. Total
  6133. // replication configuration size can be up to 2 MB.
  6134. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  6135. }
  6136. // String returns the string representation
  6137. func (s GetBucketReplicationOutput) String() string {
  6138. return awsutil.Prettify(s)
  6139. }
  6140. // GoString returns the string representation
  6141. func (s GetBucketReplicationOutput) GoString() string {
  6142. return s.String()
  6143. }
  6144. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  6145. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  6146. s.ReplicationConfiguration = v
  6147. return s
  6148. }
  6149. type GetBucketRequestPaymentInput struct {
  6150. _ struct{} `type:"structure"`
  6151. // Bucket is a required field
  6152. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6153. }
  6154. // String returns the string representation
  6155. func (s GetBucketRequestPaymentInput) String() string {
  6156. return awsutil.Prettify(s)
  6157. }
  6158. // GoString returns the string representation
  6159. func (s GetBucketRequestPaymentInput) GoString() string {
  6160. return s.String()
  6161. }
  6162. // Validate inspects the fields of the type to determine if they are valid.
  6163. func (s *GetBucketRequestPaymentInput) Validate() error {
  6164. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  6165. if s.Bucket == nil {
  6166. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6167. }
  6168. if invalidParams.Len() > 0 {
  6169. return invalidParams
  6170. }
  6171. return nil
  6172. }
  6173. // SetBucket sets the Bucket field's value.
  6174. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  6175. s.Bucket = &v
  6176. return s
  6177. }
  6178. type GetBucketRequestPaymentOutput struct {
  6179. _ struct{} `type:"structure"`
  6180. // Specifies who pays for the download and request fees.
  6181. Payer *string `type:"string" enum:"Payer"`
  6182. }
  6183. // String returns the string representation
  6184. func (s GetBucketRequestPaymentOutput) String() string {
  6185. return awsutil.Prettify(s)
  6186. }
  6187. // GoString returns the string representation
  6188. func (s GetBucketRequestPaymentOutput) GoString() string {
  6189. return s.String()
  6190. }
  6191. // SetPayer sets the Payer field's value.
  6192. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  6193. s.Payer = &v
  6194. return s
  6195. }
  6196. type GetBucketTaggingInput struct {
  6197. _ struct{} `type:"structure"`
  6198. // Bucket is a required field
  6199. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6200. }
  6201. // String returns the string representation
  6202. func (s GetBucketTaggingInput) String() string {
  6203. return awsutil.Prettify(s)
  6204. }
  6205. // GoString returns the string representation
  6206. func (s GetBucketTaggingInput) GoString() string {
  6207. return s.String()
  6208. }
  6209. // Validate inspects the fields of the type to determine if they are valid.
  6210. func (s *GetBucketTaggingInput) Validate() error {
  6211. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  6212. if s.Bucket == nil {
  6213. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6214. }
  6215. if invalidParams.Len() > 0 {
  6216. return invalidParams
  6217. }
  6218. return nil
  6219. }
  6220. // SetBucket sets the Bucket field's value.
  6221. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  6222. s.Bucket = &v
  6223. return s
  6224. }
  6225. type GetBucketTaggingOutput struct {
  6226. _ struct{} `type:"structure"`
  6227. // TagSet is a required field
  6228. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  6229. }
  6230. // String returns the string representation
  6231. func (s GetBucketTaggingOutput) String() string {
  6232. return awsutil.Prettify(s)
  6233. }
  6234. // GoString returns the string representation
  6235. func (s GetBucketTaggingOutput) GoString() string {
  6236. return s.String()
  6237. }
  6238. // SetTagSet sets the TagSet field's value.
  6239. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  6240. s.TagSet = v
  6241. return s
  6242. }
  6243. type GetBucketVersioningInput struct {
  6244. _ struct{} `type:"structure"`
  6245. // Bucket is a required field
  6246. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6247. }
  6248. // String returns the string representation
  6249. func (s GetBucketVersioningInput) String() string {
  6250. return awsutil.Prettify(s)
  6251. }
  6252. // GoString returns the string representation
  6253. func (s GetBucketVersioningInput) GoString() string {
  6254. return s.String()
  6255. }
  6256. // Validate inspects the fields of the type to determine if they are valid.
  6257. func (s *GetBucketVersioningInput) Validate() error {
  6258. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  6259. if s.Bucket == nil {
  6260. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6261. }
  6262. if invalidParams.Len() > 0 {
  6263. return invalidParams
  6264. }
  6265. return nil
  6266. }
  6267. // SetBucket sets the Bucket field's value.
  6268. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  6269. s.Bucket = &v
  6270. return s
  6271. }
  6272. type GetBucketVersioningOutput struct {
  6273. _ struct{} `type:"structure"`
  6274. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  6275. // This element is only returned if the bucket has been configured with MFA
  6276. // delete. If the bucket has never been so configured, this element is not returned.
  6277. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  6278. // The versioning state of the bucket.
  6279. Status *string `type:"string" enum:"BucketVersioningStatus"`
  6280. }
  6281. // String returns the string representation
  6282. func (s GetBucketVersioningOutput) String() string {
  6283. return awsutil.Prettify(s)
  6284. }
  6285. // GoString returns the string representation
  6286. func (s GetBucketVersioningOutput) GoString() string {
  6287. return s.String()
  6288. }
  6289. // SetMFADelete sets the MFADelete field's value.
  6290. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  6291. s.MFADelete = &v
  6292. return s
  6293. }
  6294. // SetStatus sets the Status field's value.
  6295. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  6296. s.Status = &v
  6297. return s
  6298. }
  6299. type GetBucketWebsiteInput struct {
  6300. _ struct{} `type:"structure"`
  6301. // Bucket is a required field
  6302. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6303. }
  6304. // String returns the string representation
  6305. func (s GetBucketWebsiteInput) String() string {
  6306. return awsutil.Prettify(s)
  6307. }
  6308. // GoString returns the string representation
  6309. func (s GetBucketWebsiteInput) GoString() string {
  6310. return s.String()
  6311. }
  6312. // Validate inspects the fields of the type to determine if they are valid.
  6313. func (s *GetBucketWebsiteInput) Validate() error {
  6314. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  6315. if s.Bucket == nil {
  6316. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6317. }
  6318. if invalidParams.Len() > 0 {
  6319. return invalidParams
  6320. }
  6321. return nil
  6322. }
  6323. // SetBucket sets the Bucket field's value.
  6324. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  6325. s.Bucket = &v
  6326. return s
  6327. }
  6328. type GetBucketWebsiteOutput struct {
  6329. _ struct{} `type:"structure"`
  6330. ErrorDocument *ErrorDocument `type:"structure"`
  6331. IndexDocument *IndexDocument `type:"structure"`
  6332. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  6333. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  6334. }
  6335. // String returns the string representation
  6336. func (s GetBucketWebsiteOutput) String() string {
  6337. return awsutil.Prettify(s)
  6338. }
  6339. // GoString returns the string representation
  6340. func (s GetBucketWebsiteOutput) GoString() string {
  6341. return s.String()
  6342. }
  6343. // SetErrorDocument sets the ErrorDocument field's value.
  6344. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  6345. s.ErrorDocument = v
  6346. return s
  6347. }
  6348. // SetIndexDocument sets the IndexDocument field's value.
  6349. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  6350. s.IndexDocument = v
  6351. return s
  6352. }
  6353. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  6354. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  6355. s.RedirectAllRequestsTo = v
  6356. return s
  6357. }
  6358. // SetRoutingRules sets the RoutingRules field's value.
  6359. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  6360. s.RoutingRules = v
  6361. return s
  6362. }
  6363. type GetObjectAclInput struct {
  6364. _ struct{} `type:"structure"`
  6365. // Bucket is a required field
  6366. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6367. // Key is a required field
  6368. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6369. // Confirms that the requester knows that she or he will be charged for the
  6370. // request. Bucket owners need not specify this parameter in their requests.
  6371. // Documentation on downloading objects from requester pays buckets can be found
  6372. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6373. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6374. // VersionId used to reference a specific version of the object.
  6375. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  6376. }
  6377. // String returns the string representation
  6378. func (s GetObjectAclInput) String() string {
  6379. return awsutil.Prettify(s)
  6380. }
  6381. // GoString returns the string representation
  6382. func (s GetObjectAclInput) GoString() string {
  6383. return s.String()
  6384. }
  6385. // Validate inspects the fields of the type to determine if they are valid.
  6386. func (s *GetObjectAclInput) Validate() error {
  6387. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  6388. if s.Bucket == nil {
  6389. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6390. }
  6391. if s.Key == nil {
  6392. invalidParams.Add(request.NewErrParamRequired("Key"))
  6393. }
  6394. if s.Key != nil && len(*s.Key) < 1 {
  6395. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6396. }
  6397. if invalidParams.Len() > 0 {
  6398. return invalidParams
  6399. }
  6400. return nil
  6401. }
  6402. // SetBucket sets the Bucket field's value.
  6403. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  6404. s.Bucket = &v
  6405. return s
  6406. }
  6407. // SetKey sets the Key field's value.
  6408. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  6409. s.Key = &v
  6410. return s
  6411. }
  6412. // SetRequestPayer sets the RequestPayer field's value.
  6413. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  6414. s.RequestPayer = &v
  6415. return s
  6416. }
  6417. // SetVersionId sets the VersionId field's value.
  6418. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  6419. s.VersionId = &v
  6420. return s
  6421. }
  6422. type GetObjectAclOutput struct {
  6423. _ struct{} `type:"structure"`
  6424. // A list of grants.
  6425. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  6426. Owner *Owner `type:"structure"`
  6427. // If present, indicates that the requester was successfully charged for the
  6428. // request.
  6429. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6430. }
  6431. // String returns the string representation
  6432. func (s GetObjectAclOutput) String() string {
  6433. return awsutil.Prettify(s)
  6434. }
  6435. // GoString returns the string representation
  6436. func (s GetObjectAclOutput) GoString() string {
  6437. return s.String()
  6438. }
  6439. // SetGrants sets the Grants field's value.
  6440. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  6441. s.Grants = v
  6442. return s
  6443. }
  6444. // SetOwner sets the Owner field's value.
  6445. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  6446. s.Owner = v
  6447. return s
  6448. }
  6449. // SetRequestCharged sets the RequestCharged field's value.
  6450. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  6451. s.RequestCharged = &v
  6452. return s
  6453. }
  6454. type GetObjectInput struct {
  6455. _ struct{} `type:"structure"`
  6456. // Bucket is a required field
  6457. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6458. // Return the object only if its entity tag (ETag) is the same as the one specified,
  6459. // otherwise return a 412 (precondition failed).
  6460. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  6461. // Return the object only if it has been modified since the specified time,
  6462. // otherwise return a 304 (not modified).
  6463. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  6464. // Return the object only if its entity tag (ETag) is different from the one
  6465. // specified, otherwise return a 304 (not modified).
  6466. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  6467. // Return the object only if it has not been modified since the specified time,
  6468. // otherwise return a 412 (precondition failed).
  6469. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  6470. // Key is a required field
  6471. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6472. // Part number of the object being read. This is a positive integer between
  6473. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  6474. // Useful for downloading just a part of an object.
  6475. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  6476. // Downloads the specified range bytes of an object. For more information about
  6477. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  6478. Range *string `location:"header" locationName:"Range" type:"string"`
  6479. // Confirms that the requester knows that she or he will be charged for the
  6480. // request. Bucket owners need not specify this parameter in their requests.
  6481. // Documentation on downloading objects from requester pays buckets can be found
  6482. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6483. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6484. // Sets the Cache-Control header of the response.
  6485. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  6486. // Sets the Content-Disposition header of the response
  6487. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  6488. // Sets the Content-Encoding header of the response.
  6489. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  6490. // Sets the Content-Language header of the response.
  6491. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  6492. // Sets the Content-Type header of the response.
  6493. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  6494. // Sets the Expires header of the response.
  6495. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  6496. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  6497. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6498. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  6499. // data. This value is used to store the object and then it is discarded; Amazon
  6500. // does not store the encryption key. The key must be appropriate for use with
  6501. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  6502. // header.
  6503. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  6504. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6505. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6506. // key was transmitted without error.
  6507. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6508. // VersionId used to reference a specific version of the object.
  6509. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  6510. }
  6511. // String returns the string representation
  6512. func (s GetObjectInput) String() string {
  6513. return awsutil.Prettify(s)
  6514. }
  6515. // GoString returns the string representation
  6516. func (s GetObjectInput) GoString() string {
  6517. return s.String()
  6518. }
  6519. // Validate inspects the fields of the type to determine if they are valid.
  6520. func (s *GetObjectInput) Validate() error {
  6521. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  6522. if s.Bucket == nil {
  6523. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6524. }
  6525. if s.Key == nil {
  6526. invalidParams.Add(request.NewErrParamRequired("Key"))
  6527. }
  6528. if s.Key != nil && len(*s.Key) < 1 {
  6529. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6530. }
  6531. if invalidParams.Len() > 0 {
  6532. return invalidParams
  6533. }
  6534. return nil
  6535. }
  6536. // SetBucket sets the Bucket field's value.
  6537. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  6538. s.Bucket = &v
  6539. return s
  6540. }
  6541. // SetIfMatch sets the IfMatch field's value.
  6542. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  6543. s.IfMatch = &v
  6544. return s
  6545. }
  6546. // SetIfModifiedSince sets the IfModifiedSince field's value.
  6547. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  6548. s.IfModifiedSince = &v
  6549. return s
  6550. }
  6551. // SetIfNoneMatch sets the IfNoneMatch field's value.
  6552. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  6553. s.IfNoneMatch = &v
  6554. return s
  6555. }
  6556. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  6557. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  6558. s.IfUnmodifiedSince = &v
  6559. return s
  6560. }
  6561. // SetKey sets the Key field's value.
  6562. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  6563. s.Key = &v
  6564. return s
  6565. }
  6566. // SetPartNumber sets the PartNumber field's value.
  6567. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  6568. s.PartNumber = &v
  6569. return s
  6570. }
  6571. // SetRange sets the Range field's value.
  6572. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  6573. s.Range = &v
  6574. return s
  6575. }
  6576. // SetRequestPayer sets the RequestPayer field's value.
  6577. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  6578. s.RequestPayer = &v
  6579. return s
  6580. }
  6581. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  6582. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  6583. s.ResponseCacheControl = &v
  6584. return s
  6585. }
  6586. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  6587. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  6588. s.ResponseContentDisposition = &v
  6589. return s
  6590. }
  6591. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  6592. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  6593. s.ResponseContentEncoding = &v
  6594. return s
  6595. }
  6596. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  6597. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  6598. s.ResponseContentLanguage = &v
  6599. return s
  6600. }
  6601. // SetResponseContentType sets the ResponseContentType field's value.
  6602. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  6603. s.ResponseContentType = &v
  6604. return s
  6605. }
  6606. // SetResponseExpires sets the ResponseExpires field's value.
  6607. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  6608. s.ResponseExpires = &v
  6609. return s
  6610. }
  6611. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  6612. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  6613. s.SSECustomerAlgorithm = &v
  6614. return s
  6615. }
  6616. // SetSSECustomerKey sets the SSECustomerKey field's value.
  6617. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  6618. s.SSECustomerKey = &v
  6619. return s
  6620. }
  6621. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  6622. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  6623. s.SSECustomerKeyMD5 = &v
  6624. return s
  6625. }
  6626. // SetVersionId sets the VersionId field's value.
  6627. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  6628. s.VersionId = &v
  6629. return s
  6630. }
  6631. type GetObjectOutput struct {
  6632. _ struct{} `type:"structure" payload:"Body"`
  6633. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  6634. // Object data.
  6635. Body io.ReadCloser `type:"blob"`
  6636. // Specifies caching behavior along the request/reply chain.
  6637. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  6638. // Specifies presentational information for the object.
  6639. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  6640. // Specifies what content encodings have been applied to the object and thus
  6641. // what decoding mechanisms must be applied to obtain the media-type referenced
  6642. // by the Content-Type header field.
  6643. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  6644. // The language the content is in.
  6645. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  6646. // Size of the body in bytes.
  6647. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  6648. // The portion of the object returned in the response.
  6649. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  6650. // A standard MIME type describing the format of the object data.
  6651. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  6652. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  6653. // Marker. If false, this response header does not appear in the response.
  6654. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  6655. // An ETag is an opaque identifier assigned by a web server to a specific version
  6656. // of a resource found at a URL
  6657. ETag *string `location:"header" locationName:"ETag" type:"string"`
  6658. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  6659. // includes this header. It includes the expiry-date and rule-id key value pairs
  6660. // providing object expiration information. The value of the rule-id is URL
  6661. // encoded.
  6662. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6663. // The date and time at which the object is no longer cacheable.
  6664. Expires *string `location:"header" locationName:"Expires" type:"string"`
  6665. // Last modified date of the object
  6666. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  6667. // A map of metadata to store with the object in S3.
  6668. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  6669. // This is set to the number of metadata entries not returned in x-amz-meta
  6670. // headers. This can happen if you create metadata using an API like SOAP that
  6671. // supports more flexible metadata than the REST API. For example, using SOAP,
  6672. // you can create metadata whose values are not legal HTTP headers.
  6673. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  6674. // The count of parts this object has.
  6675. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  6676. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  6677. // If present, indicates that the requester was successfully charged for the
  6678. // request.
  6679. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6680. // Provides information about object restoration operation and expiration time
  6681. // of the restored object copy.
  6682. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  6683. // If server-side encryption with a customer-provided encryption key was requested,
  6684. // the response will include this header confirming the encryption algorithm
  6685. // used.
  6686. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6687. // If server-side encryption with a customer-provided encryption key was requested,
  6688. // the response will include this header to provide round trip message integrity
  6689. // verification of the customer-provided encryption key.
  6690. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6691. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6692. // encryption key that was used for the object.
  6693. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6694. // The Server-side encryption algorithm used when storing this object in S3
  6695. // (e.g., AES256, aws:kms).
  6696. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6697. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  6698. // Version of the object.
  6699. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6700. // If the bucket is configured as a website, redirects requests for this object
  6701. // to another object in the same bucket or to an external URL. Amazon S3 stores
  6702. // the value of this header in the object metadata.
  6703. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  6704. }
  6705. // String returns the string representation
  6706. func (s GetObjectOutput) String() string {
  6707. return awsutil.Prettify(s)
  6708. }
  6709. // GoString returns the string representation
  6710. func (s GetObjectOutput) GoString() string {
  6711. return s.String()
  6712. }
  6713. // SetAcceptRanges sets the AcceptRanges field's value.
  6714. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  6715. s.AcceptRanges = &v
  6716. return s
  6717. }
  6718. // SetBody sets the Body field's value.
  6719. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  6720. s.Body = v
  6721. return s
  6722. }
  6723. // SetCacheControl sets the CacheControl field's value.
  6724. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  6725. s.CacheControl = &v
  6726. return s
  6727. }
  6728. // SetContentDisposition sets the ContentDisposition field's value.
  6729. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  6730. s.ContentDisposition = &v
  6731. return s
  6732. }
  6733. // SetContentEncoding sets the ContentEncoding field's value.
  6734. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  6735. s.ContentEncoding = &v
  6736. return s
  6737. }
  6738. // SetContentLanguage sets the ContentLanguage field's value.
  6739. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  6740. s.ContentLanguage = &v
  6741. return s
  6742. }
  6743. // SetContentLength sets the ContentLength field's value.
  6744. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  6745. s.ContentLength = &v
  6746. return s
  6747. }
  6748. // SetContentRange sets the ContentRange field's value.
  6749. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  6750. s.ContentRange = &v
  6751. return s
  6752. }
  6753. // SetContentType sets the ContentType field's value.
  6754. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  6755. s.ContentType = &v
  6756. return s
  6757. }
  6758. // SetDeleteMarker sets the DeleteMarker field's value.
  6759. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  6760. s.DeleteMarker = &v
  6761. return s
  6762. }
  6763. // SetETag sets the ETag field's value.
  6764. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  6765. s.ETag = &v
  6766. return s
  6767. }
  6768. // SetExpiration sets the Expiration field's value.
  6769. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  6770. s.Expiration = &v
  6771. return s
  6772. }
  6773. // SetExpires sets the Expires field's value.
  6774. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  6775. s.Expires = &v
  6776. return s
  6777. }
  6778. // SetLastModified sets the LastModified field's value.
  6779. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  6780. s.LastModified = &v
  6781. return s
  6782. }
  6783. // SetMetadata sets the Metadata field's value.
  6784. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  6785. s.Metadata = v
  6786. return s
  6787. }
  6788. // SetMissingMeta sets the MissingMeta field's value.
  6789. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  6790. s.MissingMeta = &v
  6791. return s
  6792. }
  6793. // SetPartsCount sets the PartsCount field's value.
  6794. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  6795. s.PartsCount = &v
  6796. return s
  6797. }
  6798. // SetReplicationStatus sets the ReplicationStatus field's value.
  6799. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  6800. s.ReplicationStatus = &v
  6801. return s
  6802. }
  6803. // SetRequestCharged sets the RequestCharged field's value.
  6804. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  6805. s.RequestCharged = &v
  6806. return s
  6807. }
  6808. // SetRestore sets the Restore field's value.
  6809. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  6810. s.Restore = &v
  6811. return s
  6812. }
  6813. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  6814. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  6815. s.SSECustomerAlgorithm = &v
  6816. return s
  6817. }
  6818. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  6819. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  6820. s.SSECustomerKeyMD5 = &v
  6821. return s
  6822. }
  6823. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6824. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  6825. s.SSEKMSKeyId = &v
  6826. return s
  6827. }
  6828. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6829. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  6830. s.ServerSideEncryption = &v
  6831. return s
  6832. }
  6833. // SetStorageClass sets the StorageClass field's value.
  6834. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  6835. s.StorageClass = &v
  6836. return s
  6837. }
  6838. // SetVersionId sets the VersionId field's value.
  6839. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  6840. s.VersionId = &v
  6841. return s
  6842. }
  6843. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  6844. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  6845. s.WebsiteRedirectLocation = &v
  6846. return s
  6847. }
  6848. type GetObjectTorrentInput struct {
  6849. _ struct{} `type:"structure"`
  6850. // Bucket is a required field
  6851. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6852. // Key is a required field
  6853. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6854. // Confirms that the requester knows that she or he will be charged for the
  6855. // request. Bucket owners need not specify this parameter in their requests.
  6856. // Documentation on downloading objects from requester pays buckets can be found
  6857. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6858. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6859. }
  6860. // String returns the string representation
  6861. func (s GetObjectTorrentInput) String() string {
  6862. return awsutil.Prettify(s)
  6863. }
  6864. // GoString returns the string representation
  6865. func (s GetObjectTorrentInput) GoString() string {
  6866. return s.String()
  6867. }
  6868. // Validate inspects the fields of the type to determine if they are valid.
  6869. func (s *GetObjectTorrentInput) Validate() error {
  6870. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  6871. if s.Bucket == nil {
  6872. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6873. }
  6874. if s.Key == nil {
  6875. invalidParams.Add(request.NewErrParamRequired("Key"))
  6876. }
  6877. if s.Key != nil && len(*s.Key) < 1 {
  6878. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6879. }
  6880. if invalidParams.Len() > 0 {
  6881. return invalidParams
  6882. }
  6883. return nil
  6884. }
  6885. // SetBucket sets the Bucket field's value.
  6886. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  6887. s.Bucket = &v
  6888. return s
  6889. }
  6890. // SetKey sets the Key field's value.
  6891. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  6892. s.Key = &v
  6893. return s
  6894. }
  6895. // SetRequestPayer sets the RequestPayer field's value.
  6896. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  6897. s.RequestPayer = &v
  6898. return s
  6899. }
  6900. type GetObjectTorrentOutput struct {
  6901. _ struct{} `type:"structure" payload:"Body"`
  6902. Body io.ReadCloser `type:"blob"`
  6903. // If present, indicates that the requester was successfully charged for the
  6904. // request.
  6905. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6906. }
  6907. // String returns the string representation
  6908. func (s GetObjectTorrentOutput) String() string {
  6909. return awsutil.Prettify(s)
  6910. }
  6911. // GoString returns the string representation
  6912. func (s GetObjectTorrentOutput) GoString() string {
  6913. return s.String()
  6914. }
  6915. // SetBody sets the Body field's value.
  6916. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  6917. s.Body = v
  6918. return s
  6919. }
  6920. // SetRequestCharged sets the RequestCharged field's value.
  6921. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  6922. s.RequestCharged = &v
  6923. return s
  6924. }
  6925. type Grant struct {
  6926. _ struct{} `type:"structure"`
  6927. Grantee *Grantee `type:"structure"`
  6928. // Specifies the permission given to the grantee.
  6929. Permission *string `type:"string" enum:"Permission"`
  6930. }
  6931. // String returns the string representation
  6932. func (s Grant) String() string {
  6933. return awsutil.Prettify(s)
  6934. }
  6935. // GoString returns the string representation
  6936. func (s Grant) GoString() string {
  6937. return s.String()
  6938. }
  6939. // Validate inspects the fields of the type to determine if they are valid.
  6940. func (s *Grant) Validate() error {
  6941. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  6942. if s.Grantee != nil {
  6943. if err := s.Grantee.Validate(); err != nil {
  6944. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  6945. }
  6946. }
  6947. if invalidParams.Len() > 0 {
  6948. return invalidParams
  6949. }
  6950. return nil
  6951. }
  6952. // SetGrantee sets the Grantee field's value.
  6953. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  6954. s.Grantee = v
  6955. return s
  6956. }
  6957. // SetPermission sets the Permission field's value.
  6958. func (s *Grant) SetPermission(v string) *Grant {
  6959. s.Permission = &v
  6960. return s
  6961. }
  6962. type Grantee struct {
  6963. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  6964. // Screen name of the grantee.
  6965. DisplayName *string `type:"string"`
  6966. // Email address of the grantee.
  6967. EmailAddress *string `type:"string"`
  6968. // The canonical user ID of the grantee.
  6969. ID *string `type:"string"`
  6970. // Type of grantee
  6971. //
  6972. // Type is a required field
  6973. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  6974. // URI of the grantee group.
  6975. URI *string `type:"string"`
  6976. }
  6977. // String returns the string representation
  6978. func (s Grantee) String() string {
  6979. return awsutil.Prettify(s)
  6980. }
  6981. // GoString returns the string representation
  6982. func (s Grantee) GoString() string {
  6983. return s.String()
  6984. }
  6985. // Validate inspects the fields of the type to determine if they are valid.
  6986. func (s *Grantee) Validate() error {
  6987. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  6988. if s.Type == nil {
  6989. invalidParams.Add(request.NewErrParamRequired("Type"))
  6990. }
  6991. if invalidParams.Len() > 0 {
  6992. return invalidParams
  6993. }
  6994. return nil
  6995. }
  6996. // SetDisplayName sets the DisplayName field's value.
  6997. func (s *Grantee) SetDisplayName(v string) *Grantee {
  6998. s.DisplayName = &v
  6999. return s
  7000. }
  7001. // SetEmailAddress sets the EmailAddress field's value.
  7002. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  7003. s.EmailAddress = &v
  7004. return s
  7005. }
  7006. // SetID sets the ID field's value.
  7007. func (s *Grantee) SetID(v string) *Grantee {
  7008. s.ID = &v
  7009. return s
  7010. }
  7011. // SetType sets the Type field's value.
  7012. func (s *Grantee) SetType(v string) *Grantee {
  7013. s.Type = &v
  7014. return s
  7015. }
  7016. // SetURI sets the URI field's value.
  7017. func (s *Grantee) SetURI(v string) *Grantee {
  7018. s.URI = &v
  7019. return s
  7020. }
  7021. type HeadBucketInput struct {
  7022. _ struct{} `type:"structure"`
  7023. // Bucket is a required field
  7024. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7025. }
  7026. // String returns the string representation
  7027. func (s HeadBucketInput) String() string {
  7028. return awsutil.Prettify(s)
  7029. }
  7030. // GoString returns the string representation
  7031. func (s HeadBucketInput) GoString() string {
  7032. return s.String()
  7033. }
  7034. // Validate inspects the fields of the type to determine if they are valid.
  7035. func (s *HeadBucketInput) Validate() error {
  7036. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  7037. if s.Bucket == nil {
  7038. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7039. }
  7040. if invalidParams.Len() > 0 {
  7041. return invalidParams
  7042. }
  7043. return nil
  7044. }
  7045. // SetBucket sets the Bucket field's value.
  7046. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  7047. s.Bucket = &v
  7048. return s
  7049. }
  7050. type HeadBucketOutput struct {
  7051. _ struct{} `type:"structure"`
  7052. }
  7053. // String returns the string representation
  7054. func (s HeadBucketOutput) String() string {
  7055. return awsutil.Prettify(s)
  7056. }
  7057. // GoString returns the string representation
  7058. func (s HeadBucketOutput) GoString() string {
  7059. return s.String()
  7060. }
  7061. type HeadObjectInput struct {
  7062. _ struct{} `type:"structure"`
  7063. // Bucket is a required field
  7064. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7065. // Return the object only if its entity tag (ETag) is the same as the one specified,
  7066. // otherwise return a 412 (precondition failed).
  7067. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  7068. // Return the object only if it has been modified since the specified time,
  7069. // otherwise return a 304 (not modified).
  7070. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  7071. // Return the object only if its entity tag (ETag) is different from the one
  7072. // specified, otherwise return a 304 (not modified).
  7073. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  7074. // Return the object only if it has not been modified since the specified time,
  7075. // otherwise return a 412 (precondition failed).
  7076. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  7077. // Key is a required field
  7078. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7079. // Part number of the object being read. This is a positive integer between
  7080. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  7081. // Useful querying about the size of the part and the number of parts in this
  7082. // object.
  7083. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  7084. // Downloads the specified range bytes of an object. For more information about
  7085. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  7086. Range *string `location:"header" locationName:"Range" type:"string"`
  7087. // Confirms that the requester knows that she or he will be charged for the
  7088. // request. Bucket owners need not specify this parameter in their requests.
  7089. // Documentation on downloading objects from requester pays buckets can be found
  7090. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7091. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7092. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7093. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7094. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7095. // data. This value is used to store the object and then it is discarded; Amazon
  7096. // does not store the encryption key. The key must be appropriate for use with
  7097. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7098. // header.
  7099. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7100. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7101. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7102. // key was transmitted without error.
  7103. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7104. // VersionId used to reference a specific version of the object.
  7105. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  7106. }
  7107. // String returns the string representation
  7108. func (s HeadObjectInput) String() string {
  7109. return awsutil.Prettify(s)
  7110. }
  7111. // GoString returns the string representation
  7112. func (s HeadObjectInput) GoString() string {
  7113. return s.String()
  7114. }
  7115. // Validate inspects the fields of the type to determine if they are valid.
  7116. func (s *HeadObjectInput) Validate() error {
  7117. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  7118. if s.Bucket == nil {
  7119. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7120. }
  7121. if s.Key == nil {
  7122. invalidParams.Add(request.NewErrParamRequired("Key"))
  7123. }
  7124. if s.Key != nil && len(*s.Key) < 1 {
  7125. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7126. }
  7127. if invalidParams.Len() > 0 {
  7128. return invalidParams
  7129. }
  7130. return nil
  7131. }
  7132. // SetBucket sets the Bucket field's value.
  7133. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  7134. s.Bucket = &v
  7135. return s
  7136. }
  7137. // SetIfMatch sets the IfMatch field's value.
  7138. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  7139. s.IfMatch = &v
  7140. return s
  7141. }
  7142. // SetIfModifiedSince sets the IfModifiedSince field's value.
  7143. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  7144. s.IfModifiedSince = &v
  7145. return s
  7146. }
  7147. // SetIfNoneMatch sets the IfNoneMatch field's value.
  7148. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  7149. s.IfNoneMatch = &v
  7150. return s
  7151. }
  7152. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  7153. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  7154. s.IfUnmodifiedSince = &v
  7155. return s
  7156. }
  7157. // SetKey sets the Key field's value.
  7158. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  7159. s.Key = &v
  7160. return s
  7161. }
  7162. // SetPartNumber sets the PartNumber field's value.
  7163. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  7164. s.PartNumber = &v
  7165. return s
  7166. }
  7167. // SetRange sets the Range field's value.
  7168. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  7169. s.Range = &v
  7170. return s
  7171. }
  7172. // SetRequestPayer sets the RequestPayer field's value.
  7173. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  7174. s.RequestPayer = &v
  7175. return s
  7176. }
  7177. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7178. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  7179. s.SSECustomerAlgorithm = &v
  7180. return s
  7181. }
  7182. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7183. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  7184. s.SSECustomerKey = &v
  7185. return s
  7186. }
  7187. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7188. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  7189. s.SSECustomerKeyMD5 = &v
  7190. return s
  7191. }
  7192. // SetVersionId sets the VersionId field's value.
  7193. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  7194. s.VersionId = &v
  7195. return s
  7196. }
  7197. type HeadObjectOutput struct {
  7198. _ struct{} `type:"structure"`
  7199. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  7200. // Specifies caching behavior along the request/reply chain.
  7201. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7202. // Specifies presentational information for the object.
  7203. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7204. // Specifies what content encodings have been applied to the object and thus
  7205. // what decoding mechanisms must be applied to obtain the media-type referenced
  7206. // by the Content-Type header field.
  7207. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7208. // The language the content is in.
  7209. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7210. // Size of the body in bytes.
  7211. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  7212. // A standard MIME type describing the format of the object data.
  7213. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7214. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  7215. // Marker. If false, this response header does not appear in the response.
  7216. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  7217. // An ETag is an opaque identifier assigned by a web server to a specific version
  7218. // of a resource found at a URL
  7219. ETag *string `location:"header" locationName:"ETag" type:"string"`
  7220. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  7221. // includes this header. It includes the expiry-date and rule-id key value pairs
  7222. // providing object expiration information. The value of the rule-id is URL
  7223. // encoded.
  7224. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7225. // The date and time at which the object is no longer cacheable.
  7226. Expires *string `location:"header" locationName:"Expires" type:"string"`
  7227. // Last modified date of the object
  7228. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  7229. // A map of metadata to store with the object in S3.
  7230. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7231. // This is set to the number of metadata entries not returned in x-amz-meta
  7232. // headers. This can happen if you create metadata using an API like SOAP that
  7233. // supports more flexible metadata than the REST API. For example, using SOAP,
  7234. // you can create metadata whose values are not legal HTTP headers.
  7235. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  7236. // The count of parts this object has.
  7237. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  7238. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  7239. // If present, indicates that the requester was successfully charged for the
  7240. // request.
  7241. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7242. // Provides information about object restoration operation and expiration time
  7243. // of the restored object copy.
  7244. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  7245. // If server-side encryption with a customer-provided encryption key was requested,
  7246. // the response will include this header confirming the encryption algorithm
  7247. // used.
  7248. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7249. // If server-side encryption with a customer-provided encryption key was requested,
  7250. // the response will include this header to provide round trip message integrity
  7251. // verification of the customer-provided encryption key.
  7252. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7253. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7254. // encryption key that was used for the object.
  7255. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7256. // The Server-side encryption algorithm used when storing this object in S3
  7257. // (e.g., AES256, aws:kms).
  7258. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7259. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7260. // Version of the object.
  7261. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7262. // If the bucket is configured as a website, redirects requests for this object
  7263. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7264. // the value of this header in the object metadata.
  7265. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7266. }
  7267. // String returns the string representation
  7268. func (s HeadObjectOutput) String() string {
  7269. return awsutil.Prettify(s)
  7270. }
  7271. // GoString returns the string representation
  7272. func (s HeadObjectOutput) GoString() string {
  7273. return s.String()
  7274. }
  7275. // SetAcceptRanges sets the AcceptRanges field's value.
  7276. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  7277. s.AcceptRanges = &v
  7278. return s
  7279. }
  7280. // SetCacheControl sets the CacheControl field's value.
  7281. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  7282. s.CacheControl = &v
  7283. return s
  7284. }
  7285. // SetContentDisposition sets the ContentDisposition field's value.
  7286. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  7287. s.ContentDisposition = &v
  7288. return s
  7289. }
  7290. // SetContentEncoding sets the ContentEncoding field's value.
  7291. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  7292. s.ContentEncoding = &v
  7293. return s
  7294. }
  7295. // SetContentLanguage sets the ContentLanguage field's value.
  7296. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  7297. s.ContentLanguage = &v
  7298. return s
  7299. }
  7300. // SetContentLength sets the ContentLength field's value.
  7301. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  7302. s.ContentLength = &v
  7303. return s
  7304. }
  7305. // SetContentType sets the ContentType field's value.
  7306. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  7307. s.ContentType = &v
  7308. return s
  7309. }
  7310. // SetDeleteMarker sets the DeleteMarker field's value.
  7311. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  7312. s.DeleteMarker = &v
  7313. return s
  7314. }
  7315. // SetETag sets the ETag field's value.
  7316. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  7317. s.ETag = &v
  7318. return s
  7319. }
  7320. // SetExpiration sets the Expiration field's value.
  7321. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  7322. s.Expiration = &v
  7323. return s
  7324. }
  7325. // SetExpires sets the Expires field's value.
  7326. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  7327. s.Expires = &v
  7328. return s
  7329. }
  7330. // SetLastModified sets the LastModified field's value.
  7331. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  7332. s.LastModified = &v
  7333. return s
  7334. }
  7335. // SetMetadata sets the Metadata field's value.
  7336. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  7337. s.Metadata = v
  7338. return s
  7339. }
  7340. // SetMissingMeta sets the MissingMeta field's value.
  7341. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  7342. s.MissingMeta = &v
  7343. return s
  7344. }
  7345. // SetPartsCount sets the PartsCount field's value.
  7346. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  7347. s.PartsCount = &v
  7348. return s
  7349. }
  7350. // SetReplicationStatus sets the ReplicationStatus field's value.
  7351. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  7352. s.ReplicationStatus = &v
  7353. return s
  7354. }
  7355. // SetRequestCharged sets the RequestCharged field's value.
  7356. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  7357. s.RequestCharged = &v
  7358. return s
  7359. }
  7360. // SetRestore sets the Restore field's value.
  7361. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  7362. s.Restore = &v
  7363. return s
  7364. }
  7365. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7366. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  7367. s.SSECustomerAlgorithm = &v
  7368. return s
  7369. }
  7370. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7371. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  7372. s.SSECustomerKeyMD5 = &v
  7373. return s
  7374. }
  7375. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7376. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  7377. s.SSEKMSKeyId = &v
  7378. return s
  7379. }
  7380. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7381. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  7382. s.ServerSideEncryption = &v
  7383. return s
  7384. }
  7385. // SetStorageClass sets the StorageClass field's value.
  7386. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  7387. s.StorageClass = &v
  7388. return s
  7389. }
  7390. // SetVersionId sets the VersionId field's value.
  7391. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  7392. s.VersionId = &v
  7393. return s
  7394. }
  7395. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7396. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  7397. s.WebsiteRedirectLocation = &v
  7398. return s
  7399. }
  7400. type IndexDocument struct {
  7401. _ struct{} `type:"structure"`
  7402. // A suffix that is appended to a request that is for a directory on the website
  7403. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  7404. // the data that is returned will be for the object with the key name images/index.html)
  7405. // The suffix must not be empty and must not include a slash character.
  7406. //
  7407. // Suffix is a required field
  7408. Suffix *string `type:"string" required:"true"`
  7409. }
  7410. // String returns the string representation
  7411. func (s IndexDocument) String() string {
  7412. return awsutil.Prettify(s)
  7413. }
  7414. // GoString returns the string representation
  7415. func (s IndexDocument) GoString() string {
  7416. return s.String()
  7417. }
  7418. // Validate inspects the fields of the type to determine if they are valid.
  7419. func (s *IndexDocument) Validate() error {
  7420. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  7421. if s.Suffix == nil {
  7422. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  7423. }
  7424. if invalidParams.Len() > 0 {
  7425. return invalidParams
  7426. }
  7427. return nil
  7428. }
  7429. // SetSuffix sets the Suffix field's value.
  7430. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  7431. s.Suffix = &v
  7432. return s
  7433. }
  7434. type Initiator struct {
  7435. _ struct{} `type:"structure"`
  7436. // Name of the Principal.
  7437. DisplayName *string `type:"string"`
  7438. // If the principal is an AWS account, it provides the Canonical User ID. If
  7439. // the principal is an IAM User, it provides a user ARN value.
  7440. ID *string `type:"string"`
  7441. }
  7442. // String returns the string representation
  7443. func (s Initiator) String() string {
  7444. return awsutil.Prettify(s)
  7445. }
  7446. // GoString returns the string representation
  7447. func (s Initiator) GoString() string {
  7448. return s.String()
  7449. }
  7450. // SetDisplayName sets the DisplayName field's value.
  7451. func (s *Initiator) SetDisplayName(v string) *Initiator {
  7452. s.DisplayName = &v
  7453. return s
  7454. }
  7455. // SetID sets the ID field's value.
  7456. func (s *Initiator) SetID(v string) *Initiator {
  7457. s.ID = &v
  7458. return s
  7459. }
  7460. // Container for object key name prefix and suffix filtering rules.
  7461. type KeyFilter struct {
  7462. _ struct{} `type:"structure"`
  7463. // A list of containers for key value pair that defines the criteria for the
  7464. // filter rule.
  7465. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  7466. }
  7467. // String returns the string representation
  7468. func (s KeyFilter) String() string {
  7469. return awsutil.Prettify(s)
  7470. }
  7471. // GoString returns the string representation
  7472. func (s KeyFilter) GoString() string {
  7473. return s.String()
  7474. }
  7475. // SetFilterRules sets the FilterRules field's value.
  7476. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  7477. s.FilterRules = v
  7478. return s
  7479. }
  7480. // Container for specifying the AWS Lambda notification configuration.
  7481. type LambdaFunctionConfiguration struct {
  7482. _ struct{} `type:"structure"`
  7483. // Events is a required field
  7484. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  7485. // Container for object key name filtering rules. For information about key
  7486. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  7487. Filter *NotificationConfigurationFilter `type:"structure"`
  7488. // Optional unique identifier for configurations in a notification configuration.
  7489. // If you don't provide one, Amazon S3 will assign an ID.
  7490. Id *string `type:"string"`
  7491. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  7492. // of the specified type.
  7493. //
  7494. // LambdaFunctionArn is a required field
  7495. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  7496. }
  7497. // String returns the string representation
  7498. func (s LambdaFunctionConfiguration) String() string {
  7499. return awsutil.Prettify(s)
  7500. }
  7501. // GoString returns the string representation
  7502. func (s LambdaFunctionConfiguration) GoString() string {
  7503. return s.String()
  7504. }
  7505. // Validate inspects the fields of the type to determine if they are valid.
  7506. func (s *LambdaFunctionConfiguration) Validate() error {
  7507. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  7508. if s.Events == nil {
  7509. invalidParams.Add(request.NewErrParamRequired("Events"))
  7510. }
  7511. if s.LambdaFunctionArn == nil {
  7512. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  7513. }
  7514. if invalidParams.Len() > 0 {
  7515. return invalidParams
  7516. }
  7517. return nil
  7518. }
  7519. // SetEvents sets the Events field's value.
  7520. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  7521. s.Events = v
  7522. return s
  7523. }
  7524. // SetFilter sets the Filter field's value.
  7525. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  7526. s.Filter = v
  7527. return s
  7528. }
  7529. // SetId sets the Id field's value.
  7530. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  7531. s.Id = &v
  7532. return s
  7533. }
  7534. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  7535. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  7536. s.LambdaFunctionArn = &v
  7537. return s
  7538. }
  7539. type LifecycleConfiguration struct {
  7540. _ struct{} `type:"structure"`
  7541. // Rules is a required field
  7542. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  7543. }
  7544. // String returns the string representation
  7545. func (s LifecycleConfiguration) String() string {
  7546. return awsutil.Prettify(s)
  7547. }
  7548. // GoString returns the string representation
  7549. func (s LifecycleConfiguration) GoString() string {
  7550. return s.String()
  7551. }
  7552. // Validate inspects the fields of the type to determine if they are valid.
  7553. func (s *LifecycleConfiguration) Validate() error {
  7554. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  7555. if s.Rules == nil {
  7556. invalidParams.Add(request.NewErrParamRequired("Rules"))
  7557. }
  7558. if s.Rules != nil {
  7559. for i, v := range s.Rules {
  7560. if v == nil {
  7561. continue
  7562. }
  7563. if err := v.Validate(); err != nil {
  7564. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  7565. }
  7566. }
  7567. }
  7568. if invalidParams.Len() > 0 {
  7569. return invalidParams
  7570. }
  7571. return nil
  7572. }
  7573. // SetRules sets the Rules field's value.
  7574. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  7575. s.Rules = v
  7576. return s
  7577. }
  7578. type LifecycleExpiration struct {
  7579. _ struct{} `type:"structure"`
  7580. // Indicates at what date the object is to be moved or deleted. Should be in
  7581. // GMT ISO 8601 Format.
  7582. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7583. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  7584. // The value must be a non-zero positive integer.
  7585. Days *int64 `type:"integer"`
  7586. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  7587. // versions. If set to true, the delete marker will be expired; if set to false
  7588. // the policy takes no action. This cannot be specified with Days or Date in
  7589. // a Lifecycle Expiration Policy.
  7590. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  7591. }
  7592. // String returns the string representation
  7593. func (s LifecycleExpiration) String() string {
  7594. return awsutil.Prettify(s)
  7595. }
  7596. // GoString returns the string representation
  7597. func (s LifecycleExpiration) GoString() string {
  7598. return s.String()
  7599. }
  7600. // SetDate sets the Date field's value.
  7601. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  7602. s.Date = &v
  7603. return s
  7604. }
  7605. // SetDays sets the Days field's value.
  7606. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  7607. s.Days = &v
  7608. return s
  7609. }
  7610. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  7611. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  7612. s.ExpiredObjectDeleteMarker = &v
  7613. return s
  7614. }
  7615. type LifecycleRule struct {
  7616. _ struct{} `type:"structure"`
  7617. // Specifies the days since the initiation of an Incomplete Multipart Upload
  7618. // that Lifecycle will wait before permanently removing all parts of the upload.
  7619. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  7620. Expiration *LifecycleExpiration `type:"structure"`
  7621. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  7622. ID *string `type:"string"`
  7623. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  7624. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  7625. // configuration action on a bucket that has versioning enabled (or suspended)
  7626. // to request that Amazon S3 delete noncurrent object versions at a specific
  7627. // period in the object's lifetime.
  7628. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  7629. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  7630. // Prefix identifying one or more objects to which the rule applies.
  7631. //
  7632. // Prefix is a required field
  7633. Prefix *string `type:"string" required:"true"`
  7634. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  7635. // is not currently being applied.
  7636. //
  7637. // Status is a required field
  7638. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  7639. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  7640. }
  7641. // String returns the string representation
  7642. func (s LifecycleRule) String() string {
  7643. return awsutil.Prettify(s)
  7644. }
  7645. // GoString returns the string representation
  7646. func (s LifecycleRule) GoString() string {
  7647. return s.String()
  7648. }
  7649. // Validate inspects the fields of the type to determine if they are valid.
  7650. func (s *LifecycleRule) Validate() error {
  7651. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  7652. if s.Prefix == nil {
  7653. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  7654. }
  7655. if s.Status == nil {
  7656. invalidParams.Add(request.NewErrParamRequired("Status"))
  7657. }
  7658. if invalidParams.Len() > 0 {
  7659. return invalidParams
  7660. }
  7661. return nil
  7662. }
  7663. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  7664. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  7665. s.AbortIncompleteMultipartUpload = v
  7666. return s
  7667. }
  7668. // SetExpiration sets the Expiration field's value.
  7669. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  7670. s.Expiration = v
  7671. return s
  7672. }
  7673. // SetID sets the ID field's value.
  7674. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  7675. s.ID = &v
  7676. return s
  7677. }
  7678. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  7679. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  7680. s.NoncurrentVersionExpiration = v
  7681. return s
  7682. }
  7683. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  7684. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  7685. s.NoncurrentVersionTransitions = v
  7686. return s
  7687. }
  7688. // SetPrefix sets the Prefix field's value.
  7689. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  7690. s.Prefix = &v
  7691. return s
  7692. }
  7693. // SetStatus sets the Status field's value.
  7694. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  7695. s.Status = &v
  7696. return s
  7697. }
  7698. // SetTransitions sets the Transitions field's value.
  7699. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  7700. s.Transitions = v
  7701. return s
  7702. }
  7703. type ListBucketsInput struct {
  7704. _ struct{} `type:"structure"`
  7705. }
  7706. // String returns the string representation
  7707. func (s ListBucketsInput) String() string {
  7708. return awsutil.Prettify(s)
  7709. }
  7710. // GoString returns the string representation
  7711. func (s ListBucketsInput) GoString() string {
  7712. return s.String()
  7713. }
  7714. type ListBucketsOutput struct {
  7715. _ struct{} `type:"structure"`
  7716. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  7717. Owner *Owner `type:"structure"`
  7718. }
  7719. // String returns the string representation
  7720. func (s ListBucketsOutput) String() string {
  7721. return awsutil.Prettify(s)
  7722. }
  7723. // GoString returns the string representation
  7724. func (s ListBucketsOutput) GoString() string {
  7725. return s.String()
  7726. }
  7727. // SetBuckets sets the Buckets field's value.
  7728. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  7729. s.Buckets = v
  7730. return s
  7731. }
  7732. // SetOwner sets the Owner field's value.
  7733. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  7734. s.Owner = v
  7735. return s
  7736. }
  7737. type ListMultipartUploadsInput struct {
  7738. _ struct{} `type:"structure"`
  7739. // Bucket is a required field
  7740. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7741. // Character you use to group keys.
  7742. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  7743. // Requests Amazon S3 to encode the object keys in the response and specifies
  7744. // the encoding method to use. An object key may contain any Unicode character;
  7745. // however, XML 1.0 parser cannot parse some characters, such as characters
  7746. // with an ASCII value from 0 to 10. For characters that are not supported in
  7747. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  7748. // keys in the response.
  7749. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  7750. // Together with upload-id-marker, this parameter specifies the multipart upload
  7751. // after which listing should begin.
  7752. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  7753. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  7754. // in the response body. 1,000 is the maximum number of uploads that can be
  7755. // returned in a response.
  7756. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  7757. // Lists in-progress uploads only for those keys that begin with the specified
  7758. // prefix.
  7759. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  7760. // Together with key-marker, specifies the multipart upload after which listing
  7761. // should begin. If key-marker is not specified, the upload-id-marker parameter
  7762. // is ignored.
  7763. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  7764. }
  7765. // String returns the string representation
  7766. func (s ListMultipartUploadsInput) String() string {
  7767. return awsutil.Prettify(s)
  7768. }
  7769. // GoString returns the string representation
  7770. func (s ListMultipartUploadsInput) GoString() string {
  7771. return s.String()
  7772. }
  7773. // Validate inspects the fields of the type to determine if they are valid.
  7774. func (s *ListMultipartUploadsInput) Validate() error {
  7775. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  7776. if s.Bucket == nil {
  7777. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7778. }
  7779. if invalidParams.Len() > 0 {
  7780. return invalidParams
  7781. }
  7782. return nil
  7783. }
  7784. // SetBucket sets the Bucket field's value.
  7785. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  7786. s.Bucket = &v
  7787. return s
  7788. }
  7789. // SetDelimiter sets the Delimiter field's value.
  7790. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  7791. s.Delimiter = &v
  7792. return s
  7793. }
  7794. // SetEncodingType sets the EncodingType field's value.
  7795. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  7796. s.EncodingType = &v
  7797. return s
  7798. }
  7799. // SetKeyMarker sets the KeyMarker field's value.
  7800. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  7801. s.KeyMarker = &v
  7802. return s
  7803. }
  7804. // SetMaxUploads sets the MaxUploads field's value.
  7805. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  7806. s.MaxUploads = &v
  7807. return s
  7808. }
  7809. // SetPrefix sets the Prefix field's value.
  7810. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  7811. s.Prefix = &v
  7812. return s
  7813. }
  7814. // SetUploadIdMarker sets the UploadIdMarker field's value.
  7815. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  7816. s.UploadIdMarker = &v
  7817. return s
  7818. }
  7819. type ListMultipartUploadsOutput struct {
  7820. _ struct{} `type:"structure"`
  7821. // Name of the bucket to which the multipart upload was initiated.
  7822. Bucket *string `type:"string"`
  7823. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  7824. Delimiter *string `type:"string"`
  7825. // Encoding type used by Amazon S3 to encode object keys in the response.
  7826. EncodingType *string `type:"string" enum:"EncodingType"`
  7827. // Indicates whether the returned list of multipart uploads is truncated. A
  7828. // value of true indicates that the list was truncated. The list can be truncated
  7829. // if the number of multipart uploads exceeds the limit allowed or specified
  7830. // by max uploads.
  7831. IsTruncated *bool `type:"boolean"`
  7832. // The key at or after which the listing began.
  7833. KeyMarker *string `type:"string"`
  7834. // Maximum number of multipart uploads that could have been included in the
  7835. // response.
  7836. MaxUploads *int64 `type:"integer"`
  7837. // When a list is truncated, this element specifies the value that should be
  7838. // used for the key-marker request parameter in a subsequent request.
  7839. NextKeyMarker *string `type:"string"`
  7840. // When a list is truncated, this element specifies the value that should be
  7841. // used for the upload-id-marker request parameter in a subsequent request.
  7842. NextUploadIdMarker *string `type:"string"`
  7843. // When a prefix is provided in the request, this field contains the specified
  7844. // prefix. The result contains only keys starting with the specified prefix.
  7845. Prefix *string `type:"string"`
  7846. // Upload ID after which listing began.
  7847. UploadIdMarker *string `type:"string"`
  7848. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  7849. }
  7850. // String returns the string representation
  7851. func (s ListMultipartUploadsOutput) String() string {
  7852. return awsutil.Prettify(s)
  7853. }
  7854. // GoString returns the string representation
  7855. func (s ListMultipartUploadsOutput) GoString() string {
  7856. return s.String()
  7857. }
  7858. // SetBucket sets the Bucket field's value.
  7859. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  7860. s.Bucket = &v
  7861. return s
  7862. }
  7863. // SetCommonPrefixes sets the CommonPrefixes field's value.
  7864. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  7865. s.CommonPrefixes = v
  7866. return s
  7867. }
  7868. // SetDelimiter sets the Delimiter field's value.
  7869. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  7870. s.Delimiter = &v
  7871. return s
  7872. }
  7873. // SetEncodingType sets the EncodingType field's value.
  7874. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  7875. s.EncodingType = &v
  7876. return s
  7877. }
  7878. // SetIsTruncated sets the IsTruncated field's value.
  7879. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  7880. s.IsTruncated = &v
  7881. return s
  7882. }
  7883. // SetKeyMarker sets the KeyMarker field's value.
  7884. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  7885. s.KeyMarker = &v
  7886. return s
  7887. }
  7888. // SetMaxUploads sets the MaxUploads field's value.
  7889. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  7890. s.MaxUploads = &v
  7891. return s
  7892. }
  7893. // SetNextKeyMarker sets the NextKeyMarker field's value.
  7894. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  7895. s.NextKeyMarker = &v
  7896. return s
  7897. }
  7898. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  7899. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  7900. s.NextUploadIdMarker = &v
  7901. return s
  7902. }
  7903. // SetPrefix sets the Prefix field's value.
  7904. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  7905. s.Prefix = &v
  7906. return s
  7907. }
  7908. // SetUploadIdMarker sets the UploadIdMarker field's value.
  7909. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  7910. s.UploadIdMarker = &v
  7911. return s
  7912. }
  7913. // SetUploads sets the Uploads field's value.
  7914. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  7915. s.Uploads = v
  7916. return s
  7917. }
  7918. type ListObjectVersionsInput struct {
  7919. _ struct{} `type:"structure"`
  7920. // Bucket is a required field
  7921. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7922. // A delimiter is a character you use to group keys.
  7923. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  7924. // Requests Amazon S3 to encode the object keys in the response and specifies
  7925. // the encoding method to use. An object key may contain any Unicode character;
  7926. // however, XML 1.0 parser cannot parse some characters, such as characters
  7927. // with an ASCII value from 0 to 10. For characters that are not supported in
  7928. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  7929. // keys in the response.
  7930. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  7931. // Specifies the key to start with when listing objects in a bucket.
  7932. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  7933. // Sets the maximum number of keys returned in the response. The response might
  7934. // contain fewer keys but will never contain more.
  7935. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  7936. // Limits the response to keys that begin with the specified prefix.
  7937. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  7938. // Specifies the object version you want to start listing from.
  7939. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  7940. }
  7941. // String returns the string representation
  7942. func (s ListObjectVersionsInput) String() string {
  7943. return awsutil.Prettify(s)
  7944. }
  7945. // GoString returns the string representation
  7946. func (s ListObjectVersionsInput) GoString() string {
  7947. return s.String()
  7948. }
  7949. // Validate inspects the fields of the type to determine if they are valid.
  7950. func (s *ListObjectVersionsInput) Validate() error {
  7951. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  7952. if s.Bucket == nil {
  7953. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7954. }
  7955. if invalidParams.Len() > 0 {
  7956. return invalidParams
  7957. }
  7958. return nil
  7959. }
  7960. // SetBucket sets the Bucket field's value.
  7961. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  7962. s.Bucket = &v
  7963. return s
  7964. }
  7965. // SetDelimiter sets the Delimiter field's value.
  7966. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  7967. s.Delimiter = &v
  7968. return s
  7969. }
  7970. // SetEncodingType sets the EncodingType field's value.
  7971. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  7972. s.EncodingType = &v
  7973. return s
  7974. }
  7975. // SetKeyMarker sets the KeyMarker field's value.
  7976. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  7977. s.KeyMarker = &v
  7978. return s
  7979. }
  7980. // SetMaxKeys sets the MaxKeys field's value.
  7981. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  7982. s.MaxKeys = &v
  7983. return s
  7984. }
  7985. // SetPrefix sets the Prefix field's value.
  7986. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  7987. s.Prefix = &v
  7988. return s
  7989. }
  7990. // SetVersionIdMarker sets the VersionIdMarker field's value.
  7991. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  7992. s.VersionIdMarker = &v
  7993. return s
  7994. }
  7995. type ListObjectVersionsOutput struct {
  7996. _ struct{} `type:"structure"`
  7997. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  7998. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  7999. Delimiter *string `type:"string"`
  8000. // Encoding type used by Amazon S3 to encode object keys in the response.
  8001. EncodingType *string `type:"string" enum:"EncodingType"`
  8002. // A flag that indicates whether or not Amazon S3 returned all of the results
  8003. // that satisfied the search criteria. If your results were truncated, you can
  8004. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  8005. // response parameters as a starting place in another request to return the
  8006. // rest of the results.
  8007. IsTruncated *bool `type:"boolean"`
  8008. // Marks the last Key returned in a truncated response.
  8009. KeyMarker *string `type:"string"`
  8010. MaxKeys *int64 `type:"integer"`
  8011. Name *string `type:"string"`
  8012. // Use this value for the key marker request parameter in a subsequent request.
  8013. NextKeyMarker *string `type:"string"`
  8014. // Use this value for the next version id marker parameter in a subsequent request.
  8015. NextVersionIdMarker *string `type:"string"`
  8016. Prefix *string `type:"string"`
  8017. VersionIdMarker *string `type:"string"`
  8018. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  8019. }
  8020. // String returns the string representation
  8021. func (s ListObjectVersionsOutput) String() string {
  8022. return awsutil.Prettify(s)
  8023. }
  8024. // GoString returns the string representation
  8025. func (s ListObjectVersionsOutput) GoString() string {
  8026. return s.String()
  8027. }
  8028. // SetCommonPrefixes sets the CommonPrefixes field's value.
  8029. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  8030. s.CommonPrefixes = v
  8031. return s
  8032. }
  8033. // SetDeleteMarkers sets the DeleteMarkers field's value.
  8034. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  8035. s.DeleteMarkers = v
  8036. return s
  8037. }
  8038. // SetDelimiter sets the Delimiter field's value.
  8039. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  8040. s.Delimiter = &v
  8041. return s
  8042. }
  8043. // SetEncodingType sets the EncodingType field's value.
  8044. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  8045. s.EncodingType = &v
  8046. return s
  8047. }
  8048. // SetIsTruncated sets the IsTruncated field's value.
  8049. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  8050. s.IsTruncated = &v
  8051. return s
  8052. }
  8053. // SetKeyMarker sets the KeyMarker field's value.
  8054. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  8055. s.KeyMarker = &v
  8056. return s
  8057. }
  8058. // SetMaxKeys sets the MaxKeys field's value.
  8059. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  8060. s.MaxKeys = &v
  8061. return s
  8062. }
  8063. // SetName sets the Name field's value.
  8064. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  8065. s.Name = &v
  8066. return s
  8067. }
  8068. // SetNextKeyMarker sets the NextKeyMarker field's value.
  8069. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  8070. s.NextKeyMarker = &v
  8071. return s
  8072. }
  8073. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  8074. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  8075. s.NextVersionIdMarker = &v
  8076. return s
  8077. }
  8078. // SetPrefix sets the Prefix field's value.
  8079. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  8080. s.Prefix = &v
  8081. return s
  8082. }
  8083. // SetVersionIdMarker sets the VersionIdMarker field's value.
  8084. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  8085. s.VersionIdMarker = &v
  8086. return s
  8087. }
  8088. // SetVersions sets the Versions field's value.
  8089. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  8090. s.Versions = v
  8091. return s
  8092. }
  8093. type ListObjectsInput struct {
  8094. _ struct{} `type:"structure"`
  8095. // Bucket is a required field
  8096. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8097. // A delimiter is a character you use to group keys.
  8098. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  8099. // Requests Amazon S3 to encode the object keys in the response and specifies
  8100. // the encoding method to use. An object key may contain any Unicode character;
  8101. // however, XML 1.0 parser cannot parse some characters, such as characters
  8102. // with an ASCII value from 0 to 10. For characters that are not supported in
  8103. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  8104. // keys in the response.
  8105. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  8106. // Specifies the key to start with when listing objects in a bucket.
  8107. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  8108. // Sets the maximum number of keys returned in the response. The response might
  8109. // contain fewer keys but will never contain more.
  8110. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  8111. // Limits the response to keys that begin with the specified prefix.
  8112. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  8113. // Confirms that the requester knows that she or he will be charged for the
  8114. // list objects request. Bucket owners need not specify this parameter in their
  8115. // requests.
  8116. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8117. }
  8118. // String returns the string representation
  8119. func (s ListObjectsInput) String() string {
  8120. return awsutil.Prettify(s)
  8121. }
  8122. // GoString returns the string representation
  8123. func (s ListObjectsInput) GoString() string {
  8124. return s.String()
  8125. }
  8126. // Validate inspects the fields of the type to determine if they are valid.
  8127. func (s *ListObjectsInput) Validate() error {
  8128. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  8129. if s.Bucket == nil {
  8130. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8131. }
  8132. if invalidParams.Len() > 0 {
  8133. return invalidParams
  8134. }
  8135. return nil
  8136. }
  8137. // SetBucket sets the Bucket field's value.
  8138. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  8139. s.Bucket = &v
  8140. return s
  8141. }
  8142. // SetDelimiter sets the Delimiter field's value.
  8143. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  8144. s.Delimiter = &v
  8145. return s
  8146. }
  8147. // SetEncodingType sets the EncodingType field's value.
  8148. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  8149. s.EncodingType = &v
  8150. return s
  8151. }
  8152. // SetMarker sets the Marker field's value.
  8153. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  8154. s.Marker = &v
  8155. return s
  8156. }
  8157. // SetMaxKeys sets the MaxKeys field's value.
  8158. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  8159. s.MaxKeys = &v
  8160. return s
  8161. }
  8162. // SetPrefix sets the Prefix field's value.
  8163. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  8164. s.Prefix = &v
  8165. return s
  8166. }
  8167. // SetRequestPayer sets the RequestPayer field's value.
  8168. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  8169. s.RequestPayer = &v
  8170. return s
  8171. }
  8172. type ListObjectsOutput struct {
  8173. _ struct{} `type:"structure"`
  8174. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  8175. Contents []*Object `type:"list" flattened:"true"`
  8176. Delimiter *string `type:"string"`
  8177. // Encoding type used by Amazon S3 to encode object keys in the response.
  8178. EncodingType *string `type:"string" enum:"EncodingType"`
  8179. // A flag that indicates whether or not Amazon S3 returned all of the results
  8180. // that satisfied the search criteria.
  8181. IsTruncated *bool `type:"boolean"`
  8182. Marker *string `type:"string"`
  8183. MaxKeys *int64 `type:"integer"`
  8184. Name *string `type:"string"`
  8185. // When response is truncated (the IsTruncated element value in the response
  8186. // is true), you can use the key name in this field as marker in the subsequent
  8187. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  8188. // order Note: This element is returned only if you have delimiter request parameter
  8189. // specified. If response does not include the NextMaker and it is truncated,
  8190. // you can use the value of the last Key in the response as the marker in the
  8191. // subsequent request to get the next set of object keys.
  8192. NextMarker *string `type:"string"`
  8193. Prefix *string `type:"string"`
  8194. }
  8195. // String returns the string representation
  8196. func (s ListObjectsOutput) String() string {
  8197. return awsutil.Prettify(s)
  8198. }
  8199. // GoString returns the string representation
  8200. func (s ListObjectsOutput) GoString() string {
  8201. return s.String()
  8202. }
  8203. // SetCommonPrefixes sets the CommonPrefixes field's value.
  8204. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  8205. s.CommonPrefixes = v
  8206. return s
  8207. }
  8208. // SetContents sets the Contents field's value.
  8209. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  8210. s.Contents = v
  8211. return s
  8212. }
  8213. // SetDelimiter sets the Delimiter field's value.
  8214. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  8215. s.Delimiter = &v
  8216. return s
  8217. }
  8218. // SetEncodingType sets the EncodingType field's value.
  8219. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  8220. s.EncodingType = &v
  8221. return s
  8222. }
  8223. // SetIsTruncated sets the IsTruncated field's value.
  8224. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  8225. s.IsTruncated = &v
  8226. return s
  8227. }
  8228. // SetMarker sets the Marker field's value.
  8229. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  8230. s.Marker = &v
  8231. return s
  8232. }
  8233. // SetMaxKeys sets the MaxKeys field's value.
  8234. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  8235. s.MaxKeys = &v
  8236. return s
  8237. }
  8238. // SetName sets the Name field's value.
  8239. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  8240. s.Name = &v
  8241. return s
  8242. }
  8243. // SetNextMarker sets the NextMarker field's value.
  8244. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  8245. s.NextMarker = &v
  8246. return s
  8247. }
  8248. // SetPrefix sets the Prefix field's value.
  8249. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  8250. s.Prefix = &v
  8251. return s
  8252. }
  8253. type ListObjectsV2Input struct {
  8254. _ struct{} `type:"structure"`
  8255. // Name of the bucket to list.
  8256. //
  8257. // Bucket is a required field
  8258. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8259. // ContinuationToken indicates Amazon S3 that the list is being continued on
  8260. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  8261. // key
  8262. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  8263. // A delimiter is a character you use to group keys.
  8264. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  8265. // Encoding type used by Amazon S3 to encode object keys in the response.
  8266. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  8267. // The owner field is not present in listV2 by default, if you want to return
  8268. // owner field with each key in the result then set the fetch owner field to
  8269. // true
  8270. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  8271. // Sets the maximum number of keys returned in the response. The response might
  8272. // contain fewer keys but will never contain more.
  8273. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  8274. // Limits the response to keys that begin with the specified prefix.
  8275. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  8276. // Confirms that the requester knows that she or he will be charged for the
  8277. // list objects request in V2 style. Bucket owners need not specify this parameter
  8278. // in their requests.
  8279. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8280. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  8281. // listing after this specified key. StartAfter can be any key in the bucket
  8282. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  8283. }
  8284. // String returns the string representation
  8285. func (s ListObjectsV2Input) String() string {
  8286. return awsutil.Prettify(s)
  8287. }
  8288. // GoString returns the string representation
  8289. func (s ListObjectsV2Input) GoString() string {
  8290. return s.String()
  8291. }
  8292. // Validate inspects the fields of the type to determine if they are valid.
  8293. func (s *ListObjectsV2Input) Validate() error {
  8294. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  8295. if s.Bucket == nil {
  8296. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8297. }
  8298. if invalidParams.Len() > 0 {
  8299. return invalidParams
  8300. }
  8301. return nil
  8302. }
  8303. // SetBucket sets the Bucket field's value.
  8304. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  8305. s.Bucket = &v
  8306. return s
  8307. }
  8308. // SetContinuationToken sets the ContinuationToken field's value.
  8309. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  8310. s.ContinuationToken = &v
  8311. return s
  8312. }
  8313. // SetDelimiter sets the Delimiter field's value.
  8314. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  8315. s.Delimiter = &v
  8316. return s
  8317. }
  8318. // SetEncodingType sets the EncodingType field's value.
  8319. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  8320. s.EncodingType = &v
  8321. return s
  8322. }
  8323. // SetFetchOwner sets the FetchOwner field's value.
  8324. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  8325. s.FetchOwner = &v
  8326. return s
  8327. }
  8328. // SetMaxKeys sets the MaxKeys field's value.
  8329. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  8330. s.MaxKeys = &v
  8331. return s
  8332. }
  8333. // SetPrefix sets the Prefix field's value.
  8334. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  8335. s.Prefix = &v
  8336. return s
  8337. }
  8338. // SetRequestPayer sets the RequestPayer field's value.
  8339. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  8340. s.RequestPayer = &v
  8341. return s
  8342. }
  8343. // SetStartAfter sets the StartAfter field's value.
  8344. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  8345. s.StartAfter = &v
  8346. return s
  8347. }
  8348. type ListObjectsV2Output struct {
  8349. _ struct{} `type:"structure"`
  8350. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  8351. // next occurrence of the string specified by delimiter
  8352. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  8353. // Metadata about each object returned.
  8354. Contents []*Object `type:"list" flattened:"true"`
  8355. // ContinuationToken indicates Amazon S3 that the list is being continued on
  8356. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  8357. // key
  8358. ContinuationToken *string `type:"string"`
  8359. // A delimiter is a character you use to group keys.
  8360. Delimiter *string `type:"string"`
  8361. // Encoding type used by Amazon S3 to encode object keys in the response.
  8362. EncodingType *string `type:"string" enum:"EncodingType"`
  8363. // A flag that indicates whether or not Amazon S3 returned all of the results
  8364. // that satisfied the search criteria.
  8365. IsTruncated *bool `type:"boolean"`
  8366. // KeyCount is the number of keys returned with this request. KeyCount will
  8367. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  8368. // result will include less than equals 50 keys
  8369. KeyCount *int64 `type:"integer"`
  8370. // Sets the maximum number of keys returned in the response. The response might
  8371. // contain fewer keys but will never contain more.
  8372. MaxKeys *int64 `type:"integer"`
  8373. // Name of the bucket to list.
  8374. Name *string `type:"string"`
  8375. // NextContinuationToken is sent when isTruncated is true which means there
  8376. // are more keys in the bucket that can be listed. The next list requests to
  8377. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  8378. // is obfuscated and is not a real key
  8379. NextContinuationToken *string `type:"string"`
  8380. // Limits the response to keys that begin with the specified prefix.
  8381. Prefix *string `type:"string"`
  8382. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  8383. // listing after this specified key. StartAfter can be any key in the bucket
  8384. StartAfter *string `type:"string"`
  8385. }
  8386. // String returns the string representation
  8387. func (s ListObjectsV2Output) String() string {
  8388. return awsutil.Prettify(s)
  8389. }
  8390. // GoString returns the string representation
  8391. func (s ListObjectsV2Output) GoString() string {
  8392. return s.String()
  8393. }
  8394. // SetCommonPrefixes sets the CommonPrefixes field's value.
  8395. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  8396. s.CommonPrefixes = v
  8397. return s
  8398. }
  8399. // SetContents sets the Contents field's value.
  8400. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  8401. s.Contents = v
  8402. return s
  8403. }
  8404. // SetContinuationToken sets the ContinuationToken field's value.
  8405. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  8406. s.ContinuationToken = &v
  8407. return s
  8408. }
  8409. // SetDelimiter sets the Delimiter field's value.
  8410. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  8411. s.Delimiter = &v
  8412. return s
  8413. }
  8414. // SetEncodingType sets the EncodingType field's value.
  8415. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  8416. s.EncodingType = &v
  8417. return s
  8418. }
  8419. // SetIsTruncated sets the IsTruncated field's value.
  8420. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  8421. s.IsTruncated = &v
  8422. return s
  8423. }
  8424. // SetKeyCount sets the KeyCount field's value.
  8425. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  8426. s.KeyCount = &v
  8427. return s
  8428. }
  8429. // SetMaxKeys sets the MaxKeys field's value.
  8430. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  8431. s.MaxKeys = &v
  8432. return s
  8433. }
  8434. // SetName sets the Name field's value.
  8435. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  8436. s.Name = &v
  8437. return s
  8438. }
  8439. // SetNextContinuationToken sets the NextContinuationToken field's value.
  8440. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  8441. s.NextContinuationToken = &v
  8442. return s
  8443. }
  8444. // SetPrefix sets the Prefix field's value.
  8445. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  8446. s.Prefix = &v
  8447. return s
  8448. }
  8449. // SetStartAfter sets the StartAfter field's value.
  8450. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  8451. s.StartAfter = &v
  8452. return s
  8453. }
  8454. type ListPartsInput struct {
  8455. _ struct{} `type:"structure"`
  8456. // Bucket is a required field
  8457. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8458. // Key is a required field
  8459. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8460. // Sets the maximum number of parts to return.
  8461. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  8462. // Specifies the part after which listing should begin. Only parts with higher
  8463. // part numbers will be listed.
  8464. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  8465. // Confirms that the requester knows that she or he will be charged for the
  8466. // request. Bucket owners need not specify this parameter in their requests.
  8467. // Documentation on downloading objects from requester pays buckets can be found
  8468. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8469. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8470. // Upload ID identifying the multipart upload whose parts are being listed.
  8471. //
  8472. // UploadId is a required field
  8473. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  8474. }
  8475. // String returns the string representation
  8476. func (s ListPartsInput) String() string {
  8477. return awsutil.Prettify(s)
  8478. }
  8479. // GoString returns the string representation
  8480. func (s ListPartsInput) GoString() string {
  8481. return s.String()
  8482. }
  8483. // Validate inspects the fields of the type to determine if they are valid.
  8484. func (s *ListPartsInput) Validate() error {
  8485. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  8486. if s.Bucket == nil {
  8487. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8488. }
  8489. if s.Key == nil {
  8490. invalidParams.Add(request.NewErrParamRequired("Key"))
  8491. }
  8492. if s.Key != nil && len(*s.Key) < 1 {
  8493. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8494. }
  8495. if s.UploadId == nil {
  8496. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  8497. }
  8498. if invalidParams.Len() > 0 {
  8499. return invalidParams
  8500. }
  8501. return nil
  8502. }
  8503. // SetBucket sets the Bucket field's value.
  8504. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  8505. s.Bucket = &v
  8506. return s
  8507. }
  8508. // SetKey sets the Key field's value.
  8509. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  8510. s.Key = &v
  8511. return s
  8512. }
  8513. // SetMaxParts sets the MaxParts field's value.
  8514. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  8515. s.MaxParts = &v
  8516. return s
  8517. }
  8518. // SetPartNumberMarker sets the PartNumberMarker field's value.
  8519. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  8520. s.PartNumberMarker = &v
  8521. return s
  8522. }
  8523. // SetRequestPayer sets the RequestPayer field's value.
  8524. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  8525. s.RequestPayer = &v
  8526. return s
  8527. }
  8528. // SetUploadId sets the UploadId field's value.
  8529. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  8530. s.UploadId = &v
  8531. return s
  8532. }
  8533. type ListPartsOutput struct {
  8534. _ struct{} `type:"structure"`
  8535. // Date when multipart upload will become eligible for abort operation by lifecycle.
  8536. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  8537. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  8538. // operation.
  8539. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  8540. // Name of the bucket to which the multipart upload was initiated.
  8541. Bucket *string `type:"string"`
  8542. // Identifies who initiated the multipart upload.
  8543. Initiator *Initiator `type:"structure"`
  8544. // Indicates whether the returned list of parts is truncated.
  8545. IsTruncated *bool `type:"boolean"`
  8546. // Object key for which the multipart upload was initiated.
  8547. Key *string `min:"1" type:"string"`
  8548. // Maximum number of parts that were allowed in the response.
  8549. MaxParts *int64 `type:"integer"`
  8550. // When a list is truncated, this element specifies the last part in the list,
  8551. // as well as the value to use for the part-number-marker request parameter
  8552. // in a subsequent request.
  8553. NextPartNumberMarker *int64 `type:"integer"`
  8554. Owner *Owner `type:"structure"`
  8555. // Part number after which listing begins.
  8556. PartNumberMarker *int64 `type:"integer"`
  8557. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  8558. // If present, indicates that the requester was successfully charged for the
  8559. // request.
  8560. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8561. // The class of storage used to store the object.
  8562. StorageClass *string `type:"string" enum:"StorageClass"`
  8563. // Upload ID identifying the multipart upload whose parts are being listed.
  8564. UploadId *string `type:"string"`
  8565. }
  8566. // String returns the string representation
  8567. func (s ListPartsOutput) String() string {
  8568. return awsutil.Prettify(s)
  8569. }
  8570. // GoString returns the string representation
  8571. func (s ListPartsOutput) GoString() string {
  8572. return s.String()
  8573. }
  8574. // SetAbortDate sets the AbortDate field's value.
  8575. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  8576. s.AbortDate = &v
  8577. return s
  8578. }
  8579. // SetAbortRuleId sets the AbortRuleId field's value.
  8580. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  8581. s.AbortRuleId = &v
  8582. return s
  8583. }
  8584. // SetBucket sets the Bucket field's value.
  8585. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  8586. s.Bucket = &v
  8587. return s
  8588. }
  8589. // SetInitiator sets the Initiator field's value.
  8590. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  8591. s.Initiator = v
  8592. return s
  8593. }
  8594. // SetIsTruncated sets the IsTruncated field's value.
  8595. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  8596. s.IsTruncated = &v
  8597. return s
  8598. }
  8599. // SetKey sets the Key field's value.
  8600. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  8601. s.Key = &v
  8602. return s
  8603. }
  8604. // SetMaxParts sets the MaxParts field's value.
  8605. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  8606. s.MaxParts = &v
  8607. return s
  8608. }
  8609. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  8610. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  8611. s.NextPartNumberMarker = &v
  8612. return s
  8613. }
  8614. // SetOwner sets the Owner field's value.
  8615. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  8616. s.Owner = v
  8617. return s
  8618. }
  8619. // SetPartNumberMarker sets the PartNumberMarker field's value.
  8620. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  8621. s.PartNumberMarker = &v
  8622. return s
  8623. }
  8624. // SetParts sets the Parts field's value.
  8625. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  8626. s.Parts = v
  8627. return s
  8628. }
  8629. // SetRequestCharged sets the RequestCharged field's value.
  8630. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  8631. s.RequestCharged = &v
  8632. return s
  8633. }
  8634. // SetStorageClass sets the StorageClass field's value.
  8635. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  8636. s.StorageClass = &v
  8637. return s
  8638. }
  8639. // SetUploadId sets the UploadId field's value.
  8640. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  8641. s.UploadId = &v
  8642. return s
  8643. }
  8644. type LoggingEnabled struct {
  8645. _ struct{} `type:"structure"`
  8646. // Specifies the bucket where you want Amazon S3 to store server access logs.
  8647. // You can have your logs delivered to any bucket that you own, including the
  8648. // same bucket that is being logged. You can also configure multiple buckets
  8649. // to deliver their logs to the same target bucket. In this case you should
  8650. // choose a different TargetPrefix for each source bucket so that the delivered
  8651. // log files can be distinguished by key.
  8652. TargetBucket *string `type:"string"`
  8653. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  8654. // This element lets you specify a prefix for the keys that the log files will
  8655. // be stored under.
  8656. TargetPrefix *string `type:"string"`
  8657. }
  8658. // String returns the string representation
  8659. func (s LoggingEnabled) String() string {
  8660. return awsutil.Prettify(s)
  8661. }
  8662. // GoString returns the string representation
  8663. func (s LoggingEnabled) GoString() string {
  8664. return s.String()
  8665. }
  8666. // Validate inspects the fields of the type to determine if they are valid.
  8667. func (s *LoggingEnabled) Validate() error {
  8668. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  8669. if s.TargetGrants != nil {
  8670. for i, v := range s.TargetGrants {
  8671. if v == nil {
  8672. continue
  8673. }
  8674. if err := v.Validate(); err != nil {
  8675. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  8676. }
  8677. }
  8678. }
  8679. if invalidParams.Len() > 0 {
  8680. return invalidParams
  8681. }
  8682. return nil
  8683. }
  8684. // SetTargetBucket sets the TargetBucket field's value.
  8685. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  8686. s.TargetBucket = &v
  8687. return s
  8688. }
  8689. // SetTargetGrants sets the TargetGrants field's value.
  8690. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  8691. s.TargetGrants = v
  8692. return s
  8693. }
  8694. // SetTargetPrefix sets the TargetPrefix field's value.
  8695. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  8696. s.TargetPrefix = &v
  8697. return s
  8698. }
  8699. type MultipartUpload struct {
  8700. _ struct{} `type:"structure"`
  8701. // Date and time at which the multipart upload was initiated.
  8702. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  8703. // Identifies who initiated the multipart upload.
  8704. Initiator *Initiator `type:"structure"`
  8705. // Key of the object for which the multipart upload was initiated.
  8706. Key *string `min:"1" type:"string"`
  8707. Owner *Owner `type:"structure"`
  8708. // The class of storage used to store the object.
  8709. StorageClass *string `type:"string" enum:"StorageClass"`
  8710. // Upload ID that identifies the multipart upload.
  8711. UploadId *string `type:"string"`
  8712. }
  8713. // String returns the string representation
  8714. func (s MultipartUpload) String() string {
  8715. return awsutil.Prettify(s)
  8716. }
  8717. // GoString returns the string representation
  8718. func (s MultipartUpload) GoString() string {
  8719. return s.String()
  8720. }
  8721. // SetInitiated sets the Initiated field's value.
  8722. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  8723. s.Initiated = &v
  8724. return s
  8725. }
  8726. // SetInitiator sets the Initiator field's value.
  8727. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  8728. s.Initiator = v
  8729. return s
  8730. }
  8731. // SetKey sets the Key field's value.
  8732. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  8733. s.Key = &v
  8734. return s
  8735. }
  8736. // SetOwner sets the Owner field's value.
  8737. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  8738. s.Owner = v
  8739. return s
  8740. }
  8741. // SetStorageClass sets the StorageClass field's value.
  8742. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  8743. s.StorageClass = &v
  8744. return s
  8745. }
  8746. // SetUploadId sets the UploadId field's value.
  8747. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  8748. s.UploadId = &v
  8749. return s
  8750. }
  8751. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  8752. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  8753. // configuration action on a bucket that has versioning enabled (or suspended)
  8754. // to request that Amazon S3 delete noncurrent object versions at a specific
  8755. // period in the object's lifetime.
  8756. type NoncurrentVersionExpiration struct {
  8757. _ struct{} `type:"structure"`
  8758. // Specifies the number of days an object is noncurrent before Amazon S3 can
  8759. // perform the associated action. For information about the noncurrent days
  8760. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  8761. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  8762. NoncurrentDays *int64 `type:"integer"`
  8763. }
  8764. // String returns the string representation
  8765. func (s NoncurrentVersionExpiration) String() string {
  8766. return awsutil.Prettify(s)
  8767. }
  8768. // GoString returns the string representation
  8769. func (s NoncurrentVersionExpiration) GoString() string {
  8770. return s.String()
  8771. }
  8772. // SetNoncurrentDays sets the NoncurrentDays field's value.
  8773. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  8774. s.NoncurrentDays = &v
  8775. return s
  8776. }
  8777. // Container for the transition rule that describes when noncurrent objects
  8778. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  8779. // versioning-enabled (or versioning is suspended), you can set this action
  8780. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  8781. // or GLACIER storage class at a specific period in the object's lifetime.
  8782. type NoncurrentVersionTransition struct {
  8783. _ struct{} `type:"structure"`
  8784. // Specifies the number of days an object is noncurrent before Amazon S3 can
  8785. // perform the associated action. For information about the noncurrent days
  8786. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  8787. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  8788. NoncurrentDays *int64 `type:"integer"`
  8789. // The class of storage used to store the object.
  8790. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  8791. }
  8792. // String returns the string representation
  8793. func (s NoncurrentVersionTransition) String() string {
  8794. return awsutil.Prettify(s)
  8795. }
  8796. // GoString returns the string representation
  8797. func (s NoncurrentVersionTransition) GoString() string {
  8798. return s.String()
  8799. }
  8800. // SetNoncurrentDays sets the NoncurrentDays field's value.
  8801. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  8802. s.NoncurrentDays = &v
  8803. return s
  8804. }
  8805. // SetStorageClass sets the StorageClass field's value.
  8806. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  8807. s.StorageClass = &v
  8808. return s
  8809. }
  8810. // Container for specifying the notification configuration of the bucket. If
  8811. // this element is empty, notifications are turned off on the bucket.
  8812. type NotificationConfiguration struct {
  8813. _ struct{} `type:"structure"`
  8814. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  8815. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  8816. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  8817. }
  8818. // String returns the string representation
  8819. func (s NotificationConfiguration) String() string {
  8820. return awsutil.Prettify(s)
  8821. }
  8822. // GoString returns the string representation
  8823. func (s NotificationConfiguration) GoString() string {
  8824. return s.String()
  8825. }
  8826. // Validate inspects the fields of the type to determine if they are valid.
  8827. func (s *NotificationConfiguration) Validate() error {
  8828. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  8829. if s.LambdaFunctionConfigurations != nil {
  8830. for i, v := range s.LambdaFunctionConfigurations {
  8831. if v == nil {
  8832. continue
  8833. }
  8834. if err := v.Validate(); err != nil {
  8835. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  8836. }
  8837. }
  8838. }
  8839. if s.QueueConfigurations != nil {
  8840. for i, v := range s.QueueConfigurations {
  8841. if v == nil {
  8842. continue
  8843. }
  8844. if err := v.Validate(); err != nil {
  8845. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  8846. }
  8847. }
  8848. }
  8849. if s.TopicConfigurations != nil {
  8850. for i, v := range s.TopicConfigurations {
  8851. if v == nil {
  8852. continue
  8853. }
  8854. if err := v.Validate(); err != nil {
  8855. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  8856. }
  8857. }
  8858. }
  8859. if invalidParams.Len() > 0 {
  8860. return invalidParams
  8861. }
  8862. return nil
  8863. }
  8864. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  8865. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  8866. s.LambdaFunctionConfigurations = v
  8867. return s
  8868. }
  8869. // SetQueueConfigurations sets the QueueConfigurations field's value.
  8870. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  8871. s.QueueConfigurations = v
  8872. return s
  8873. }
  8874. // SetTopicConfigurations sets the TopicConfigurations field's value.
  8875. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  8876. s.TopicConfigurations = v
  8877. return s
  8878. }
  8879. type NotificationConfigurationDeprecated struct {
  8880. _ struct{} `type:"structure"`
  8881. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  8882. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  8883. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  8884. }
  8885. // String returns the string representation
  8886. func (s NotificationConfigurationDeprecated) String() string {
  8887. return awsutil.Prettify(s)
  8888. }
  8889. // GoString returns the string representation
  8890. func (s NotificationConfigurationDeprecated) GoString() string {
  8891. return s.String()
  8892. }
  8893. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  8894. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  8895. s.CloudFunctionConfiguration = v
  8896. return s
  8897. }
  8898. // SetQueueConfiguration sets the QueueConfiguration field's value.
  8899. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  8900. s.QueueConfiguration = v
  8901. return s
  8902. }
  8903. // SetTopicConfiguration sets the TopicConfiguration field's value.
  8904. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  8905. s.TopicConfiguration = v
  8906. return s
  8907. }
  8908. // Container for object key name filtering rules. For information about key
  8909. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  8910. type NotificationConfigurationFilter struct {
  8911. _ struct{} `type:"structure"`
  8912. // Container for object key name prefix and suffix filtering rules.
  8913. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  8914. }
  8915. // String returns the string representation
  8916. func (s NotificationConfigurationFilter) String() string {
  8917. return awsutil.Prettify(s)
  8918. }
  8919. // GoString returns the string representation
  8920. func (s NotificationConfigurationFilter) GoString() string {
  8921. return s.String()
  8922. }
  8923. // SetKey sets the Key field's value.
  8924. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  8925. s.Key = v
  8926. return s
  8927. }
  8928. type Object struct {
  8929. _ struct{} `type:"structure"`
  8930. ETag *string `type:"string"`
  8931. Key *string `min:"1" type:"string"`
  8932. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  8933. Owner *Owner `type:"structure"`
  8934. Size *int64 `type:"integer"`
  8935. // The class of storage used to store the object.
  8936. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  8937. }
  8938. // String returns the string representation
  8939. func (s Object) String() string {
  8940. return awsutil.Prettify(s)
  8941. }
  8942. // GoString returns the string representation
  8943. func (s Object) GoString() string {
  8944. return s.String()
  8945. }
  8946. // SetETag sets the ETag field's value.
  8947. func (s *Object) SetETag(v string) *Object {
  8948. s.ETag = &v
  8949. return s
  8950. }
  8951. // SetKey sets the Key field's value.
  8952. func (s *Object) SetKey(v string) *Object {
  8953. s.Key = &v
  8954. return s
  8955. }
  8956. // SetLastModified sets the LastModified field's value.
  8957. func (s *Object) SetLastModified(v time.Time) *Object {
  8958. s.LastModified = &v
  8959. return s
  8960. }
  8961. // SetOwner sets the Owner field's value.
  8962. func (s *Object) SetOwner(v *Owner) *Object {
  8963. s.Owner = v
  8964. return s
  8965. }
  8966. // SetSize sets the Size field's value.
  8967. func (s *Object) SetSize(v int64) *Object {
  8968. s.Size = &v
  8969. return s
  8970. }
  8971. // SetStorageClass sets the StorageClass field's value.
  8972. func (s *Object) SetStorageClass(v string) *Object {
  8973. s.StorageClass = &v
  8974. return s
  8975. }
  8976. type ObjectIdentifier struct {
  8977. _ struct{} `type:"structure"`
  8978. // Key name of the object to delete.
  8979. //
  8980. // Key is a required field
  8981. Key *string `min:"1" type:"string" required:"true"`
  8982. // VersionId for the specific version of the object to delete.
  8983. VersionId *string `type:"string"`
  8984. }
  8985. // String returns the string representation
  8986. func (s ObjectIdentifier) String() string {
  8987. return awsutil.Prettify(s)
  8988. }
  8989. // GoString returns the string representation
  8990. func (s ObjectIdentifier) GoString() string {
  8991. return s.String()
  8992. }
  8993. // Validate inspects the fields of the type to determine if they are valid.
  8994. func (s *ObjectIdentifier) Validate() error {
  8995. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  8996. if s.Key == nil {
  8997. invalidParams.Add(request.NewErrParamRequired("Key"))
  8998. }
  8999. if s.Key != nil && len(*s.Key) < 1 {
  9000. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9001. }
  9002. if invalidParams.Len() > 0 {
  9003. return invalidParams
  9004. }
  9005. return nil
  9006. }
  9007. // SetKey sets the Key field's value.
  9008. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  9009. s.Key = &v
  9010. return s
  9011. }
  9012. // SetVersionId sets the VersionId field's value.
  9013. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  9014. s.VersionId = &v
  9015. return s
  9016. }
  9017. type ObjectVersion struct {
  9018. _ struct{} `type:"structure"`
  9019. ETag *string `type:"string"`
  9020. // Specifies whether the object is (true) or is not (false) the latest version
  9021. // of an object.
  9022. IsLatest *bool `type:"boolean"`
  9023. // The object key.
  9024. Key *string `min:"1" type:"string"`
  9025. // Date and time the object was last modified.
  9026. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  9027. Owner *Owner `type:"structure"`
  9028. // Size in bytes of the object.
  9029. Size *int64 `type:"integer"`
  9030. // The class of storage used to store the object.
  9031. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  9032. // Version ID of an object.
  9033. VersionId *string `type:"string"`
  9034. }
  9035. // String returns the string representation
  9036. func (s ObjectVersion) String() string {
  9037. return awsutil.Prettify(s)
  9038. }
  9039. // GoString returns the string representation
  9040. func (s ObjectVersion) GoString() string {
  9041. return s.String()
  9042. }
  9043. // SetETag sets the ETag field's value.
  9044. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  9045. s.ETag = &v
  9046. return s
  9047. }
  9048. // SetIsLatest sets the IsLatest field's value.
  9049. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  9050. s.IsLatest = &v
  9051. return s
  9052. }
  9053. // SetKey sets the Key field's value.
  9054. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  9055. s.Key = &v
  9056. return s
  9057. }
  9058. // SetLastModified sets the LastModified field's value.
  9059. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  9060. s.LastModified = &v
  9061. return s
  9062. }
  9063. // SetOwner sets the Owner field's value.
  9064. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  9065. s.Owner = v
  9066. return s
  9067. }
  9068. // SetSize sets the Size field's value.
  9069. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  9070. s.Size = &v
  9071. return s
  9072. }
  9073. // SetStorageClass sets the StorageClass field's value.
  9074. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  9075. s.StorageClass = &v
  9076. return s
  9077. }
  9078. // SetVersionId sets the VersionId field's value.
  9079. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  9080. s.VersionId = &v
  9081. return s
  9082. }
  9083. type Owner struct {
  9084. _ struct{} `type:"structure"`
  9085. DisplayName *string `type:"string"`
  9086. ID *string `type:"string"`
  9087. }
  9088. // String returns the string representation
  9089. func (s Owner) String() string {
  9090. return awsutil.Prettify(s)
  9091. }
  9092. // GoString returns the string representation
  9093. func (s Owner) GoString() string {
  9094. return s.String()
  9095. }
  9096. // SetDisplayName sets the DisplayName field's value.
  9097. func (s *Owner) SetDisplayName(v string) *Owner {
  9098. s.DisplayName = &v
  9099. return s
  9100. }
  9101. // SetID sets the ID field's value.
  9102. func (s *Owner) SetID(v string) *Owner {
  9103. s.ID = &v
  9104. return s
  9105. }
  9106. type Part struct {
  9107. _ struct{} `type:"structure"`
  9108. // Entity tag returned when the part was uploaded.
  9109. ETag *string `type:"string"`
  9110. // Date and time at which the part was uploaded.
  9111. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  9112. // Part number identifying the part. This is a positive integer between 1 and
  9113. // 10,000.
  9114. PartNumber *int64 `type:"integer"`
  9115. // Size of the uploaded part data.
  9116. Size *int64 `type:"integer"`
  9117. }
  9118. // String returns the string representation
  9119. func (s Part) String() string {
  9120. return awsutil.Prettify(s)
  9121. }
  9122. // GoString returns the string representation
  9123. func (s Part) GoString() string {
  9124. return s.String()
  9125. }
  9126. // SetETag sets the ETag field's value.
  9127. func (s *Part) SetETag(v string) *Part {
  9128. s.ETag = &v
  9129. return s
  9130. }
  9131. // SetLastModified sets the LastModified field's value.
  9132. func (s *Part) SetLastModified(v time.Time) *Part {
  9133. s.LastModified = &v
  9134. return s
  9135. }
  9136. // SetPartNumber sets the PartNumber field's value.
  9137. func (s *Part) SetPartNumber(v int64) *Part {
  9138. s.PartNumber = &v
  9139. return s
  9140. }
  9141. // SetSize sets the Size field's value.
  9142. func (s *Part) SetSize(v int64) *Part {
  9143. s.Size = &v
  9144. return s
  9145. }
  9146. type PutBucketAccelerateConfigurationInput struct {
  9147. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  9148. // Specifies the Accelerate Configuration you want to set for the bucket.
  9149. //
  9150. // AccelerateConfiguration is a required field
  9151. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"`
  9152. // Name of the bucket for which the accelerate configuration is set.
  9153. //
  9154. // Bucket is a required field
  9155. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9156. }
  9157. // String returns the string representation
  9158. func (s PutBucketAccelerateConfigurationInput) String() string {
  9159. return awsutil.Prettify(s)
  9160. }
  9161. // GoString returns the string representation
  9162. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  9163. return s.String()
  9164. }
  9165. // Validate inspects the fields of the type to determine if they are valid.
  9166. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  9167. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  9168. if s.AccelerateConfiguration == nil {
  9169. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  9170. }
  9171. if s.Bucket == nil {
  9172. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9173. }
  9174. if invalidParams.Len() > 0 {
  9175. return invalidParams
  9176. }
  9177. return nil
  9178. }
  9179. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  9180. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  9181. s.AccelerateConfiguration = v
  9182. return s
  9183. }
  9184. // SetBucket sets the Bucket field's value.
  9185. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  9186. s.Bucket = &v
  9187. return s
  9188. }
  9189. type PutBucketAccelerateConfigurationOutput struct {
  9190. _ struct{} `type:"structure"`
  9191. }
  9192. // String returns the string representation
  9193. func (s PutBucketAccelerateConfigurationOutput) String() string {
  9194. return awsutil.Prettify(s)
  9195. }
  9196. // GoString returns the string representation
  9197. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  9198. return s.String()
  9199. }
  9200. type PutBucketAclInput struct {
  9201. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  9202. // The canned ACL to apply to the bucket.
  9203. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  9204. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  9205. // Bucket is a required field
  9206. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9207. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  9208. // bucket.
  9209. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  9210. // Allows grantee to list the objects in the bucket.
  9211. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  9212. // Allows grantee to read the bucket ACL.
  9213. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  9214. // Allows grantee to create, overwrite, and delete any object in the bucket.
  9215. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  9216. // Allows grantee to write the ACL for the applicable bucket.
  9217. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  9218. }
  9219. // String returns the string representation
  9220. func (s PutBucketAclInput) String() string {
  9221. return awsutil.Prettify(s)
  9222. }
  9223. // GoString returns the string representation
  9224. func (s PutBucketAclInput) GoString() string {
  9225. return s.String()
  9226. }
  9227. // Validate inspects the fields of the type to determine if they are valid.
  9228. func (s *PutBucketAclInput) Validate() error {
  9229. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  9230. if s.Bucket == nil {
  9231. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9232. }
  9233. if s.AccessControlPolicy != nil {
  9234. if err := s.AccessControlPolicy.Validate(); err != nil {
  9235. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  9236. }
  9237. }
  9238. if invalidParams.Len() > 0 {
  9239. return invalidParams
  9240. }
  9241. return nil
  9242. }
  9243. // SetACL sets the ACL field's value.
  9244. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  9245. s.ACL = &v
  9246. return s
  9247. }
  9248. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  9249. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  9250. s.AccessControlPolicy = v
  9251. return s
  9252. }
  9253. // SetBucket sets the Bucket field's value.
  9254. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  9255. s.Bucket = &v
  9256. return s
  9257. }
  9258. // SetGrantFullControl sets the GrantFullControl field's value.
  9259. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  9260. s.GrantFullControl = &v
  9261. return s
  9262. }
  9263. // SetGrantRead sets the GrantRead field's value.
  9264. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  9265. s.GrantRead = &v
  9266. return s
  9267. }
  9268. // SetGrantReadACP sets the GrantReadACP field's value.
  9269. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  9270. s.GrantReadACP = &v
  9271. return s
  9272. }
  9273. // SetGrantWrite sets the GrantWrite field's value.
  9274. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  9275. s.GrantWrite = &v
  9276. return s
  9277. }
  9278. // SetGrantWriteACP sets the GrantWriteACP field's value.
  9279. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  9280. s.GrantWriteACP = &v
  9281. return s
  9282. }
  9283. type PutBucketAclOutput struct {
  9284. _ struct{} `type:"structure"`
  9285. }
  9286. // String returns the string representation
  9287. func (s PutBucketAclOutput) String() string {
  9288. return awsutil.Prettify(s)
  9289. }
  9290. // GoString returns the string representation
  9291. func (s PutBucketAclOutput) GoString() string {
  9292. return s.String()
  9293. }
  9294. type PutBucketCorsInput struct {
  9295. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  9296. // Bucket is a required field
  9297. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9298. // CORSConfiguration is a required field
  9299. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true"`
  9300. }
  9301. // String returns the string representation
  9302. func (s PutBucketCorsInput) String() string {
  9303. return awsutil.Prettify(s)
  9304. }
  9305. // GoString returns the string representation
  9306. func (s PutBucketCorsInput) GoString() string {
  9307. return s.String()
  9308. }
  9309. // Validate inspects the fields of the type to determine if they are valid.
  9310. func (s *PutBucketCorsInput) Validate() error {
  9311. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  9312. if s.Bucket == nil {
  9313. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9314. }
  9315. if s.CORSConfiguration == nil {
  9316. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  9317. }
  9318. if s.CORSConfiguration != nil {
  9319. if err := s.CORSConfiguration.Validate(); err != nil {
  9320. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  9321. }
  9322. }
  9323. if invalidParams.Len() > 0 {
  9324. return invalidParams
  9325. }
  9326. return nil
  9327. }
  9328. // SetBucket sets the Bucket field's value.
  9329. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  9330. s.Bucket = &v
  9331. return s
  9332. }
  9333. // SetCORSConfiguration sets the CORSConfiguration field's value.
  9334. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  9335. s.CORSConfiguration = v
  9336. return s
  9337. }
  9338. type PutBucketCorsOutput struct {
  9339. _ struct{} `type:"structure"`
  9340. }
  9341. // String returns the string representation
  9342. func (s PutBucketCorsOutput) String() string {
  9343. return awsutil.Prettify(s)
  9344. }
  9345. // GoString returns the string representation
  9346. func (s PutBucketCorsOutput) GoString() string {
  9347. return s.String()
  9348. }
  9349. type PutBucketLifecycleConfigurationInput struct {
  9350. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  9351. // Bucket is a required field
  9352. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9353. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
  9354. }
  9355. // String returns the string representation
  9356. func (s PutBucketLifecycleConfigurationInput) String() string {
  9357. return awsutil.Prettify(s)
  9358. }
  9359. // GoString returns the string representation
  9360. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  9361. return s.String()
  9362. }
  9363. // Validate inspects the fields of the type to determine if they are valid.
  9364. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  9365. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  9366. if s.Bucket == nil {
  9367. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9368. }
  9369. if s.LifecycleConfiguration != nil {
  9370. if err := s.LifecycleConfiguration.Validate(); err != nil {
  9371. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  9372. }
  9373. }
  9374. if invalidParams.Len() > 0 {
  9375. return invalidParams
  9376. }
  9377. return nil
  9378. }
  9379. // SetBucket sets the Bucket field's value.
  9380. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  9381. s.Bucket = &v
  9382. return s
  9383. }
  9384. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  9385. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  9386. s.LifecycleConfiguration = v
  9387. return s
  9388. }
  9389. type PutBucketLifecycleConfigurationOutput struct {
  9390. _ struct{} `type:"structure"`
  9391. }
  9392. // String returns the string representation
  9393. func (s PutBucketLifecycleConfigurationOutput) String() string {
  9394. return awsutil.Prettify(s)
  9395. }
  9396. // GoString returns the string representation
  9397. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  9398. return s.String()
  9399. }
  9400. type PutBucketLifecycleInput struct {
  9401. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  9402. // Bucket is a required field
  9403. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9404. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
  9405. }
  9406. // String returns the string representation
  9407. func (s PutBucketLifecycleInput) String() string {
  9408. return awsutil.Prettify(s)
  9409. }
  9410. // GoString returns the string representation
  9411. func (s PutBucketLifecycleInput) GoString() string {
  9412. return s.String()
  9413. }
  9414. // Validate inspects the fields of the type to determine if they are valid.
  9415. func (s *PutBucketLifecycleInput) Validate() error {
  9416. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  9417. if s.Bucket == nil {
  9418. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9419. }
  9420. if s.LifecycleConfiguration != nil {
  9421. if err := s.LifecycleConfiguration.Validate(); err != nil {
  9422. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  9423. }
  9424. }
  9425. if invalidParams.Len() > 0 {
  9426. return invalidParams
  9427. }
  9428. return nil
  9429. }
  9430. // SetBucket sets the Bucket field's value.
  9431. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  9432. s.Bucket = &v
  9433. return s
  9434. }
  9435. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  9436. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  9437. s.LifecycleConfiguration = v
  9438. return s
  9439. }
  9440. type PutBucketLifecycleOutput struct {
  9441. _ struct{} `type:"structure"`
  9442. }
  9443. // String returns the string representation
  9444. func (s PutBucketLifecycleOutput) String() string {
  9445. return awsutil.Prettify(s)
  9446. }
  9447. // GoString returns the string representation
  9448. func (s PutBucketLifecycleOutput) GoString() string {
  9449. return s.String()
  9450. }
  9451. type PutBucketLoggingInput struct {
  9452. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  9453. // Bucket is a required field
  9454. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9455. // BucketLoggingStatus is a required field
  9456. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true"`
  9457. }
  9458. // String returns the string representation
  9459. func (s PutBucketLoggingInput) String() string {
  9460. return awsutil.Prettify(s)
  9461. }
  9462. // GoString returns the string representation
  9463. func (s PutBucketLoggingInput) GoString() string {
  9464. return s.String()
  9465. }
  9466. // Validate inspects the fields of the type to determine if they are valid.
  9467. func (s *PutBucketLoggingInput) Validate() error {
  9468. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  9469. if s.Bucket == nil {
  9470. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9471. }
  9472. if s.BucketLoggingStatus == nil {
  9473. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  9474. }
  9475. if s.BucketLoggingStatus != nil {
  9476. if err := s.BucketLoggingStatus.Validate(); err != nil {
  9477. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  9478. }
  9479. }
  9480. if invalidParams.Len() > 0 {
  9481. return invalidParams
  9482. }
  9483. return nil
  9484. }
  9485. // SetBucket sets the Bucket field's value.
  9486. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  9487. s.Bucket = &v
  9488. return s
  9489. }
  9490. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  9491. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  9492. s.BucketLoggingStatus = v
  9493. return s
  9494. }
  9495. type PutBucketLoggingOutput struct {
  9496. _ struct{} `type:"structure"`
  9497. }
  9498. // String returns the string representation
  9499. func (s PutBucketLoggingOutput) String() string {
  9500. return awsutil.Prettify(s)
  9501. }
  9502. // GoString returns the string representation
  9503. func (s PutBucketLoggingOutput) GoString() string {
  9504. return s.String()
  9505. }
  9506. type PutBucketNotificationConfigurationInput struct {
  9507. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  9508. // Bucket is a required field
  9509. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9510. // Container for specifying the notification configuration of the bucket. If
  9511. // this element is empty, notifications are turned off on the bucket.
  9512. //
  9513. // NotificationConfiguration is a required field
  9514. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  9515. }
  9516. // String returns the string representation
  9517. func (s PutBucketNotificationConfigurationInput) String() string {
  9518. return awsutil.Prettify(s)
  9519. }
  9520. // GoString returns the string representation
  9521. func (s PutBucketNotificationConfigurationInput) GoString() string {
  9522. return s.String()
  9523. }
  9524. // Validate inspects the fields of the type to determine if they are valid.
  9525. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  9526. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  9527. if s.Bucket == nil {
  9528. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9529. }
  9530. if s.NotificationConfiguration == nil {
  9531. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  9532. }
  9533. if s.NotificationConfiguration != nil {
  9534. if err := s.NotificationConfiguration.Validate(); err != nil {
  9535. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  9536. }
  9537. }
  9538. if invalidParams.Len() > 0 {
  9539. return invalidParams
  9540. }
  9541. return nil
  9542. }
  9543. // SetBucket sets the Bucket field's value.
  9544. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  9545. s.Bucket = &v
  9546. return s
  9547. }
  9548. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  9549. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  9550. s.NotificationConfiguration = v
  9551. return s
  9552. }
  9553. type PutBucketNotificationConfigurationOutput struct {
  9554. _ struct{} `type:"structure"`
  9555. }
  9556. // String returns the string representation
  9557. func (s PutBucketNotificationConfigurationOutput) String() string {
  9558. return awsutil.Prettify(s)
  9559. }
  9560. // GoString returns the string representation
  9561. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  9562. return s.String()
  9563. }
  9564. type PutBucketNotificationInput struct {
  9565. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  9566. // Bucket is a required field
  9567. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9568. // NotificationConfiguration is a required field
  9569. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  9570. }
  9571. // String returns the string representation
  9572. func (s PutBucketNotificationInput) String() string {
  9573. return awsutil.Prettify(s)
  9574. }
  9575. // GoString returns the string representation
  9576. func (s PutBucketNotificationInput) GoString() string {
  9577. return s.String()
  9578. }
  9579. // Validate inspects the fields of the type to determine if they are valid.
  9580. func (s *PutBucketNotificationInput) Validate() error {
  9581. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  9582. if s.Bucket == nil {
  9583. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9584. }
  9585. if s.NotificationConfiguration == nil {
  9586. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  9587. }
  9588. if invalidParams.Len() > 0 {
  9589. return invalidParams
  9590. }
  9591. return nil
  9592. }
  9593. // SetBucket sets the Bucket field's value.
  9594. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  9595. s.Bucket = &v
  9596. return s
  9597. }
  9598. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  9599. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  9600. s.NotificationConfiguration = v
  9601. return s
  9602. }
  9603. type PutBucketNotificationOutput struct {
  9604. _ struct{} `type:"structure"`
  9605. }
  9606. // String returns the string representation
  9607. func (s PutBucketNotificationOutput) String() string {
  9608. return awsutil.Prettify(s)
  9609. }
  9610. // GoString returns the string representation
  9611. func (s PutBucketNotificationOutput) GoString() string {
  9612. return s.String()
  9613. }
  9614. type PutBucketPolicyInput struct {
  9615. _ struct{} `type:"structure" payload:"Policy"`
  9616. // Bucket is a required field
  9617. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9618. // The bucket policy as a JSON document.
  9619. //
  9620. // Policy is a required field
  9621. Policy *string `type:"string" required:"true"`
  9622. }
  9623. // String returns the string representation
  9624. func (s PutBucketPolicyInput) String() string {
  9625. return awsutil.Prettify(s)
  9626. }
  9627. // GoString returns the string representation
  9628. func (s PutBucketPolicyInput) GoString() string {
  9629. return s.String()
  9630. }
  9631. // Validate inspects the fields of the type to determine if they are valid.
  9632. func (s *PutBucketPolicyInput) Validate() error {
  9633. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  9634. if s.Bucket == nil {
  9635. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9636. }
  9637. if s.Policy == nil {
  9638. invalidParams.Add(request.NewErrParamRequired("Policy"))
  9639. }
  9640. if invalidParams.Len() > 0 {
  9641. return invalidParams
  9642. }
  9643. return nil
  9644. }
  9645. // SetBucket sets the Bucket field's value.
  9646. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  9647. s.Bucket = &v
  9648. return s
  9649. }
  9650. // SetPolicy sets the Policy field's value.
  9651. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  9652. s.Policy = &v
  9653. return s
  9654. }
  9655. type PutBucketPolicyOutput struct {
  9656. _ struct{} `type:"structure"`
  9657. }
  9658. // String returns the string representation
  9659. func (s PutBucketPolicyOutput) String() string {
  9660. return awsutil.Prettify(s)
  9661. }
  9662. // GoString returns the string representation
  9663. func (s PutBucketPolicyOutput) GoString() string {
  9664. return s.String()
  9665. }
  9666. type PutBucketReplicationInput struct {
  9667. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  9668. // Bucket is a required field
  9669. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9670. // Container for replication rules. You can add as many as 1,000 rules. Total
  9671. // replication configuration size can be up to 2 MB.
  9672. //
  9673. // ReplicationConfiguration is a required field
  9674. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true"`
  9675. }
  9676. // String returns the string representation
  9677. func (s PutBucketReplicationInput) String() string {
  9678. return awsutil.Prettify(s)
  9679. }
  9680. // GoString returns the string representation
  9681. func (s PutBucketReplicationInput) GoString() string {
  9682. return s.String()
  9683. }
  9684. // Validate inspects the fields of the type to determine if they are valid.
  9685. func (s *PutBucketReplicationInput) Validate() error {
  9686. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  9687. if s.Bucket == nil {
  9688. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9689. }
  9690. if s.ReplicationConfiguration == nil {
  9691. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  9692. }
  9693. if s.ReplicationConfiguration != nil {
  9694. if err := s.ReplicationConfiguration.Validate(); err != nil {
  9695. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  9696. }
  9697. }
  9698. if invalidParams.Len() > 0 {
  9699. return invalidParams
  9700. }
  9701. return nil
  9702. }
  9703. // SetBucket sets the Bucket field's value.
  9704. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  9705. s.Bucket = &v
  9706. return s
  9707. }
  9708. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  9709. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  9710. s.ReplicationConfiguration = v
  9711. return s
  9712. }
  9713. type PutBucketReplicationOutput struct {
  9714. _ struct{} `type:"structure"`
  9715. }
  9716. // String returns the string representation
  9717. func (s PutBucketReplicationOutput) String() string {
  9718. return awsutil.Prettify(s)
  9719. }
  9720. // GoString returns the string representation
  9721. func (s PutBucketReplicationOutput) GoString() string {
  9722. return s.String()
  9723. }
  9724. type PutBucketRequestPaymentInput struct {
  9725. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  9726. // Bucket is a required field
  9727. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9728. // RequestPaymentConfiguration is a required field
  9729. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"`
  9730. }
  9731. // String returns the string representation
  9732. func (s PutBucketRequestPaymentInput) String() string {
  9733. return awsutil.Prettify(s)
  9734. }
  9735. // GoString returns the string representation
  9736. func (s PutBucketRequestPaymentInput) GoString() string {
  9737. return s.String()
  9738. }
  9739. // Validate inspects the fields of the type to determine if they are valid.
  9740. func (s *PutBucketRequestPaymentInput) Validate() error {
  9741. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  9742. if s.Bucket == nil {
  9743. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9744. }
  9745. if s.RequestPaymentConfiguration == nil {
  9746. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  9747. }
  9748. if s.RequestPaymentConfiguration != nil {
  9749. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  9750. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  9751. }
  9752. }
  9753. if invalidParams.Len() > 0 {
  9754. return invalidParams
  9755. }
  9756. return nil
  9757. }
  9758. // SetBucket sets the Bucket field's value.
  9759. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  9760. s.Bucket = &v
  9761. return s
  9762. }
  9763. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  9764. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  9765. s.RequestPaymentConfiguration = v
  9766. return s
  9767. }
  9768. type PutBucketRequestPaymentOutput struct {
  9769. _ struct{} `type:"structure"`
  9770. }
  9771. // String returns the string representation
  9772. func (s PutBucketRequestPaymentOutput) String() string {
  9773. return awsutil.Prettify(s)
  9774. }
  9775. // GoString returns the string representation
  9776. func (s PutBucketRequestPaymentOutput) GoString() string {
  9777. return s.String()
  9778. }
  9779. type PutBucketTaggingInput struct {
  9780. _ struct{} `type:"structure" payload:"Tagging"`
  9781. // Bucket is a required field
  9782. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9783. // Tagging is a required field
  9784. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
  9785. }
  9786. // String returns the string representation
  9787. func (s PutBucketTaggingInput) String() string {
  9788. return awsutil.Prettify(s)
  9789. }
  9790. // GoString returns the string representation
  9791. func (s PutBucketTaggingInput) GoString() string {
  9792. return s.String()
  9793. }
  9794. // Validate inspects the fields of the type to determine if they are valid.
  9795. func (s *PutBucketTaggingInput) Validate() error {
  9796. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  9797. if s.Bucket == nil {
  9798. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9799. }
  9800. if s.Tagging == nil {
  9801. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  9802. }
  9803. if s.Tagging != nil {
  9804. if err := s.Tagging.Validate(); err != nil {
  9805. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  9806. }
  9807. }
  9808. if invalidParams.Len() > 0 {
  9809. return invalidParams
  9810. }
  9811. return nil
  9812. }
  9813. // SetBucket sets the Bucket field's value.
  9814. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  9815. s.Bucket = &v
  9816. return s
  9817. }
  9818. // SetTagging sets the Tagging field's value.
  9819. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  9820. s.Tagging = v
  9821. return s
  9822. }
  9823. type PutBucketTaggingOutput struct {
  9824. _ struct{} `type:"structure"`
  9825. }
  9826. // String returns the string representation
  9827. func (s PutBucketTaggingOutput) String() string {
  9828. return awsutil.Prettify(s)
  9829. }
  9830. // GoString returns the string representation
  9831. func (s PutBucketTaggingOutput) GoString() string {
  9832. return s.String()
  9833. }
  9834. type PutBucketVersioningInput struct {
  9835. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  9836. // Bucket is a required field
  9837. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9838. // The concatenation of the authentication device's serial number, a space,
  9839. // and the value that is displayed on your authentication device.
  9840. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9841. // VersioningConfiguration is a required field
  9842. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"`
  9843. }
  9844. // String returns the string representation
  9845. func (s PutBucketVersioningInput) String() string {
  9846. return awsutil.Prettify(s)
  9847. }
  9848. // GoString returns the string representation
  9849. func (s PutBucketVersioningInput) GoString() string {
  9850. return s.String()
  9851. }
  9852. // Validate inspects the fields of the type to determine if they are valid.
  9853. func (s *PutBucketVersioningInput) Validate() error {
  9854. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  9855. if s.Bucket == nil {
  9856. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9857. }
  9858. if s.VersioningConfiguration == nil {
  9859. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  9860. }
  9861. if invalidParams.Len() > 0 {
  9862. return invalidParams
  9863. }
  9864. return nil
  9865. }
  9866. // SetBucket sets the Bucket field's value.
  9867. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  9868. s.Bucket = &v
  9869. return s
  9870. }
  9871. // SetMFA sets the MFA field's value.
  9872. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  9873. s.MFA = &v
  9874. return s
  9875. }
  9876. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  9877. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  9878. s.VersioningConfiguration = v
  9879. return s
  9880. }
  9881. type PutBucketVersioningOutput struct {
  9882. _ struct{} `type:"structure"`
  9883. }
  9884. // String returns the string representation
  9885. func (s PutBucketVersioningOutput) String() string {
  9886. return awsutil.Prettify(s)
  9887. }
  9888. // GoString returns the string representation
  9889. func (s PutBucketVersioningOutput) GoString() string {
  9890. return s.String()
  9891. }
  9892. type PutBucketWebsiteInput struct {
  9893. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  9894. // Bucket is a required field
  9895. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9896. // WebsiteConfiguration is a required field
  9897. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"`
  9898. }
  9899. // String returns the string representation
  9900. func (s PutBucketWebsiteInput) String() string {
  9901. return awsutil.Prettify(s)
  9902. }
  9903. // GoString returns the string representation
  9904. func (s PutBucketWebsiteInput) GoString() string {
  9905. return s.String()
  9906. }
  9907. // Validate inspects the fields of the type to determine if they are valid.
  9908. func (s *PutBucketWebsiteInput) Validate() error {
  9909. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  9910. if s.Bucket == nil {
  9911. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9912. }
  9913. if s.WebsiteConfiguration == nil {
  9914. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  9915. }
  9916. if s.WebsiteConfiguration != nil {
  9917. if err := s.WebsiteConfiguration.Validate(); err != nil {
  9918. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  9919. }
  9920. }
  9921. if invalidParams.Len() > 0 {
  9922. return invalidParams
  9923. }
  9924. return nil
  9925. }
  9926. // SetBucket sets the Bucket field's value.
  9927. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  9928. s.Bucket = &v
  9929. return s
  9930. }
  9931. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  9932. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  9933. s.WebsiteConfiguration = v
  9934. return s
  9935. }
  9936. type PutBucketWebsiteOutput struct {
  9937. _ struct{} `type:"structure"`
  9938. }
  9939. // String returns the string representation
  9940. func (s PutBucketWebsiteOutput) String() string {
  9941. return awsutil.Prettify(s)
  9942. }
  9943. // GoString returns the string representation
  9944. func (s PutBucketWebsiteOutput) GoString() string {
  9945. return s.String()
  9946. }
  9947. type PutObjectAclInput struct {
  9948. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  9949. // The canned ACL to apply to the object.
  9950. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  9951. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  9952. // Bucket is a required field
  9953. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9954. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  9955. // bucket.
  9956. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  9957. // Allows grantee to list the objects in the bucket.
  9958. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  9959. // Allows grantee to read the bucket ACL.
  9960. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  9961. // Allows grantee to create, overwrite, and delete any object in the bucket.
  9962. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  9963. // Allows grantee to write the ACL for the applicable bucket.
  9964. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  9965. // Key is a required field
  9966. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9967. // Confirms that the requester knows that she or he will be charged for the
  9968. // request. Bucket owners need not specify this parameter in their requests.
  9969. // Documentation on downloading objects from requester pays buckets can be found
  9970. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9971. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9972. // VersionId used to reference a specific version of the object.
  9973. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9974. }
  9975. // String returns the string representation
  9976. func (s PutObjectAclInput) String() string {
  9977. return awsutil.Prettify(s)
  9978. }
  9979. // GoString returns the string representation
  9980. func (s PutObjectAclInput) GoString() string {
  9981. return s.String()
  9982. }
  9983. // Validate inspects the fields of the type to determine if they are valid.
  9984. func (s *PutObjectAclInput) Validate() error {
  9985. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  9986. if s.Bucket == nil {
  9987. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9988. }
  9989. if s.Key == nil {
  9990. invalidParams.Add(request.NewErrParamRequired("Key"))
  9991. }
  9992. if s.Key != nil && len(*s.Key) < 1 {
  9993. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9994. }
  9995. if s.AccessControlPolicy != nil {
  9996. if err := s.AccessControlPolicy.Validate(); err != nil {
  9997. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  9998. }
  9999. }
  10000. if invalidParams.Len() > 0 {
  10001. return invalidParams
  10002. }
  10003. return nil
  10004. }
  10005. // SetACL sets the ACL field's value.
  10006. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  10007. s.ACL = &v
  10008. return s
  10009. }
  10010. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  10011. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  10012. s.AccessControlPolicy = v
  10013. return s
  10014. }
  10015. // SetBucket sets the Bucket field's value.
  10016. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  10017. s.Bucket = &v
  10018. return s
  10019. }
  10020. // SetGrantFullControl sets the GrantFullControl field's value.
  10021. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  10022. s.GrantFullControl = &v
  10023. return s
  10024. }
  10025. // SetGrantRead sets the GrantRead field's value.
  10026. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  10027. s.GrantRead = &v
  10028. return s
  10029. }
  10030. // SetGrantReadACP sets the GrantReadACP field's value.
  10031. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  10032. s.GrantReadACP = &v
  10033. return s
  10034. }
  10035. // SetGrantWrite sets the GrantWrite field's value.
  10036. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  10037. s.GrantWrite = &v
  10038. return s
  10039. }
  10040. // SetGrantWriteACP sets the GrantWriteACP field's value.
  10041. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  10042. s.GrantWriteACP = &v
  10043. return s
  10044. }
  10045. // SetKey sets the Key field's value.
  10046. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  10047. s.Key = &v
  10048. return s
  10049. }
  10050. // SetRequestPayer sets the RequestPayer field's value.
  10051. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  10052. s.RequestPayer = &v
  10053. return s
  10054. }
  10055. // SetVersionId sets the VersionId field's value.
  10056. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  10057. s.VersionId = &v
  10058. return s
  10059. }
  10060. type PutObjectAclOutput struct {
  10061. _ struct{} `type:"structure"`
  10062. // If present, indicates that the requester was successfully charged for the
  10063. // request.
  10064. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10065. }
  10066. // String returns the string representation
  10067. func (s PutObjectAclOutput) String() string {
  10068. return awsutil.Prettify(s)
  10069. }
  10070. // GoString returns the string representation
  10071. func (s PutObjectAclOutput) GoString() string {
  10072. return s.String()
  10073. }
  10074. // SetRequestCharged sets the RequestCharged field's value.
  10075. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  10076. s.RequestCharged = &v
  10077. return s
  10078. }
  10079. type PutObjectInput struct {
  10080. _ struct{} `type:"structure" payload:"Body"`
  10081. // The canned ACL to apply to the object.
  10082. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  10083. // Object data.
  10084. Body io.ReadSeeker `type:"blob"`
  10085. // Name of the bucket to which the PUT operation was initiated.
  10086. //
  10087. // Bucket is a required field
  10088. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10089. // Specifies caching behavior along the request/reply chain.
  10090. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10091. // Specifies presentational information for the object.
  10092. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10093. // Specifies what content encodings have been applied to the object and thus
  10094. // what decoding mechanisms must be applied to obtain the media-type referenced
  10095. // by the Content-Type header field.
  10096. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10097. // The language the content is in.
  10098. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10099. // Size of the body in bytes. This parameter is useful when the size of the
  10100. // body cannot be determined automatically.
  10101. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10102. // A standard MIME type describing the format of the object data.
  10103. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10104. // The date and time at which the object is no longer cacheable.
  10105. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  10106. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  10107. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  10108. // Allows grantee to read the object data and its metadata.
  10109. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  10110. // Allows grantee to read the object ACL.
  10111. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  10112. // Allows grantee to write the ACL for the applicable object.
  10113. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  10114. // Object key for which the PUT operation was initiated.
  10115. //
  10116. // Key is a required field
  10117. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10118. // A map of metadata to store with the object in S3.
  10119. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10120. // Confirms that the requester knows that she or he will be charged for the
  10121. // request. Bucket owners need not specify this parameter in their requests.
  10122. // Documentation on downloading objects from requester pays buckets can be found
  10123. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10124. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10125. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10126. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10127. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10128. // data. This value is used to store the object and then it is discarded; Amazon
  10129. // does not store the encryption key. The key must be appropriate for use with
  10130. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10131. // header.
  10132. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10133. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10134. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10135. // key was transmitted without error.
  10136. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10137. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  10138. // requests for an object protected by AWS KMS will fail if not made via SSL
  10139. // or using SigV4. Documentation on configuring any of the officially supported
  10140. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  10141. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10142. // The Server-side encryption algorithm used when storing this object in S3
  10143. // (e.g., AES256, aws:kms).
  10144. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10145. // The type of storage to use for the object. Defaults to 'STANDARD'.
  10146. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10147. // If the bucket is configured as a website, redirects requests for this object
  10148. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10149. // the value of this header in the object metadata.
  10150. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10151. }
  10152. // String returns the string representation
  10153. func (s PutObjectInput) String() string {
  10154. return awsutil.Prettify(s)
  10155. }
  10156. // GoString returns the string representation
  10157. func (s PutObjectInput) GoString() string {
  10158. return s.String()
  10159. }
  10160. // Validate inspects the fields of the type to determine if they are valid.
  10161. func (s *PutObjectInput) Validate() error {
  10162. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  10163. if s.Bucket == nil {
  10164. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10165. }
  10166. if s.Key == nil {
  10167. invalidParams.Add(request.NewErrParamRequired("Key"))
  10168. }
  10169. if s.Key != nil && len(*s.Key) < 1 {
  10170. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10171. }
  10172. if invalidParams.Len() > 0 {
  10173. return invalidParams
  10174. }
  10175. return nil
  10176. }
  10177. // SetACL sets the ACL field's value.
  10178. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  10179. s.ACL = &v
  10180. return s
  10181. }
  10182. // SetBody sets the Body field's value.
  10183. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  10184. s.Body = v
  10185. return s
  10186. }
  10187. // SetBucket sets the Bucket field's value.
  10188. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  10189. s.Bucket = &v
  10190. return s
  10191. }
  10192. // SetCacheControl sets the CacheControl field's value.
  10193. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  10194. s.CacheControl = &v
  10195. return s
  10196. }
  10197. // SetContentDisposition sets the ContentDisposition field's value.
  10198. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  10199. s.ContentDisposition = &v
  10200. return s
  10201. }
  10202. // SetContentEncoding sets the ContentEncoding field's value.
  10203. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  10204. s.ContentEncoding = &v
  10205. return s
  10206. }
  10207. // SetContentLanguage sets the ContentLanguage field's value.
  10208. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  10209. s.ContentLanguage = &v
  10210. return s
  10211. }
  10212. // SetContentLength sets the ContentLength field's value.
  10213. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  10214. s.ContentLength = &v
  10215. return s
  10216. }
  10217. // SetContentType sets the ContentType field's value.
  10218. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  10219. s.ContentType = &v
  10220. return s
  10221. }
  10222. // SetExpires sets the Expires field's value.
  10223. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  10224. s.Expires = &v
  10225. return s
  10226. }
  10227. // SetGrantFullControl sets the GrantFullControl field's value.
  10228. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  10229. s.GrantFullControl = &v
  10230. return s
  10231. }
  10232. // SetGrantRead sets the GrantRead field's value.
  10233. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  10234. s.GrantRead = &v
  10235. return s
  10236. }
  10237. // SetGrantReadACP sets the GrantReadACP field's value.
  10238. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  10239. s.GrantReadACP = &v
  10240. return s
  10241. }
  10242. // SetGrantWriteACP sets the GrantWriteACP field's value.
  10243. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  10244. s.GrantWriteACP = &v
  10245. return s
  10246. }
  10247. // SetKey sets the Key field's value.
  10248. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  10249. s.Key = &v
  10250. return s
  10251. }
  10252. // SetMetadata sets the Metadata field's value.
  10253. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  10254. s.Metadata = v
  10255. return s
  10256. }
  10257. // SetRequestPayer sets the RequestPayer field's value.
  10258. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  10259. s.RequestPayer = &v
  10260. return s
  10261. }
  10262. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10263. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  10264. s.SSECustomerAlgorithm = &v
  10265. return s
  10266. }
  10267. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10268. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  10269. s.SSECustomerKey = &v
  10270. return s
  10271. }
  10272. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10273. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  10274. s.SSECustomerKeyMD5 = &v
  10275. return s
  10276. }
  10277. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10278. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  10279. s.SSEKMSKeyId = &v
  10280. return s
  10281. }
  10282. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10283. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  10284. s.ServerSideEncryption = &v
  10285. return s
  10286. }
  10287. // SetStorageClass sets the StorageClass field's value.
  10288. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  10289. s.StorageClass = &v
  10290. return s
  10291. }
  10292. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  10293. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  10294. s.WebsiteRedirectLocation = &v
  10295. return s
  10296. }
  10297. type PutObjectOutput struct {
  10298. _ struct{} `type:"structure"`
  10299. // Entity tag for the uploaded object.
  10300. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10301. // If the object expiration is configured, this will contain the expiration
  10302. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  10303. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10304. // If present, indicates that the requester was successfully charged for the
  10305. // request.
  10306. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10307. // If server-side encryption with a customer-provided encryption key was requested,
  10308. // the response will include this header confirming the encryption algorithm
  10309. // used.
  10310. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10311. // If server-side encryption with a customer-provided encryption key was requested,
  10312. // the response will include this header to provide round trip message integrity
  10313. // verification of the customer-provided encryption key.
  10314. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10315. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10316. // encryption key that was used for the object.
  10317. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10318. // The Server-side encryption algorithm used when storing this object in S3
  10319. // (e.g., AES256, aws:kms).
  10320. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10321. // Version of the object.
  10322. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10323. }
  10324. // String returns the string representation
  10325. func (s PutObjectOutput) String() string {
  10326. return awsutil.Prettify(s)
  10327. }
  10328. // GoString returns the string representation
  10329. func (s PutObjectOutput) GoString() string {
  10330. return s.String()
  10331. }
  10332. // SetETag sets the ETag field's value.
  10333. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  10334. s.ETag = &v
  10335. return s
  10336. }
  10337. // SetExpiration sets the Expiration field's value.
  10338. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  10339. s.Expiration = &v
  10340. return s
  10341. }
  10342. // SetRequestCharged sets the RequestCharged field's value.
  10343. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  10344. s.RequestCharged = &v
  10345. return s
  10346. }
  10347. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10348. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  10349. s.SSECustomerAlgorithm = &v
  10350. return s
  10351. }
  10352. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10353. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  10354. s.SSECustomerKeyMD5 = &v
  10355. return s
  10356. }
  10357. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10358. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  10359. s.SSEKMSKeyId = &v
  10360. return s
  10361. }
  10362. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10363. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  10364. s.ServerSideEncryption = &v
  10365. return s
  10366. }
  10367. // SetVersionId sets the VersionId field's value.
  10368. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  10369. s.VersionId = &v
  10370. return s
  10371. }
  10372. // Container for specifying an configuration when you want Amazon S3 to publish
  10373. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  10374. type QueueConfiguration struct {
  10375. _ struct{} `type:"structure"`
  10376. // Events is a required field
  10377. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  10378. // Container for object key name filtering rules. For information about key
  10379. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  10380. Filter *NotificationConfigurationFilter `type:"structure"`
  10381. // Optional unique identifier for configurations in a notification configuration.
  10382. // If you don't provide one, Amazon S3 will assign an ID.
  10383. Id *string `type:"string"`
  10384. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  10385. // events of specified type.
  10386. //
  10387. // QueueArn is a required field
  10388. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  10389. }
  10390. // String returns the string representation
  10391. func (s QueueConfiguration) String() string {
  10392. return awsutil.Prettify(s)
  10393. }
  10394. // GoString returns the string representation
  10395. func (s QueueConfiguration) GoString() string {
  10396. return s.String()
  10397. }
  10398. // Validate inspects the fields of the type to determine if they are valid.
  10399. func (s *QueueConfiguration) Validate() error {
  10400. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  10401. if s.Events == nil {
  10402. invalidParams.Add(request.NewErrParamRequired("Events"))
  10403. }
  10404. if s.QueueArn == nil {
  10405. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  10406. }
  10407. if invalidParams.Len() > 0 {
  10408. return invalidParams
  10409. }
  10410. return nil
  10411. }
  10412. // SetEvents sets the Events field's value.
  10413. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  10414. s.Events = v
  10415. return s
  10416. }
  10417. // SetFilter sets the Filter field's value.
  10418. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  10419. s.Filter = v
  10420. return s
  10421. }
  10422. // SetId sets the Id field's value.
  10423. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  10424. s.Id = &v
  10425. return s
  10426. }
  10427. // SetQueueArn sets the QueueArn field's value.
  10428. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  10429. s.QueueArn = &v
  10430. return s
  10431. }
  10432. type QueueConfigurationDeprecated struct {
  10433. _ struct{} `type:"structure"`
  10434. // Bucket event for which to send notifications.
  10435. Event *string `deprecated:"true" type:"string" enum:"Event"`
  10436. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  10437. // Optional unique identifier for configurations in a notification configuration.
  10438. // If you don't provide one, Amazon S3 will assign an ID.
  10439. Id *string `type:"string"`
  10440. Queue *string `type:"string"`
  10441. }
  10442. // String returns the string representation
  10443. func (s QueueConfigurationDeprecated) String() string {
  10444. return awsutil.Prettify(s)
  10445. }
  10446. // GoString returns the string representation
  10447. func (s QueueConfigurationDeprecated) GoString() string {
  10448. return s.String()
  10449. }
  10450. // SetEvent sets the Event field's value.
  10451. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  10452. s.Event = &v
  10453. return s
  10454. }
  10455. // SetEvents sets the Events field's value.
  10456. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  10457. s.Events = v
  10458. return s
  10459. }
  10460. // SetId sets the Id field's value.
  10461. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  10462. s.Id = &v
  10463. return s
  10464. }
  10465. // SetQueue sets the Queue field's value.
  10466. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  10467. s.Queue = &v
  10468. return s
  10469. }
  10470. type Redirect struct {
  10471. _ struct{} `type:"structure"`
  10472. // The host name to use in the redirect request.
  10473. HostName *string `type:"string"`
  10474. // The HTTP redirect code to use on the response. Not required if one of the
  10475. // siblings is present.
  10476. HttpRedirectCode *string `type:"string"`
  10477. // Protocol to use (http, https) when redirecting requests. The default is the
  10478. // protocol that is used in the original request.
  10479. Protocol *string `type:"string" enum:"Protocol"`
  10480. // The object key prefix to use in the redirect request. For example, to redirect
  10481. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  10482. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  10483. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  10484. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  10485. // is not provided.
  10486. ReplaceKeyPrefixWith *string `type:"string"`
  10487. // The specific object key to use in the redirect request. For example, redirect
  10488. // request to error.html. Not required if one of the sibling is present. Can
  10489. // be present only if ReplaceKeyPrefixWith is not provided.
  10490. ReplaceKeyWith *string `type:"string"`
  10491. }
  10492. // String returns the string representation
  10493. func (s Redirect) String() string {
  10494. return awsutil.Prettify(s)
  10495. }
  10496. // GoString returns the string representation
  10497. func (s Redirect) GoString() string {
  10498. return s.String()
  10499. }
  10500. // SetHostName sets the HostName field's value.
  10501. func (s *Redirect) SetHostName(v string) *Redirect {
  10502. s.HostName = &v
  10503. return s
  10504. }
  10505. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  10506. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  10507. s.HttpRedirectCode = &v
  10508. return s
  10509. }
  10510. // SetProtocol sets the Protocol field's value.
  10511. func (s *Redirect) SetProtocol(v string) *Redirect {
  10512. s.Protocol = &v
  10513. return s
  10514. }
  10515. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  10516. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  10517. s.ReplaceKeyPrefixWith = &v
  10518. return s
  10519. }
  10520. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  10521. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  10522. s.ReplaceKeyWith = &v
  10523. return s
  10524. }
  10525. type RedirectAllRequestsTo struct {
  10526. _ struct{} `type:"structure"`
  10527. // Name of the host where requests will be redirected.
  10528. //
  10529. // HostName is a required field
  10530. HostName *string `type:"string" required:"true"`
  10531. // Protocol to use (http, https) when redirecting requests. The default is the
  10532. // protocol that is used in the original request.
  10533. Protocol *string `type:"string" enum:"Protocol"`
  10534. }
  10535. // String returns the string representation
  10536. func (s RedirectAllRequestsTo) String() string {
  10537. return awsutil.Prettify(s)
  10538. }
  10539. // GoString returns the string representation
  10540. func (s RedirectAllRequestsTo) GoString() string {
  10541. return s.String()
  10542. }
  10543. // Validate inspects the fields of the type to determine if they are valid.
  10544. func (s *RedirectAllRequestsTo) Validate() error {
  10545. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  10546. if s.HostName == nil {
  10547. invalidParams.Add(request.NewErrParamRequired("HostName"))
  10548. }
  10549. if invalidParams.Len() > 0 {
  10550. return invalidParams
  10551. }
  10552. return nil
  10553. }
  10554. // SetHostName sets the HostName field's value.
  10555. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  10556. s.HostName = &v
  10557. return s
  10558. }
  10559. // SetProtocol sets the Protocol field's value.
  10560. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  10561. s.Protocol = &v
  10562. return s
  10563. }
  10564. // Container for replication rules. You can add as many as 1,000 rules. Total
  10565. // replication configuration size can be up to 2 MB.
  10566. type ReplicationConfiguration struct {
  10567. _ struct{} `type:"structure"`
  10568. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  10569. // the objects.
  10570. //
  10571. // Role is a required field
  10572. Role *string `type:"string" required:"true"`
  10573. // Container for information about a particular replication rule. Replication
  10574. // configuration must have at least one rule and can contain up to 1,000 rules.
  10575. //
  10576. // Rules is a required field
  10577. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  10578. }
  10579. // String returns the string representation
  10580. func (s ReplicationConfiguration) String() string {
  10581. return awsutil.Prettify(s)
  10582. }
  10583. // GoString returns the string representation
  10584. func (s ReplicationConfiguration) GoString() string {
  10585. return s.String()
  10586. }
  10587. // Validate inspects the fields of the type to determine if they are valid.
  10588. func (s *ReplicationConfiguration) Validate() error {
  10589. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  10590. if s.Role == nil {
  10591. invalidParams.Add(request.NewErrParamRequired("Role"))
  10592. }
  10593. if s.Rules == nil {
  10594. invalidParams.Add(request.NewErrParamRequired("Rules"))
  10595. }
  10596. if s.Rules != nil {
  10597. for i, v := range s.Rules {
  10598. if v == nil {
  10599. continue
  10600. }
  10601. if err := v.Validate(); err != nil {
  10602. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  10603. }
  10604. }
  10605. }
  10606. if invalidParams.Len() > 0 {
  10607. return invalidParams
  10608. }
  10609. return nil
  10610. }
  10611. // SetRole sets the Role field's value.
  10612. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  10613. s.Role = &v
  10614. return s
  10615. }
  10616. // SetRules sets the Rules field's value.
  10617. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  10618. s.Rules = v
  10619. return s
  10620. }
  10621. type ReplicationRule struct {
  10622. _ struct{} `type:"structure"`
  10623. // Destination is a required field
  10624. Destination *Destination `type:"structure" required:"true"`
  10625. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  10626. ID *string `type:"string"`
  10627. // Object keyname prefix identifying one or more objects to which the rule applies.
  10628. // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes
  10629. // are not supported.
  10630. //
  10631. // Prefix is a required field
  10632. Prefix *string `type:"string" required:"true"`
  10633. // The rule is ignored if status is not Enabled.
  10634. //
  10635. // Status is a required field
  10636. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  10637. }
  10638. // String returns the string representation
  10639. func (s ReplicationRule) String() string {
  10640. return awsutil.Prettify(s)
  10641. }
  10642. // GoString returns the string representation
  10643. func (s ReplicationRule) GoString() string {
  10644. return s.String()
  10645. }
  10646. // Validate inspects the fields of the type to determine if they are valid.
  10647. func (s *ReplicationRule) Validate() error {
  10648. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  10649. if s.Destination == nil {
  10650. invalidParams.Add(request.NewErrParamRequired("Destination"))
  10651. }
  10652. if s.Prefix == nil {
  10653. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  10654. }
  10655. if s.Status == nil {
  10656. invalidParams.Add(request.NewErrParamRequired("Status"))
  10657. }
  10658. if s.Destination != nil {
  10659. if err := s.Destination.Validate(); err != nil {
  10660. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  10661. }
  10662. }
  10663. if invalidParams.Len() > 0 {
  10664. return invalidParams
  10665. }
  10666. return nil
  10667. }
  10668. // SetDestination sets the Destination field's value.
  10669. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  10670. s.Destination = v
  10671. return s
  10672. }
  10673. // SetID sets the ID field's value.
  10674. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  10675. s.ID = &v
  10676. return s
  10677. }
  10678. // SetPrefix sets the Prefix field's value.
  10679. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  10680. s.Prefix = &v
  10681. return s
  10682. }
  10683. // SetStatus sets the Status field's value.
  10684. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  10685. s.Status = &v
  10686. return s
  10687. }
  10688. type RequestPaymentConfiguration struct {
  10689. _ struct{} `type:"structure"`
  10690. // Specifies who pays for the download and request fees.
  10691. //
  10692. // Payer is a required field
  10693. Payer *string `type:"string" required:"true" enum:"Payer"`
  10694. }
  10695. // String returns the string representation
  10696. func (s RequestPaymentConfiguration) String() string {
  10697. return awsutil.Prettify(s)
  10698. }
  10699. // GoString returns the string representation
  10700. func (s RequestPaymentConfiguration) GoString() string {
  10701. return s.String()
  10702. }
  10703. // Validate inspects the fields of the type to determine if they are valid.
  10704. func (s *RequestPaymentConfiguration) Validate() error {
  10705. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  10706. if s.Payer == nil {
  10707. invalidParams.Add(request.NewErrParamRequired("Payer"))
  10708. }
  10709. if invalidParams.Len() > 0 {
  10710. return invalidParams
  10711. }
  10712. return nil
  10713. }
  10714. // SetPayer sets the Payer field's value.
  10715. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  10716. s.Payer = &v
  10717. return s
  10718. }
  10719. type RestoreObjectInput struct {
  10720. _ struct{} `type:"structure" payload:"RestoreRequest"`
  10721. // Bucket is a required field
  10722. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10723. // Key is a required field
  10724. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10725. // Confirms that the requester knows that she or he will be charged for the
  10726. // request. Bucket owners need not specify this parameter in their requests.
  10727. // Documentation on downloading objects from requester pays buckets can be found
  10728. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10729. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10730. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
  10731. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10732. }
  10733. // String returns the string representation
  10734. func (s RestoreObjectInput) String() string {
  10735. return awsutil.Prettify(s)
  10736. }
  10737. // GoString returns the string representation
  10738. func (s RestoreObjectInput) GoString() string {
  10739. return s.String()
  10740. }
  10741. // Validate inspects the fields of the type to determine if they are valid.
  10742. func (s *RestoreObjectInput) Validate() error {
  10743. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  10744. if s.Bucket == nil {
  10745. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10746. }
  10747. if s.Key == nil {
  10748. invalidParams.Add(request.NewErrParamRequired("Key"))
  10749. }
  10750. if s.Key != nil && len(*s.Key) < 1 {
  10751. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10752. }
  10753. if s.RestoreRequest != nil {
  10754. if err := s.RestoreRequest.Validate(); err != nil {
  10755. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  10756. }
  10757. }
  10758. if invalidParams.Len() > 0 {
  10759. return invalidParams
  10760. }
  10761. return nil
  10762. }
  10763. // SetBucket sets the Bucket field's value.
  10764. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  10765. s.Bucket = &v
  10766. return s
  10767. }
  10768. // SetKey sets the Key field's value.
  10769. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  10770. s.Key = &v
  10771. return s
  10772. }
  10773. // SetRequestPayer sets the RequestPayer field's value.
  10774. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  10775. s.RequestPayer = &v
  10776. return s
  10777. }
  10778. // SetRestoreRequest sets the RestoreRequest field's value.
  10779. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  10780. s.RestoreRequest = v
  10781. return s
  10782. }
  10783. // SetVersionId sets the VersionId field's value.
  10784. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  10785. s.VersionId = &v
  10786. return s
  10787. }
  10788. type RestoreObjectOutput struct {
  10789. _ struct{} `type:"structure"`
  10790. // If present, indicates that the requester was successfully charged for the
  10791. // request.
  10792. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10793. }
  10794. // String returns the string representation
  10795. func (s RestoreObjectOutput) String() string {
  10796. return awsutil.Prettify(s)
  10797. }
  10798. // GoString returns the string representation
  10799. func (s RestoreObjectOutput) GoString() string {
  10800. return s.String()
  10801. }
  10802. // SetRequestCharged sets the RequestCharged field's value.
  10803. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  10804. s.RequestCharged = &v
  10805. return s
  10806. }
  10807. type RestoreRequest struct {
  10808. _ struct{} `type:"structure"`
  10809. // Lifetime of the active copy in days
  10810. //
  10811. // Days is a required field
  10812. Days *int64 `type:"integer" required:"true"`
  10813. }
  10814. // String returns the string representation
  10815. func (s RestoreRequest) String() string {
  10816. return awsutil.Prettify(s)
  10817. }
  10818. // GoString returns the string representation
  10819. func (s RestoreRequest) GoString() string {
  10820. return s.String()
  10821. }
  10822. // Validate inspects the fields of the type to determine if they are valid.
  10823. func (s *RestoreRequest) Validate() error {
  10824. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  10825. if s.Days == nil {
  10826. invalidParams.Add(request.NewErrParamRequired("Days"))
  10827. }
  10828. if invalidParams.Len() > 0 {
  10829. return invalidParams
  10830. }
  10831. return nil
  10832. }
  10833. // SetDays sets the Days field's value.
  10834. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  10835. s.Days = &v
  10836. return s
  10837. }
  10838. type RoutingRule struct {
  10839. _ struct{} `type:"structure"`
  10840. // A container for describing a condition that must be met for the specified
  10841. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  10842. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  10843. // redirect request to another host where you might process the error.
  10844. Condition *Condition `type:"structure"`
  10845. // Container for redirect information. You can redirect requests to another
  10846. // host, to another page, or with another protocol. In the event of an error,
  10847. // you can can specify a different error code to return.
  10848. //
  10849. // Redirect is a required field
  10850. Redirect *Redirect `type:"structure" required:"true"`
  10851. }
  10852. // String returns the string representation
  10853. func (s RoutingRule) String() string {
  10854. return awsutil.Prettify(s)
  10855. }
  10856. // GoString returns the string representation
  10857. func (s RoutingRule) GoString() string {
  10858. return s.String()
  10859. }
  10860. // Validate inspects the fields of the type to determine if they are valid.
  10861. func (s *RoutingRule) Validate() error {
  10862. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  10863. if s.Redirect == nil {
  10864. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  10865. }
  10866. if invalidParams.Len() > 0 {
  10867. return invalidParams
  10868. }
  10869. return nil
  10870. }
  10871. // SetCondition sets the Condition field's value.
  10872. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  10873. s.Condition = v
  10874. return s
  10875. }
  10876. // SetRedirect sets the Redirect field's value.
  10877. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  10878. s.Redirect = v
  10879. return s
  10880. }
  10881. type Rule struct {
  10882. _ struct{} `type:"structure"`
  10883. // Specifies the days since the initiation of an Incomplete Multipart Upload
  10884. // that Lifecycle will wait before permanently removing all parts of the upload.
  10885. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  10886. Expiration *LifecycleExpiration `type:"structure"`
  10887. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  10888. ID *string `type:"string"`
  10889. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  10890. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  10891. // configuration action on a bucket that has versioning enabled (or suspended)
  10892. // to request that Amazon S3 delete noncurrent object versions at a specific
  10893. // period in the object's lifetime.
  10894. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  10895. // Container for the transition rule that describes when noncurrent objects
  10896. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  10897. // versioning-enabled (or versioning is suspended), you can set this action
  10898. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  10899. // or GLACIER storage class at a specific period in the object's lifetime.
  10900. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  10901. // Prefix identifying one or more objects to which the rule applies.
  10902. //
  10903. // Prefix is a required field
  10904. Prefix *string `type:"string" required:"true"`
  10905. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  10906. // is not currently being applied.
  10907. //
  10908. // Status is a required field
  10909. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  10910. Transition *Transition `type:"structure"`
  10911. }
  10912. // String returns the string representation
  10913. func (s Rule) String() string {
  10914. return awsutil.Prettify(s)
  10915. }
  10916. // GoString returns the string representation
  10917. func (s Rule) GoString() string {
  10918. return s.String()
  10919. }
  10920. // Validate inspects the fields of the type to determine if they are valid.
  10921. func (s *Rule) Validate() error {
  10922. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  10923. if s.Prefix == nil {
  10924. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  10925. }
  10926. if s.Status == nil {
  10927. invalidParams.Add(request.NewErrParamRequired("Status"))
  10928. }
  10929. if invalidParams.Len() > 0 {
  10930. return invalidParams
  10931. }
  10932. return nil
  10933. }
  10934. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  10935. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  10936. s.AbortIncompleteMultipartUpload = v
  10937. return s
  10938. }
  10939. // SetExpiration sets the Expiration field's value.
  10940. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  10941. s.Expiration = v
  10942. return s
  10943. }
  10944. // SetID sets the ID field's value.
  10945. func (s *Rule) SetID(v string) *Rule {
  10946. s.ID = &v
  10947. return s
  10948. }
  10949. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  10950. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  10951. s.NoncurrentVersionExpiration = v
  10952. return s
  10953. }
  10954. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  10955. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  10956. s.NoncurrentVersionTransition = v
  10957. return s
  10958. }
  10959. // SetPrefix sets the Prefix field's value.
  10960. func (s *Rule) SetPrefix(v string) *Rule {
  10961. s.Prefix = &v
  10962. return s
  10963. }
  10964. // SetStatus sets the Status field's value.
  10965. func (s *Rule) SetStatus(v string) *Rule {
  10966. s.Status = &v
  10967. return s
  10968. }
  10969. // SetTransition sets the Transition field's value.
  10970. func (s *Rule) SetTransition(v *Transition) *Rule {
  10971. s.Transition = v
  10972. return s
  10973. }
  10974. type Tag struct {
  10975. _ struct{} `type:"structure"`
  10976. // Name of the tag.
  10977. //
  10978. // Key is a required field
  10979. Key *string `min:"1" type:"string" required:"true"`
  10980. // Value of the tag.
  10981. //
  10982. // Value is a required field
  10983. Value *string `type:"string" required:"true"`
  10984. }
  10985. // String returns the string representation
  10986. func (s Tag) String() string {
  10987. return awsutil.Prettify(s)
  10988. }
  10989. // GoString returns the string representation
  10990. func (s Tag) GoString() string {
  10991. return s.String()
  10992. }
  10993. // Validate inspects the fields of the type to determine if they are valid.
  10994. func (s *Tag) Validate() error {
  10995. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  10996. if s.Key == nil {
  10997. invalidParams.Add(request.NewErrParamRequired("Key"))
  10998. }
  10999. if s.Key != nil && len(*s.Key) < 1 {
  11000. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11001. }
  11002. if s.Value == nil {
  11003. invalidParams.Add(request.NewErrParamRequired("Value"))
  11004. }
  11005. if invalidParams.Len() > 0 {
  11006. return invalidParams
  11007. }
  11008. return nil
  11009. }
  11010. // SetKey sets the Key field's value.
  11011. func (s *Tag) SetKey(v string) *Tag {
  11012. s.Key = &v
  11013. return s
  11014. }
  11015. // SetValue sets the Value field's value.
  11016. func (s *Tag) SetValue(v string) *Tag {
  11017. s.Value = &v
  11018. return s
  11019. }
  11020. type Tagging struct {
  11021. _ struct{} `type:"structure"`
  11022. // TagSet is a required field
  11023. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  11024. }
  11025. // String returns the string representation
  11026. func (s Tagging) String() string {
  11027. return awsutil.Prettify(s)
  11028. }
  11029. // GoString returns the string representation
  11030. func (s Tagging) GoString() string {
  11031. return s.String()
  11032. }
  11033. // Validate inspects the fields of the type to determine if they are valid.
  11034. func (s *Tagging) Validate() error {
  11035. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  11036. if s.TagSet == nil {
  11037. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  11038. }
  11039. if s.TagSet != nil {
  11040. for i, v := range s.TagSet {
  11041. if v == nil {
  11042. continue
  11043. }
  11044. if err := v.Validate(); err != nil {
  11045. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  11046. }
  11047. }
  11048. }
  11049. if invalidParams.Len() > 0 {
  11050. return invalidParams
  11051. }
  11052. return nil
  11053. }
  11054. // SetTagSet sets the TagSet field's value.
  11055. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  11056. s.TagSet = v
  11057. return s
  11058. }
  11059. type TargetGrant struct {
  11060. _ struct{} `type:"structure"`
  11061. Grantee *Grantee `type:"structure"`
  11062. // Logging permissions assigned to the Grantee for the bucket.
  11063. Permission *string `type:"string" enum:"BucketLogsPermission"`
  11064. }
  11065. // String returns the string representation
  11066. func (s TargetGrant) String() string {
  11067. return awsutil.Prettify(s)
  11068. }
  11069. // GoString returns the string representation
  11070. func (s TargetGrant) GoString() string {
  11071. return s.String()
  11072. }
  11073. // Validate inspects the fields of the type to determine if they are valid.
  11074. func (s *TargetGrant) Validate() error {
  11075. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  11076. if s.Grantee != nil {
  11077. if err := s.Grantee.Validate(); err != nil {
  11078. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  11079. }
  11080. }
  11081. if invalidParams.Len() > 0 {
  11082. return invalidParams
  11083. }
  11084. return nil
  11085. }
  11086. // SetGrantee sets the Grantee field's value.
  11087. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  11088. s.Grantee = v
  11089. return s
  11090. }
  11091. // SetPermission sets the Permission field's value.
  11092. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  11093. s.Permission = &v
  11094. return s
  11095. }
  11096. // Container for specifying the configuration when you want Amazon S3 to publish
  11097. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  11098. type TopicConfiguration struct {
  11099. _ struct{} `type:"structure"`
  11100. // Events is a required field
  11101. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  11102. // Container for object key name filtering rules. For information about key
  11103. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  11104. Filter *NotificationConfigurationFilter `type:"structure"`
  11105. // Optional unique identifier for configurations in a notification configuration.
  11106. // If you don't provide one, Amazon S3 will assign an ID.
  11107. Id *string `type:"string"`
  11108. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  11109. // events of specified type.
  11110. //
  11111. // TopicArn is a required field
  11112. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  11113. }
  11114. // String returns the string representation
  11115. func (s TopicConfiguration) String() string {
  11116. return awsutil.Prettify(s)
  11117. }
  11118. // GoString returns the string representation
  11119. func (s TopicConfiguration) GoString() string {
  11120. return s.String()
  11121. }
  11122. // Validate inspects the fields of the type to determine if they are valid.
  11123. func (s *TopicConfiguration) Validate() error {
  11124. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  11125. if s.Events == nil {
  11126. invalidParams.Add(request.NewErrParamRequired("Events"))
  11127. }
  11128. if s.TopicArn == nil {
  11129. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  11130. }
  11131. if invalidParams.Len() > 0 {
  11132. return invalidParams
  11133. }
  11134. return nil
  11135. }
  11136. // SetEvents sets the Events field's value.
  11137. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  11138. s.Events = v
  11139. return s
  11140. }
  11141. // SetFilter sets the Filter field's value.
  11142. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  11143. s.Filter = v
  11144. return s
  11145. }
  11146. // SetId sets the Id field's value.
  11147. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  11148. s.Id = &v
  11149. return s
  11150. }
  11151. // SetTopicArn sets the TopicArn field's value.
  11152. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  11153. s.TopicArn = &v
  11154. return s
  11155. }
  11156. type TopicConfigurationDeprecated struct {
  11157. _ struct{} `type:"structure"`
  11158. // Bucket event for which to send notifications.
  11159. Event *string `deprecated:"true" type:"string" enum:"Event"`
  11160. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  11161. // Optional unique identifier for configurations in a notification configuration.
  11162. // If you don't provide one, Amazon S3 will assign an ID.
  11163. Id *string `type:"string"`
  11164. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  11165. // specified events for the bucket.
  11166. Topic *string `type:"string"`
  11167. }
  11168. // String returns the string representation
  11169. func (s TopicConfigurationDeprecated) String() string {
  11170. return awsutil.Prettify(s)
  11171. }
  11172. // GoString returns the string representation
  11173. func (s TopicConfigurationDeprecated) GoString() string {
  11174. return s.String()
  11175. }
  11176. // SetEvent sets the Event field's value.
  11177. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  11178. s.Event = &v
  11179. return s
  11180. }
  11181. // SetEvents sets the Events field's value.
  11182. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  11183. s.Events = v
  11184. return s
  11185. }
  11186. // SetId sets the Id field's value.
  11187. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  11188. s.Id = &v
  11189. return s
  11190. }
  11191. // SetTopic sets the Topic field's value.
  11192. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  11193. s.Topic = &v
  11194. return s
  11195. }
  11196. type Transition struct {
  11197. _ struct{} `type:"structure"`
  11198. // Indicates at what date the object is to be moved or deleted. Should be in
  11199. // GMT ISO 8601 Format.
  11200. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  11201. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  11202. // The value must be a non-zero positive integer.
  11203. Days *int64 `type:"integer"`
  11204. // The class of storage used to store the object.
  11205. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  11206. }
  11207. // String returns the string representation
  11208. func (s Transition) String() string {
  11209. return awsutil.Prettify(s)
  11210. }
  11211. // GoString returns the string representation
  11212. func (s Transition) GoString() string {
  11213. return s.String()
  11214. }
  11215. // SetDate sets the Date field's value.
  11216. func (s *Transition) SetDate(v time.Time) *Transition {
  11217. s.Date = &v
  11218. return s
  11219. }
  11220. // SetDays sets the Days field's value.
  11221. func (s *Transition) SetDays(v int64) *Transition {
  11222. s.Days = &v
  11223. return s
  11224. }
  11225. // SetStorageClass sets the StorageClass field's value.
  11226. func (s *Transition) SetStorageClass(v string) *Transition {
  11227. s.StorageClass = &v
  11228. return s
  11229. }
  11230. type UploadPartCopyInput struct {
  11231. _ struct{} `type:"structure"`
  11232. // Bucket is a required field
  11233. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11234. // The name of the source bucket and key name of the source object, separated
  11235. // by a slash (/). Must be URL-encoded.
  11236. //
  11237. // CopySource is a required field
  11238. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  11239. // Copies the object if its entity tag (ETag) matches the specified tag.
  11240. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  11241. // Copies the object if it has been modified since the specified time.
  11242. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  11243. // Copies the object if its entity tag (ETag) is different than the specified
  11244. // ETag.
  11245. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  11246. // Copies the object if it hasn't been modified since the specified time.
  11247. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  11248. // The range of bytes to copy from the source object. The range value must use
  11249. // the form bytes=first-last, where the first and last are the zero-based byte
  11250. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  11251. // first ten bytes of the source. You can copy a range only if the source object
  11252. // is greater than 5 GB.
  11253. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  11254. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  11255. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  11256. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  11257. // the source object. The encryption key provided in this header must be one
  11258. // that was used when the source object was created.
  11259. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  11260. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  11261. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  11262. // key was transmitted without error.
  11263. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  11264. // Key is a required field
  11265. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11266. // Part number of part being copied. This is a positive integer between 1 and
  11267. // 10,000.
  11268. //
  11269. // PartNumber is a required field
  11270. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  11271. // Confirms that the requester knows that she or he will be charged for the
  11272. // request. Bucket owners need not specify this parameter in their requests.
  11273. // Documentation on downloading objects from requester pays buckets can be found
  11274. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11275. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11276. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  11277. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11278. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  11279. // data. This value is used to store the object and then it is discarded; Amazon
  11280. // does not store the encryption key. The key must be appropriate for use with
  11281. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  11282. // header. This must be the same encryption key specified in the initiate multipart
  11283. // upload request.
  11284. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  11285. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  11286. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  11287. // key was transmitted without error.
  11288. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11289. // Upload ID identifying the multipart upload whose part is being copied.
  11290. //
  11291. // UploadId is a required field
  11292. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  11293. }
  11294. // String returns the string representation
  11295. func (s UploadPartCopyInput) String() string {
  11296. return awsutil.Prettify(s)
  11297. }
  11298. // GoString returns the string representation
  11299. func (s UploadPartCopyInput) GoString() string {
  11300. return s.String()
  11301. }
  11302. // Validate inspects the fields of the type to determine if they are valid.
  11303. func (s *UploadPartCopyInput) Validate() error {
  11304. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  11305. if s.Bucket == nil {
  11306. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11307. }
  11308. if s.CopySource == nil {
  11309. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  11310. }
  11311. if s.Key == nil {
  11312. invalidParams.Add(request.NewErrParamRequired("Key"))
  11313. }
  11314. if s.Key != nil && len(*s.Key) < 1 {
  11315. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11316. }
  11317. if s.PartNumber == nil {
  11318. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  11319. }
  11320. if s.UploadId == nil {
  11321. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  11322. }
  11323. if invalidParams.Len() > 0 {
  11324. return invalidParams
  11325. }
  11326. return nil
  11327. }
  11328. // SetBucket sets the Bucket field's value.
  11329. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  11330. s.Bucket = &v
  11331. return s
  11332. }
  11333. // SetCopySource sets the CopySource field's value.
  11334. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  11335. s.CopySource = &v
  11336. return s
  11337. }
  11338. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  11339. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  11340. s.CopySourceIfMatch = &v
  11341. return s
  11342. }
  11343. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  11344. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  11345. s.CopySourceIfModifiedSince = &v
  11346. return s
  11347. }
  11348. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  11349. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  11350. s.CopySourceIfNoneMatch = &v
  11351. return s
  11352. }
  11353. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  11354. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  11355. s.CopySourceIfUnmodifiedSince = &v
  11356. return s
  11357. }
  11358. // SetCopySourceRange sets the CopySourceRange field's value.
  11359. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  11360. s.CopySourceRange = &v
  11361. return s
  11362. }
  11363. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  11364. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  11365. s.CopySourceSSECustomerAlgorithm = &v
  11366. return s
  11367. }
  11368. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  11369. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  11370. s.CopySourceSSECustomerKey = &v
  11371. return s
  11372. }
  11373. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  11374. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  11375. s.CopySourceSSECustomerKeyMD5 = &v
  11376. return s
  11377. }
  11378. // SetKey sets the Key field's value.
  11379. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  11380. s.Key = &v
  11381. return s
  11382. }
  11383. // SetPartNumber sets the PartNumber field's value.
  11384. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  11385. s.PartNumber = &v
  11386. return s
  11387. }
  11388. // SetRequestPayer sets the RequestPayer field's value.
  11389. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  11390. s.RequestPayer = &v
  11391. return s
  11392. }
  11393. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11394. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  11395. s.SSECustomerAlgorithm = &v
  11396. return s
  11397. }
  11398. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11399. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  11400. s.SSECustomerKey = &v
  11401. return s
  11402. }
  11403. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11404. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  11405. s.SSECustomerKeyMD5 = &v
  11406. return s
  11407. }
  11408. // SetUploadId sets the UploadId field's value.
  11409. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  11410. s.UploadId = &v
  11411. return s
  11412. }
  11413. type UploadPartCopyOutput struct {
  11414. _ struct{} `type:"structure" payload:"CopyPartResult"`
  11415. CopyPartResult *CopyPartResult `type:"structure"`
  11416. // The version of the source object that was copied, if you have enabled versioning
  11417. // on the source bucket.
  11418. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  11419. // If present, indicates that the requester was successfully charged for the
  11420. // request.
  11421. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11422. // If server-side encryption with a customer-provided encryption key was requested,
  11423. // the response will include this header confirming the encryption algorithm
  11424. // used.
  11425. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11426. // If server-side encryption with a customer-provided encryption key was requested,
  11427. // the response will include this header to provide round trip message integrity
  11428. // verification of the customer-provided encryption key.
  11429. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11430. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11431. // encryption key that was used for the object.
  11432. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  11433. // The Server-side encryption algorithm used when storing this object in S3
  11434. // (e.g., AES256, aws:kms).
  11435. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11436. }
  11437. // String returns the string representation
  11438. func (s UploadPartCopyOutput) String() string {
  11439. return awsutil.Prettify(s)
  11440. }
  11441. // GoString returns the string representation
  11442. func (s UploadPartCopyOutput) GoString() string {
  11443. return s.String()
  11444. }
  11445. // SetCopyPartResult sets the CopyPartResult field's value.
  11446. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  11447. s.CopyPartResult = v
  11448. return s
  11449. }
  11450. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  11451. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  11452. s.CopySourceVersionId = &v
  11453. return s
  11454. }
  11455. // SetRequestCharged sets the RequestCharged field's value.
  11456. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  11457. s.RequestCharged = &v
  11458. return s
  11459. }
  11460. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11461. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  11462. s.SSECustomerAlgorithm = &v
  11463. return s
  11464. }
  11465. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11466. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  11467. s.SSECustomerKeyMD5 = &v
  11468. return s
  11469. }
  11470. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11471. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  11472. s.SSEKMSKeyId = &v
  11473. return s
  11474. }
  11475. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11476. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  11477. s.ServerSideEncryption = &v
  11478. return s
  11479. }
  11480. type UploadPartInput struct {
  11481. _ struct{} `type:"structure" payload:"Body"`
  11482. // Object data.
  11483. Body io.ReadSeeker `type:"blob"`
  11484. // Name of the bucket to which the multipart upload was initiated.
  11485. //
  11486. // Bucket is a required field
  11487. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11488. // Size of the body in bytes. This parameter is useful when the size of the
  11489. // body cannot be determined automatically.
  11490. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  11491. // Object key for which the multipart upload was initiated.
  11492. //
  11493. // Key is a required field
  11494. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11495. // Part number of part being uploaded. This is a positive integer between 1
  11496. // and 10,000.
  11497. //
  11498. // PartNumber is a required field
  11499. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  11500. // Confirms that the requester knows that she or he will be charged for the
  11501. // request. Bucket owners need not specify this parameter in their requests.
  11502. // Documentation on downloading objects from requester pays buckets can be found
  11503. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11504. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11505. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  11506. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11507. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  11508. // data. This value is used to store the object and then it is discarded; Amazon
  11509. // does not store the encryption key. The key must be appropriate for use with
  11510. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  11511. // header. This must be the same encryption key specified in the initiate multipart
  11512. // upload request.
  11513. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  11514. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  11515. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  11516. // key was transmitted without error.
  11517. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11518. // Upload ID identifying the multipart upload whose part is being uploaded.
  11519. //
  11520. // UploadId is a required field
  11521. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  11522. }
  11523. // String returns the string representation
  11524. func (s UploadPartInput) String() string {
  11525. return awsutil.Prettify(s)
  11526. }
  11527. // GoString returns the string representation
  11528. func (s UploadPartInput) GoString() string {
  11529. return s.String()
  11530. }
  11531. // Validate inspects the fields of the type to determine if they are valid.
  11532. func (s *UploadPartInput) Validate() error {
  11533. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  11534. if s.Bucket == nil {
  11535. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11536. }
  11537. if s.Key == nil {
  11538. invalidParams.Add(request.NewErrParamRequired("Key"))
  11539. }
  11540. if s.Key != nil && len(*s.Key) < 1 {
  11541. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11542. }
  11543. if s.PartNumber == nil {
  11544. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  11545. }
  11546. if s.UploadId == nil {
  11547. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  11548. }
  11549. if invalidParams.Len() > 0 {
  11550. return invalidParams
  11551. }
  11552. return nil
  11553. }
  11554. // SetBody sets the Body field's value.
  11555. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  11556. s.Body = v
  11557. return s
  11558. }
  11559. // SetBucket sets the Bucket field's value.
  11560. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  11561. s.Bucket = &v
  11562. return s
  11563. }
  11564. // SetContentLength sets the ContentLength field's value.
  11565. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  11566. s.ContentLength = &v
  11567. return s
  11568. }
  11569. // SetKey sets the Key field's value.
  11570. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  11571. s.Key = &v
  11572. return s
  11573. }
  11574. // SetPartNumber sets the PartNumber field's value.
  11575. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  11576. s.PartNumber = &v
  11577. return s
  11578. }
  11579. // SetRequestPayer sets the RequestPayer field's value.
  11580. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  11581. s.RequestPayer = &v
  11582. return s
  11583. }
  11584. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11585. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  11586. s.SSECustomerAlgorithm = &v
  11587. return s
  11588. }
  11589. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11590. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  11591. s.SSECustomerKey = &v
  11592. return s
  11593. }
  11594. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11595. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  11596. s.SSECustomerKeyMD5 = &v
  11597. return s
  11598. }
  11599. // SetUploadId sets the UploadId field's value.
  11600. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  11601. s.UploadId = &v
  11602. return s
  11603. }
  11604. type UploadPartOutput struct {
  11605. _ struct{} `type:"structure"`
  11606. // Entity tag for the uploaded object.
  11607. ETag *string `location:"header" locationName:"ETag" type:"string"`
  11608. // If present, indicates that the requester was successfully charged for the
  11609. // request.
  11610. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11611. // If server-side encryption with a customer-provided encryption key was requested,
  11612. // the response will include this header confirming the encryption algorithm
  11613. // used.
  11614. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11615. // If server-side encryption with a customer-provided encryption key was requested,
  11616. // the response will include this header to provide round trip message integrity
  11617. // verification of the customer-provided encryption key.
  11618. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11619. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11620. // encryption key that was used for the object.
  11621. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  11622. // The Server-side encryption algorithm used when storing this object in S3
  11623. // (e.g., AES256, aws:kms).
  11624. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11625. }
  11626. // String returns the string representation
  11627. func (s UploadPartOutput) String() string {
  11628. return awsutil.Prettify(s)
  11629. }
  11630. // GoString returns the string representation
  11631. func (s UploadPartOutput) GoString() string {
  11632. return s.String()
  11633. }
  11634. // SetETag sets the ETag field's value.
  11635. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  11636. s.ETag = &v
  11637. return s
  11638. }
  11639. // SetRequestCharged sets the RequestCharged field's value.
  11640. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  11641. s.RequestCharged = &v
  11642. return s
  11643. }
  11644. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11645. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  11646. s.SSECustomerAlgorithm = &v
  11647. return s
  11648. }
  11649. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11650. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  11651. s.SSECustomerKeyMD5 = &v
  11652. return s
  11653. }
  11654. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11655. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  11656. s.SSEKMSKeyId = &v
  11657. return s
  11658. }
  11659. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11660. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  11661. s.ServerSideEncryption = &v
  11662. return s
  11663. }
  11664. type VersioningConfiguration struct {
  11665. _ struct{} `type:"structure"`
  11666. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  11667. // This element is only returned if the bucket has been configured with MFA
  11668. // delete. If the bucket has never been so configured, this element is not returned.
  11669. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  11670. // The versioning state of the bucket.
  11671. Status *string `type:"string" enum:"BucketVersioningStatus"`
  11672. }
  11673. // String returns the string representation
  11674. func (s VersioningConfiguration) String() string {
  11675. return awsutil.Prettify(s)
  11676. }
  11677. // GoString returns the string representation
  11678. func (s VersioningConfiguration) GoString() string {
  11679. return s.String()
  11680. }
  11681. // SetMFADelete sets the MFADelete field's value.
  11682. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  11683. s.MFADelete = &v
  11684. return s
  11685. }
  11686. // SetStatus sets the Status field's value.
  11687. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  11688. s.Status = &v
  11689. return s
  11690. }
  11691. type WebsiteConfiguration struct {
  11692. _ struct{} `type:"structure"`
  11693. ErrorDocument *ErrorDocument `type:"structure"`
  11694. IndexDocument *IndexDocument `type:"structure"`
  11695. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  11696. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  11697. }
  11698. // String returns the string representation
  11699. func (s WebsiteConfiguration) String() string {
  11700. return awsutil.Prettify(s)
  11701. }
  11702. // GoString returns the string representation
  11703. func (s WebsiteConfiguration) GoString() string {
  11704. return s.String()
  11705. }
  11706. // Validate inspects the fields of the type to determine if they are valid.
  11707. func (s *WebsiteConfiguration) Validate() error {
  11708. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  11709. if s.ErrorDocument != nil {
  11710. if err := s.ErrorDocument.Validate(); err != nil {
  11711. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  11712. }
  11713. }
  11714. if s.IndexDocument != nil {
  11715. if err := s.IndexDocument.Validate(); err != nil {
  11716. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  11717. }
  11718. }
  11719. if s.RedirectAllRequestsTo != nil {
  11720. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  11721. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  11722. }
  11723. }
  11724. if s.RoutingRules != nil {
  11725. for i, v := range s.RoutingRules {
  11726. if v == nil {
  11727. continue
  11728. }
  11729. if err := v.Validate(); err != nil {
  11730. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  11731. }
  11732. }
  11733. }
  11734. if invalidParams.Len() > 0 {
  11735. return invalidParams
  11736. }
  11737. return nil
  11738. }
  11739. // SetErrorDocument sets the ErrorDocument field's value.
  11740. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  11741. s.ErrorDocument = v
  11742. return s
  11743. }
  11744. // SetIndexDocument sets the IndexDocument field's value.
  11745. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  11746. s.IndexDocument = v
  11747. return s
  11748. }
  11749. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  11750. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  11751. s.RedirectAllRequestsTo = v
  11752. return s
  11753. }
  11754. // SetRoutingRules sets the RoutingRules field's value.
  11755. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  11756. s.RoutingRules = v
  11757. return s
  11758. }
  11759. const (
  11760. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  11761. BucketAccelerateStatusEnabled = "Enabled"
  11762. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  11763. BucketAccelerateStatusSuspended = "Suspended"
  11764. )
  11765. const (
  11766. // BucketCannedACLPrivate is a BucketCannedACL enum value
  11767. BucketCannedACLPrivate = "private"
  11768. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  11769. BucketCannedACLPublicRead = "public-read"
  11770. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  11771. BucketCannedACLPublicReadWrite = "public-read-write"
  11772. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  11773. BucketCannedACLAuthenticatedRead = "authenticated-read"
  11774. )
  11775. const (
  11776. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  11777. BucketLocationConstraintEu = "EU"
  11778. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  11779. BucketLocationConstraintEuWest1 = "eu-west-1"
  11780. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  11781. BucketLocationConstraintUsWest1 = "us-west-1"
  11782. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  11783. BucketLocationConstraintUsWest2 = "us-west-2"
  11784. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  11785. BucketLocationConstraintApSouth1 = "ap-south-1"
  11786. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  11787. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  11788. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  11789. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  11790. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  11791. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  11792. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  11793. BucketLocationConstraintSaEast1 = "sa-east-1"
  11794. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  11795. BucketLocationConstraintCnNorth1 = "cn-north-1"
  11796. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  11797. BucketLocationConstraintEuCentral1 = "eu-central-1"
  11798. )
  11799. const (
  11800. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  11801. BucketLogsPermissionFullControl = "FULL_CONTROL"
  11802. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  11803. BucketLogsPermissionRead = "READ"
  11804. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  11805. BucketLogsPermissionWrite = "WRITE"
  11806. )
  11807. const (
  11808. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  11809. BucketVersioningStatusEnabled = "Enabled"
  11810. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  11811. BucketVersioningStatusSuspended = "Suspended"
  11812. )
  11813. // Requests Amazon S3 to encode the object keys in the response and specifies
  11814. // the encoding method to use. An object key may contain any Unicode character;
  11815. // however, XML 1.0 parser cannot parse some characters, such as characters
  11816. // with an ASCII value from 0 to 10. For characters that are not supported in
  11817. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  11818. // keys in the response.
  11819. const (
  11820. // EncodingTypeUrl is a EncodingType enum value
  11821. EncodingTypeUrl = "url"
  11822. )
  11823. // Bucket event for which to send notifications.
  11824. const (
  11825. // EventS3ReducedRedundancyLostObject is a Event enum value
  11826. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  11827. // EventS3ObjectCreated is a Event enum value
  11828. EventS3ObjectCreated = "s3:ObjectCreated:*"
  11829. // EventS3ObjectCreatedPut is a Event enum value
  11830. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  11831. // EventS3ObjectCreatedPost is a Event enum value
  11832. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  11833. // EventS3ObjectCreatedCopy is a Event enum value
  11834. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  11835. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  11836. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  11837. // EventS3ObjectRemoved is a Event enum value
  11838. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  11839. // EventS3ObjectRemovedDelete is a Event enum value
  11840. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  11841. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  11842. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  11843. )
  11844. const (
  11845. // ExpirationStatusEnabled is a ExpirationStatus enum value
  11846. ExpirationStatusEnabled = "Enabled"
  11847. // ExpirationStatusDisabled is a ExpirationStatus enum value
  11848. ExpirationStatusDisabled = "Disabled"
  11849. )
  11850. const (
  11851. // FilterRuleNamePrefix is a FilterRuleName enum value
  11852. FilterRuleNamePrefix = "prefix"
  11853. // FilterRuleNameSuffix is a FilterRuleName enum value
  11854. FilterRuleNameSuffix = "suffix"
  11855. )
  11856. const (
  11857. // MFADeleteEnabled is a MFADelete enum value
  11858. MFADeleteEnabled = "Enabled"
  11859. // MFADeleteDisabled is a MFADelete enum value
  11860. MFADeleteDisabled = "Disabled"
  11861. )
  11862. const (
  11863. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  11864. MFADeleteStatusEnabled = "Enabled"
  11865. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  11866. MFADeleteStatusDisabled = "Disabled"
  11867. )
  11868. const (
  11869. // MetadataDirectiveCopy is a MetadataDirective enum value
  11870. MetadataDirectiveCopy = "COPY"
  11871. // MetadataDirectiveReplace is a MetadataDirective enum value
  11872. MetadataDirectiveReplace = "REPLACE"
  11873. )
  11874. const (
  11875. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  11876. ObjectCannedACLPrivate = "private"
  11877. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  11878. ObjectCannedACLPublicRead = "public-read"
  11879. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  11880. ObjectCannedACLPublicReadWrite = "public-read-write"
  11881. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  11882. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  11883. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  11884. ObjectCannedACLAwsExecRead = "aws-exec-read"
  11885. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  11886. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  11887. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  11888. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  11889. )
  11890. const (
  11891. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  11892. ObjectStorageClassStandard = "STANDARD"
  11893. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  11894. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  11895. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  11896. ObjectStorageClassGlacier = "GLACIER"
  11897. )
  11898. const (
  11899. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  11900. ObjectVersionStorageClassStandard = "STANDARD"
  11901. )
  11902. const (
  11903. // PayerRequester is a Payer enum value
  11904. PayerRequester = "Requester"
  11905. // PayerBucketOwner is a Payer enum value
  11906. PayerBucketOwner = "BucketOwner"
  11907. )
  11908. const (
  11909. // PermissionFullControl is a Permission enum value
  11910. PermissionFullControl = "FULL_CONTROL"
  11911. // PermissionWrite is a Permission enum value
  11912. PermissionWrite = "WRITE"
  11913. // PermissionWriteAcp is a Permission enum value
  11914. PermissionWriteAcp = "WRITE_ACP"
  11915. // PermissionRead is a Permission enum value
  11916. PermissionRead = "READ"
  11917. // PermissionReadAcp is a Permission enum value
  11918. PermissionReadAcp = "READ_ACP"
  11919. )
  11920. const (
  11921. // ProtocolHttp is a Protocol enum value
  11922. ProtocolHttp = "http"
  11923. // ProtocolHttps is a Protocol enum value
  11924. ProtocolHttps = "https"
  11925. )
  11926. const (
  11927. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  11928. ReplicationRuleStatusEnabled = "Enabled"
  11929. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  11930. ReplicationRuleStatusDisabled = "Disabled"
  11931. )
  11932. const (
  11933. // ReplicationStatusComplete is a ReplicationStatus enum value
  11934. ReplicationStatusComplete = "COMPLETE"
  11935. // ReplicationStatusPending is a ReplicationStatus enum value
  11936. ReplicationStatusPending = "PENDING"
  11937. // ReplicationStatusFailed is a ReplicationStatus enum value
  11938. ReplicationStatusFailed = "FAILED"
  11939. // ReplicationStatusReplica is a ReplicationStatus enum value
  11940. ReplicationStatusReplica = "REPLICA"
  11941. )
  11942. // If present, indicates that the requester was successfully charged for the
  11943. // request.
  11944. const (
  11945. // RequestChargedRequester is a RequestCharged enum value
  11946. RequestChargedRequester = "requester"
  11947. )
  11948. // Confirms that the requester knows that she or he will be charged for the
  11949. // request. Bucket owners need not specify this parameter in their requests.
  11950. // Documentation on downloading objects from requester pays buckets can be found
  11951. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11952. const (
  11953. // RequestPayerRequester is a RequestPayer enum value
  11954. RequestPayerRequester = "requester"
  11955. )
  11956. const (
  11957. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  11958. ServerSideEncryptionAes256 = "AES256"
  11959. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  11960. ServerSideEncryptionAwsKms = "aws:kms"
  11961. )
  11962. const (
  11963. // StorageClassStandard is a StorageClass enum value
  11964. StorageClassStandard = "STANDARD"
  11965. // StorageClassReducedRedundancy is a StorageClass enum value
  11966. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  11967. // StorageClassStandardIa is a StorageClass enum value
  11968. StorageClassStandardIa = "STANDARD_IA"
  11969. )
  11970. const (
  11971. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  11972. TransitionStorageClassGlacier = "GLACIER"
  11973. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  11974. TransitionStorageClassStandardIa = "STANDARD_IA"
  11975. )
  11976. const (
  11977. // TypeCanonicalUser is a Type enum value
  11978. TypeCanonicalUser = "CanonicalUser"
  11979. // TypeAmazonCustomerByEmail is a Type enum value
  11980. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  11981. // TypeGroup is a Type enum value
  11982. TypeGroup = "Group"
  11983. )