1
0

api.go 813 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package s3
  3. import (
  4. "bytes"
  5. "fmt"
  6. "io"
  7. "sync"
  8. "sync/atomic"
  9. "time"
  10. "github.com/aws/aws-sdk-go/aws"
  11. "github.com/aws/aws-sdk-go/aws/awserr"
  12. "github.com/aws/aws-sdk-go/aws/awsutil"
  13. "github.com/aws/aws-sdk-go/aws/client"
  14. "github.com/aws/aws-sdk-go/aws/request"
  15. "github.com/aws/aws-sdk-go/private/protocol"
  16. "github.com/aws/aws-sdk-go/private/protocol/eventstream"
  17. "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
  18. "github.com/aws/aws-sdk-go/private/protocol/rest"
  19. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  20. )
  21. const opAbortMultipartUpload = "AbortMultipartUpload"
  22. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  23. // client's request for the AbortMultipartUpload operation. The "output" return
  24. // value will be populated with the request's response once the request completes
  25. // successfully.
  26. //
  27. // Use "Send" method on the returned Request to send the API call to the service.
  28. // the "output" return value is not valid until after Send returns without error.
  29. //
  30. // See AbortMultipartUpload for more information on using the AbortMultipartUpload
  31. // API call, and error handling.
  32. //
  33. // This method is useful when you want to inject custom logic or configuration
  34. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  35. //
  36. //
  37. // // Example sending a request using the AbortMultipartUploadRequest method.
  38. // req, resp := client.AbortMultipartUploadRequest(params)
  39. //
  40. // err := req.Send()
  41. // if err == nil { // resp is now filled
  42. // fmt.Println(resp)
  43. // }
  44. //
  45. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  46. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  47. op := &request.Operation{
  48. Name: opAbortMultipartUpload,
  49. HTTPMethod: "DELETE",
  50. HTTPPath: "/{Bucket}/{Key+}",
  51. }
  52. if input == nil {
  53. input = &AbortMultipartUploadInput{}
  54. }
  55. output = &AbortMultipartUploadOutput{}
  56. req = c.newRequest(op, input, output)
  57. return
  58. }
  59. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  60. //
  61. // Aborts a multipart upload.
  62. //
  63. // To verify that all parts have been removed, so you don't get charged for
  64. // the part storage, you should call the List Parts operation and ensure the
  65. // parts list is empty.
  66. //
  67. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  68. // with awserr.Error's Code and Message methods to get detailed information about
  69. // the error.
  70. //
  71. // See the AWS API reference guide for Amazon Simple Storage Service's
  72. // API operation AbortMultipartUpload for usage and error information.
  73. //
  74. // Returned Error Codes:
  75. // * ErrCodeNoSuchUpload "NoSuchUpload"
  76. // The specified multipart upload does not exist.
  77. //
  78. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  79. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  80. req, out := c.AbortMultipartUploadRequest(input)
  81. return out, req.Send()
  82. }
  83. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  84. // the ability to pass a context and additional request options.
  85. //
  86. // See AbortMultipartUpload for details on how to use this API operation.
  87. //
  88. // The context must be non-nil and will be used for request cancellation. If
  89. // the context is nil a panic will occur. In the future the SDK may create
  90. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  91. // for more information on using Contexts.
  92. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  93. req, out := c.AbortMultipartUploadRequest(input)
  94. req.SetContext(ctx)
  95. req.ApplyOptions(opts...)
  96. return out, req.Send()
  97. }
  98. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  99. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  100. // client's request for the CompleteMultipartUpload operation. The "output" return
  101. // value will be populated with the request's response once the request completes
  102. // successfully.
  103. //
  104. // Use "Send" method on the returned Request to send the API call to the service.
  105. // the "output" return value is not valid until after Send returns without error.
  106. //
  107. // See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
  108. // API call, and error handling.
  109. //
  110. // This method is useful when you want to inject custom logic or configuration
  111. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  112. //
  113. //
  114. // // Example sending a request using the CompleteMultipartUploadRequest method.
  115. // req, resp := client.CompleteMultipartUploadRequest(params)
  116. //
  117. // err := req.Send()
  118. // if err == nil { // resp is now filled
  119. // fmt.Println(resp)
  120. // }
  121. //
  122. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  123. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  124. op := &request.Operation{
  125. Name: opCompleteMultipartUpload,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/{Bucket}/{Key+}",
  128. }
  129. if input == nil {
  130. input = &CompleteMultipartUploadInput{}
  131. }
  132. output = &CompleteMultipartUploadOutput{}
  133. req = c.newRequest(op, input, output)
  134. return
  135. }
  136. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  137. //
  138. // Completes a multipart upload by assembling previously uploaded parts.
  139. //
  140. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  141. // with awserr.Error's Code and Message methods to get detailed information about
  142. // the error.
  143. //
  144. // See the AWS API reference guide for Amazon Simple Storage Service's
  145. // API operation CompleteMultipartUpload for usage and error information.
  146. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  147. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  148. req, out := c.CompleteMultipartUploadRequest(input)
  149. return out, req.Send()
  150. }
  151. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  152. // the ability to pass a context and additional request options.
  153. //
  154. // See CompleteMultipartUpload for details on how to use this API operation.
  155. //
  156. // The context must be non-nil and will be used for request cancellation. If
  157. // the context is nil a panic will occur. In the future the SDK may create
  158. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  159. // for more information on using Contexts.
  160. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  161. req, out := c.CompleteMultipartUploadRequest(input)
  162. req.SetContext(ctx)
  163. req.ApplyOptions(opts...)
  164. return out, req.Send()
  165. }
  166. const opCopyObject = "CopyObject"
  167. // CopyObjectRequest generates a "aws/request.Request" representing the
  168. // client's request for the CopyObject operation. The "output" return
  169. // value will be populated with the request's response once the request completes
  170. // successfully.
  171. //
  172. // Use "Send" method on the returned Request to send the API call to the service.
  173. // the "output" return value is not valid until after Send returns without error.
  174. //
  175. // See CopyObject for more information on using the CopyObject
  176. // API call, and error handling.
  177. //
  178. // This method is useful when you want to inject custom logic or configuration
  179. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  180. //
  181. //
  182. // // Example sending a request using the CopyObjectRequest method.
  183. // req, resp := client.CopyObjectRequest(params)
  184. //
  185. // err := req.Send()
  186. // if err == nil { // resp is now filled
  187. // fmt.Println(resp)
  188. // }
  189. //
  190. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  191. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  192. op := &request.Operation{
  193. Name: opCopyObject,
  194. HTTPMethod: "PUT",
  195. HTTPPath: "/{Bucket}/{Key+}",
  196. }
  197. if input == nil {
  198. input = &CopyObjectInput{}
  199. }
  200. output = &CopyObjectOutput{}
  201. req = c.newRequest(op, input, output)
  202. return
  203. }
  204. // CopyObject API operation for Amazon Simple Storage Service.
  205. //
  206. // Creates a copy of an object that is already stored in Amazon S3.
  207. //
  208. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  209. // with awserr.Error's Code and Message methods to get detailed information about
  210. // the error.
  211. //
  212. // See the AWS API reference guide for Amazon Simple Storage Service's
  213. // API operation CopyObject for usage and error information.
  214. //
  215. // Returned Error Codes:
  216. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  217. // The source object of the COPY operation is not in the active tier and is
  218. // only stored in Amazon Glacier.
  219. //
  220. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  221. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  222. req, out := c.CopyObjectRequest(input)
  223. return out, req.Send()
  224. }
  225. // CopyObjectWithContext is the same as CopyObject with the addition of
  226. // the ability to pass a context and additional request options.
  227. //
  228. // See CopyObject for details on how to use this API operation.
  229. //
  230. // The context must be non-nil and will be used for request cancellation. If
  231. // the context is nil a panic will occur. In the future the SDK may create
  232. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  233. // for more information on using Contexts.
  234. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  235. req, out := c.CopyObjectRequest(input)
  236. req.SetContext(ctx)
  237. req.ApplyOptions(opts...)
  238. return out, req.Send()
  239. }
  240. const opCreateBucket = "CreateBucket"
  241. // CreateBucketRequest generates a "aws/request.Request" representing the
  242. // client's request for the CreateBucket operation. The "output" return
  243. // value will be populated with the request's response once the request completes
  244. // successfully.
  245. //
  246. // Use "Send" method on the returned Request to send the API call to the service.
  247. // the "output" return value is not valid until after Send returns without error.
  248. //
  249. // See CreateBucket for more information on using the CreateBucket
  250. // API call, and error handling.
  251. //
  252. // This method is useful when you want to inject custom logic or configuration
  253. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  254. //
  255. //
  256. // // Example sending a request using the CreateBucketRequest method.
  257. // req, resp := client.CreateBucketRequest(params)
  258. //
  259. // err := req.Send()
  260. // if err == nil { // resp is now filled
  261. // fmt.Println(resp)
  262. // }
  263. //
  264. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  265. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  266. op := &request.Operation{
  267. Name: opCreateBucket,
  268. HTTPMethod: "PUT",
  269. HTTPPath: "/{Bucket}",
  270. }
  271. if input == nil {
  272. input = &CreateBucketInput{}
  273. }
  274. output = &CreateBucketOutput{}
  275. req = c.newRequest(op, input, output)
  276. return
  277. }
  278. // CreateBucket API operation for Amazon Simple Storage Service.
  279. //
  280. // Creates a new bucket.
  281. //
  282. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  283. // with awserr.Error's Code and Message methods to get detailed information about
  284. // the error.
  285. //
  286. // See the AWS API reference guide for Amazon Simple Storage Service's
  287. // API operation CreateBucket for usage and error information.
  288. //
  289. // Returned Error Codes:
  290. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  291. // The requested bucket name is not available. The bucket namespace is shared
  292. // by all users of the system. Please select a different name and try again.
  293. //
  294. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  295. //
  296. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  297. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  298. req, out := c.CreateBucketRequest(input)
  299. return out, req.Send()
  300. }
  301. // CreateBucketWithContext is the same as CreateBucket with the addition of
  302. // the ability to pass a context and additional request options.
  303. //
  304. // See CreateBucket for details on how to use this API operation.
  305. //
  306. // The context must be non-nil and will be used for request cancellation. If
  307. // the context is nil a panic will occur. In the future the SDK may create
  308. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  309. // for more information on using Contexts.
  310. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  311. req, out := c.CreateBucketRequest(input)
  312. req.SetContext(ctx)
  313. req.ApplyOptions(opts...)
  314. return out, req.Send()
  315. }
  316. const opCreateMultipartUpload = "CreateMultipartUpload"
  317. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  318. // client's request for the CreateMultipartUpload operation. The "output" return
  319. // value will be populated with the request's response once the request completes
  320. // successfully.
  321. //
  322. // Use "Send" method on the returned Request to send the API call to the service.
  323. // the "output" return value is not valid until after Send returns without error.
  324. //
  325. // See CreateMultipartUpload for more information on using the CreateMultipartUpload
  326. // API call, and error handling.
  327. //
  328. // This method is useful when you want to inject custom logic or configuration
  329. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  330. //
  331. //
  332. // // Example sending a request using the CreateMultipartUploadRequest method.
  333. // req, resp := client.CreateMultipartUploadRequest(params)
  334. //
  335. // err := req.Send()
  336. // if err == nil { // resp is now filled
  337. // fmt.Println(resp)
  338. // }
  339. //
  340. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  341. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  342. op := &request.Operation{
  343. Name: opCreateMultipartUpload,
  344. HTTPMethod: "POST",
  345. HTTPPath: "/{Bucket}/{Key+}?uploads",
  346. }
  347. if input == nil {
  348. input = &CreateMultipartUploadInput{}
  349. }
  350. output = &CreateMultipartUploadOutput{}
  351. req = c.newRequest(op, input, output)
  352. return
  353. }
  354. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  355. //
  356. // Initiates a multipart upload and returns an upload ID.
  357. //
  358. // Note: After you initiate multipart upload and upload one or more parts, you
  359. // must either complete or abort multipart upload in order to stop getting charged
  360. // for storage of the uploaded parts. Only after you either complete or abort
  361. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  362. // you for the parts storage.
  363. //
  364. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  365. // with awserr.Error's Code and Message methods to get detailed information about
  366. // the error.
  367. //
  368. // See the AWS API reference guide for Amazon Simple Storage Service's
  369. // API operation CreateMultipartUpload for usage and error information.
  370. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  371. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  372. req, out := c.CreateMultipartUploadRequest(input)
  373. return out, req.Send()
  374. }
  375. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  376. // the ability to pass a context and additional request options.
  377. //
  378. // See CreateMultipartUpload for details on how to use this API operation.
  379. //
  380. // The context must be non-nil and will be used for request cancellation. If
  381. // the context is nil a panic will occur. In the future the SDK may create
  382. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  383. // for more information on using Contexts.
  384. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  385. req, out := c.CreateMultipartUploadRequest(input)
  386. req.SetContext(ctx)
  387. req.ApplyOptions(opts...)
  388. return out, req.Send()
  389. }
  390. const opDeleteBucket = "DeleteBucket"
  391. // DeleteBucketRequest generates a "aws/request.Request" representing the
  392. // client's request for the DeleteBucket operation. The "output" return
  393. // value will be populated with the request's response once the request completes
  394. // successfully.
  395. //
  396. // Use "Send" method on the returned Request to send the API call to the service.
  397. // the "output" return value is not valid until after Send returns without error.
  398. //
  399. // See DeleteBucket for more information on using the DeleteBucket
  400. // API call, and error handling.
  401. //
  402. // This method is useful when you want to inject custom logic or configuration
  403. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  404. //
  405. //
  406. // // Example sending a request using the DeleteBucketRequest method.
  407. // req, resp := client.DeleteBucketRequest(params)
  408. //
  409. // err := req.Send()
  410. // if err == nil { // resp is now filled
  411. // fmt.Println(resp)
  412. // }
  413. //
  414. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  415. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  416. op := &request.Operation{
  417. Name: opDeleteBucket,
  418. HTTPMethod: "DELETE",
  419. HTTPPath: "/{Bucket}",
  420. }
  421. if input == nil {
  422. input = &DeleteBucketInput{}
  423. }
  424. output = &DeleteBucketOutput{}
  425. req = c.newRequest(op, input, output)
  426. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  427. return
  428. }
  429. // DeleteBucket API operation for Amazon Simple Storage Service.
  430. //
  431. // Deletes the bucket. All objects (including all object versions and Delete
  432. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  433. //
  434. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  435. // with awserr.Error's Code and Message methods to get detailed information about
  436. // the error.
  437. //
  438. // See the AWS API reference guide for Amazon Simple Storage Service's
  439. // API operation DeleteBucket for usage and error information.
  440. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  441. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  442. req, out := c.DeleteBucketRequest(input)
  443. return out, req.Send()
  444. }
  445. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  446. // the ability to pass a context and additional request options.
  447. //
  448. // See DeleteBucket for details on how to use this API operation.
  449. //
  450. // The context must be non-nil and will be used for request cancellation. If
  451. // the context is nil a panic will occur. In the future the SDK may create
  452. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  453. // for more information on using Contexts.
  454. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  455. req, out := c.DeleteBucketRequest(input)
  456. req.SetContext(ctx)
  457. req.ApplyOptions(opts...)
  458. return out, req.Send()
  459. }
  460. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  461. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  462. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  463. // value will be populated with the request's response once the request completes
  464. // successfully.
  465. //
  466. // Use "Send" method on the returned Request to send the API call to the service.
  467. // the "output" return value is not valid until after Send returns without error.
  468. //
  469. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  470. // API call, and error handling.
  471. //
  472. // This method is useful when you want to inject custom logic or configuration
  473. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  474. //
  475. //
  476. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  477. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. //
  484. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  485. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  486. op := &request.Operation{
  487. Name: opDeleteBucketAnalyticsConfiguration,
  488. HTTPMethod: "DELETE",
  489. HTTPPath: "/{Bucket}?analytics",
  490. }
  491. if input == nil {
  492. input = &DeleteBucketAnalyticsConfigurationInput{}
  493. }
  494. output = &DeleteBucketAnalyticsConfigurationOutput{}
  495. req = c.newRequest(op, input, output)
  496. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  497. return
  498. }
  499. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  500. //
  501. // Deletes an analytics configuration for the bucket (specified by the analytics
  502. // configuration ID).
  503. //
  504. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  505. // with awserr.Error's Code and Message methods to get detailed information about
  506. // the error.
  507. //
  508. // See the AWS API reference guide for Amazon Simple Storage Service's
  509. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  510. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  511. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  512. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  513. return out, req.Send()
  514. }
  515. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  516. // the ability to pass a context and additional request options.
  517. //
  518. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  519. //
  520. // The context must be non-nil and will be used for request cancellation. If
  521. // the context is nil a panic will occur. In the future the SDK may create
  522. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  523. // for more information on using Contexts.
  524. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  525. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  526. req.SetContext(ctx)
  527. req.ApplyOptions(opts...)
  528. return out, req.Send()
  529. }
  530. const opDeleteBucketCors = "DeleteBucketCors"
  531. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  532. // client's request for the DeleteBucketCors operation. The "output" return
  533. // value will be populated with the request's response once the request completes
  534. // successfully.
  535. //
  536. // Use "Send" method on the returned Request to send the API call to the service.
  537. // the "output" return value is not valid until after Send returns without error.
  538. //
  539. // See DeleteBucketCors for more information on using the DeleteBucketCors
  540. // API call, and error handling.
  541. //
  542. // This method is useful when you want to inject custom logic or configuration
  543. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  544. //
  545. //
  546. // // Example sending a request using the DeleteBucketCorsRequest method.
  547. // req, resp := client.DeleteBucketCorsRequest(params)
  548. //
  549. // err := req.Send()
  550. // if err == nil { // resp is now filled
  551. // fmt.Println(resp)
  552. // }
  553. //
  554. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  555. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  556. op := &request.Operation{
  557. Name: opDeleteBucketCors,
  558. HTTPMethod: "DELETE",
  559. HTTPPath: "/{Bucket}?cors",
  560. }
  561. if input == nil {
  562. input = &DeleteBucketCorsInput{}
  563. }
  564. output = &DeleteBucketCorsOutput{}
  565. req = c.newRequest(op, input, output)
  566. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  567. return
  568. }
  569. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  570. //
  571. // Deletes the CORS configuration information set for the bucket.
  572. //
  573. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  574. // with awserr.Error's Code and Message methods to get detailed information about
  575. // the error.
  576. //
  577. // See the AWS API reference guide for Amazon Simple Storage Service's
  578. // API operation DeleteBucketCors for usage and error information.
  579. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  580. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  581. req, out := c.DeleteBucketCorsRequest(input)
  582. return out, req.Send()
  583. }
  584. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  585. // the ability to pass a context and additional request options.
  586. //
  587. // See DeleteBucketCors for details on how to use this API operation.
  588. //
  589. // The context must be non-nil and will be used for request cancellation. If
  590. // the context is nil a panic will occur. In the future the SDK may create
  591. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  592. // for more information on using Contexts.
  593. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  594. req, out := c.DeleteBucketCorsRequest(input)
  595. req.SetContext(ctx)
  596. req.ApplyOptions(opts...)
  597. return out, req.Send()
  598. }
  599. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  600. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  601. // client's request for the DeleteBucketEncryption operation. The "output" return
  602. // value will be populated with the request's response once the request completes
  603. // successfully.
  604. //
  605. // Use "Send" method on the returned Request to send the API call to the service.
  606. // the "output" return value is not valid until after Send returns without error.
  607. //
  608. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  609. // API call, and error handling.
  610. //
  611. // This method is useful when you want to inject custom logic or configuration
  612. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  613. //
  614. //
  615. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  616. // req, resp := client.DeleteBucketEncryptionRequest(params)
  617. //
  618. // err := req.Send()
  619. // if err == nil { // resp is now filled
  620. // fmt.Println(resp)
  621. // }
  622. //
  623. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  624. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  625. op := &request.Operation{
  626. Name: opDeleteBucketEncryption,
  627. HTTPMethod: "DELETE",
  628. HTTPPath: "/{Bucket}?encryption",
  629. }
  630. if input == nil {
  631. input = &DeleteBucketEncryptionInput{}
  632. }
  633. output = &DeleteBucketEncryptionOutput{}
  634. req = c.newRequest(op, input, output)
  635. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  636. return
  637. }
  638. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  639. //
  640. // Deletes the server-side encryption configuration from the bucket.
  641. //
  642. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  643. // with awserr.Error's Code and Message methods to get detailed information about
  644. // the error.
  645. //
  646. // See the AWS API reference guide for Amazon Simple Storage Service's
  647. // API operation DeleteBucketEncryption for usage and error information.
  648. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  649. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  650. req, out := c.DeleteBucketEncryptionRequest(input)
  651. return out, req.Send()
  652. }
  653. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  654. // the ability to pass a context and additional request options.
  655. //
  656. // See DeleteBucketEncryption for details on how to use this API operation.
  657. //
  658. // The context must be non-nil and will be used for request cancellation. If
  659. // the context is nil a panic will occur. In the future the SDK may create
  660. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  661. // for more information on using Contexts.
  662. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  663. req, out := c.DeleteBucketEncryptionRequest(input)
  664. req.SetContext(ctx)
  665. req.ApplyOptions(opts...)
  666. return out, req.Send()
  667. }
  668. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  669. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  670. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  671. // value will be populated with the request's response once the request completes
  672. // successfully.
  673. //
  674. // Use "Send" method on the returned Request to send the API call to the service.
  675. // the "output" return value is not valid until after Send returns without error.
  676. //
  677. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  678. // API call, and error handling.
  679. //
  680. // This method is useful when you want to inject custom logic or configuration
  681. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  682. //
  683. //
  684. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  685. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  686. //
  687. // err := req.Send()
  688. // if err == nil { // resp is now filled
  689. // fmt.Println(resp)
  690. // }
  691. //
  692. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  693. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  694. op := &request.Operation{
  695. Name: opDeleteBucketInventoryConfiguration,
  696. HTTPMethod: "DELETE",
  697. HTTPPath: "/{Bucket}?inventory",
  698. }
  699. if input == nil {
  700. input = &DeleteBucketInventoryConfigurationInput{}
  701. }
  702. output = &DeleteBucketInventoryConfigurationOutput{}
  703. req = c.newRequest(op, input, output)
  704. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  705. return
  706. }
  707. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  708. //
  709. // Deletes an inventory configuration (identified by the inventory ID) from
  710. // the bucket.
  711. //
  712. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  713. // with awserr.Error's Code and Message methods to get detailed information about
  714. // the error.
  715. //
  716. // See the AWS API reference guide for Amazon Simple Storage Service's
  717. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  718. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  719. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  720. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  721. return out, req.Send()
  722. }
  723. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  724. // the ability to pass a context and additional request options.
  725. //
  726. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  727. //
  728. // The context must be non-nil and will be used for request cancellation. If
  729. // the context is nil a panic will occur. In the future the SDK may create
  730. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  731. // for more information on using Contexts.
  732. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  733. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  734. req.SetContext(ctx)
  735. req.ApplyOptions(opts...)
  736. return out, req.Send()
  737. }
  738. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  739. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  740. // client's request for the DeleteBucketLifecycle operation. The "output" return
  741. // value will be populated with the request's response once the request completes
  742. // successfully.
  743. //
  744. // Use "Send" method on the returned Request to send the API call to the service.
  745. // the "output" return value is not valid until after Send returns without error.
  746. //
  747. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  748. // API call, and error handling.
  749. //
  750. // This method is useful when you want to inject custom logic or configuration
  751. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  752. //
  753. //
  754. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  755. // req, resp := client.DeleteBucketLifecycleRequest(params)
  756. //
  757. // err := req.Send()
  758. // if err == nil { // resp is now filled
  759. // fmt.Println(resp)
  760. // }
  761. //
  762. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  763. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  764. op := &request.Operation{
  765. Name: opDeleteBucketLifecycle,
  766. HTTPMethod: "DELETE",
  767. HTTPPath: "/{Bucket}?lifecycle",
  768. }
  769. if input == nil {
  770. input = &DeleteBucketLifecycleInput{}
  771. }
  772. output = &DeleteBucketLifecycleOutput{}
  773. req = c.newRequest(op, input, output)
  774. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  775. return
  776. }
  777. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  778. //
  779. // Deletes the lifecycle configuration from the bucket.
  780. //
  781. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  782. // with awserr.Error's Code and Message methods to get detailed information about
  783. // the error.
  784. //
  785. // See the AWS API reference guide for Amazon Simple Storage Service's
  786. // API operation DeleteBucketLifecycle for usage and error information.
  787. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  788. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  789. req, out := c.DeleteBucketLifecycleRequest(input)
  790. return out, req.Send()
  791. }
  792. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  793. // the ability to pass a context and additional request options.
  794. //
  795. // See DeleteBucketLifecycle for details on how to use this API operation.
  796. //
  797. // The context must be non-nil and will be used for request cancellation. If
  798. // the context is nil a panic will occur. In the future the SDK may create
  799. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  800. // for more information on using Contexts.
  801. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  802. req, out := c.DeleteBucketLifecycleRequest(input)
  803. req.SetContext(ctx)
  804. req.ApplyOptions(opts...)
  805. return out, req.Send()
  806. }
  807. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  808. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  809. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  810. // value will be populated with the request's response once the request completes
  811. // successfully.
  812. //
  813. // Use "Send" method on the returned Request to send the API call to the service.
  814. // the "output" return value is not valid until after Send returns without error.
  815. //
  816. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  817. // API call, and error handling.
  818. //
  819. // This method is useful when you want to inject custom logic or configuration
  820. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  821. //
  822. //
  823. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  824. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  825. //
  826. // err := req.Send()
  827. // if err == nil { // resp is now filled
  828. // fmt.Println(resp)
  829. // }
  830. //
  831. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  832. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  833. op := &request.Operation{
  834. Name: opDeleteBucketMetricsConfiguration,
  835. HTTPMethod: "DELETE",
  836. HTTPPath: "/{Bucket}?metrics",
  837. }
  838. if input == nil {
  839. input = &DeleteBucketMetricsConfigurationInput{}
  840. }
  841. output = &DeleteBucketMetricsConfigurationOutput{}
  842. req = c.newRequest(op, input, output)
  843. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  844. return
  845. }
  846. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  847. //
  848. // Deletes a metrics configuration (specified by the metrics configuration ID)
  849. // from the bucket.
  850. //
  851. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  852. // with awserr.Error's Code and Message methods to get detailed information about
  853. // the error.
  854. //
  855. // See the AWS API reference guide for Amazon Simple Storage Service's
  856. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  857. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  858. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  859. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  860. return out, req.Send()
  861. }
  862. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  863. // the ability to pass a context and additional request options.
  864. //
  865. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  866. //
  867. // The context must be non-nil and will be used for request cancellation. If
  868. // the context is nil a panic will occur. In the future the SDK may create
  869. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  870. // for more information on using Contexts.
  871. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  872. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  873. req.SetContext(ctx)
  874. req.ApplyOptions(opts...)
  875. return out, req.Send()
  876. }
  877. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  878. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  879. // client's request for the DeleteBucketPolicy operation. The "output" return
  880. // value will be populated with the request's response once the request completes
  881. // successfully.
  882. //
  883. // Use "Send" method on the returned Request to send the API call to the service.
  884. // the "output" return value is not valid until after Send returns without error.
  885. //
  886. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  887. // API call, and error handling.
  888. //
  889. // This method is useful when you want to inject custom logic or configuration
  890. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  891. //
  892. //
  893. // // Example sending a request using the DeleteBucketPolicyRequest method.
  894. // req, resp := client.DeleteBucketPolicyRequest(params)
  895. //
  896. // err := req.Send()
  897. // if err == nil { // resp is now filled
  898. // fmt.Println(resp)
  899. // }
  900. //
  901. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  902. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  903. op := &request.Operation{
  904. Name: opDeleteBucketPolicy,
  905. HTTPMethod: "DELETE",
  906. HTTPPath: "/{Bucket}?policy",
  907. }
  908. if input == nil {
  909. input = &DeleteBucketPolicyInput{}
  910. }
  911. output = &DeleteBucketPolicyOutput{}
  912. req = c.newRequest(op, input, output)
  913. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  914. return
  915. }
  916. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  917. //
  918. // Deletes the policy from the bucket.
  919. //
  920. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  921. // with awserr.Error's Code and Message methods to get detailed information about
  922. // the error.
  923. //
  924. // See the AWS API reference guide for Amazon Simple Storage Service's
  925. // API operation DeleteBucketPolicy for usage and error information.
  926. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  927. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  928. req, out := c.DeleteBucketPolicyRequest(input)
  929. return out, req.Send()
  930. }
  931. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  932. // the ability to pass a context and additional request options.
  933. //
  934. // See DeleteBucketPolicy for details on how to use this API operation.
  935. //
  936. // The context must be non-nil and will be used for request cancellation. If
  937. // the context is nil a panic will occur. In the future the SDK may create
  938. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  939. // for more information on using Contexts.
  940. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  941. req, out := c.DeleteBucketPolicyRequest(input)
  942. req.SetContext(ctx)
  943. req.ApplyOptions(opts...)
  944. return out, req.Send()
  945. }
  946. const opDeleteBucketReplication = "DeleteBucketReplication"
  947. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  948. // client's request for the DeleteBucketReplication operation. The "output" return
  949. // value will be populated with the request's response once the request completes
  950. // successfully.
  951. //
  952. // Use "Send" method on the returned Request to send the API call to the service.
  953. // the "output" return value is not valid until after Send returns without error.
  954. //
  955. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  956. // API call, and error handling.
  957. //
  958. // This method is useful when you want to inject custom logic or configuration
  959. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  960. //
  961. //
  962. // // Example sending a request using the DeleteBucketReplicationRequest method.
  963. // req, resp := client.DeleteBucketReplicationRequest(params)
  964. //
  965. // err := req.Send()
  966. // if err == nil { // resp is now filled
  967. // fmt.Println(resp)
  968. // }
  969. //
  970. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  971. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  972. op := &request.Operation{
  973. Name: opDeleteBucketReplication,
  974. HTTPMethod: "DELETE",
  975. HTTPPath: "/{Bucket}?replication",
  976. }
  977. if input == nil {
  978. input = &DeleteBucketReplicationInput{}
  979. }
  980. output = &DeleteBucketReplicationOutput{}
  981. req = c.newRequest(op, input, output)
  982. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  983. return
  984. }
  985. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  986. //
  987. // Deletes the replication configuration from the bucket. For information about
  988. // replication configuration, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  989. // in the Amazon S3 Developer Guide.
  990. //
  991. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  992. // with awserr.Error's Code and Message methods to get detailed information about
  993. // the error.
  994. //
  995. // See the AWS API reference guide for Amazon Simple Storage Service's
  996. // API operation DeleteBucketReplication for usage and error information.
  997. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  998. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  999. req, out := c.DeleteBucketReplicationRequest(input)
  1000. return out, req.Send()
  1001. }
  1002. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1003. // the ability to pass a context and additional request options.
  1004. //
  1005. // See DeleteBucketReplication for details on how to use this API operation.
  1006. //
  1007. // The context must be non-nil and will be used for request cancellation. If
  1008. // the context is nil a panic will occur. In the future the SDK may create
  1009. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1010. // for more information on using Contexts.
  1011. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1012. req, out := c.DeleteBucketReplicationRequest(input)
  1013. req.SetContext(ctx)
  1014. req.ApplyOptions(opts...)
  1015. return out, req.Send()
  1016. }
  1017. const opDeleteBucketTagging = "DeleteBucketTagging"
  1018. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1019. // client's request for the DeleteBucketTagging operation. The "output" return
  1020. // value will be populated with the request's response once the request completes
  1021. // successfully.
  1022. //
  1023. // Use "Send" method on the returned Request to send the API call to the service.
  1024. // the "output" return value is not valid until after Send returns without error.
  1025. //
  1026. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1027. // API call, and error handling.
  1028. //
  1029. // This method is useful when you want to inject custom logic or configuration
  1030. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1031. //
  1032. //
  1033. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1034. // req, resp := client.DeleteBucketTaggingRequest(params)
  1035. //
  1036. // err := req.Send()
  1037. // if err == nil { // resp is now filled
  1038. // fmt.Println(resp)
  1039. // }
  1040. //
  1041. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1042. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1043. op := &request.Operation{
  1044. Name: opDeleteBucketTagging,
  1045. HTTPMethod: "DELETE",
  1046. HTTPPath: "/{Bucket}?tagging",
  1047. }
  1048. if input == nil {
  1049. input = &DeleteBucketTaggingInput{}
  1050. }
  1051. output = &DeleteBucketTaggingOutput{}
  1052. req = c.newRequest(op, input, output)
  1053. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1054. return
  1055. }
  1056. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1057. //
  1058. // Deletes the tags from the bucket.
  1059. //
  1060. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1061. // with awserr.Error's Code and Message methods to get detailed information about
  1062. // the error.
  1063. //
  1064. // See the AWS API reference guide for Amazon Simple Storage Service's
  1065. // API operation DeleteBucketTagging for usage and error information.
  1066. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1067. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1068. req, out := c.DeleteBucketTaggingRequest(input)
  1069. return out, req.Send()
  1070. }
  1071. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1072. // the ability to pass a context and additional request options.
  1073. //
  1074. // See DeleteBucketTagging for details on how to use this API operation.
  1075. //
  1076. // The context must be non-nil and will be used for request cancellation. If
  1077. // the context is nil a panic will occur. In the future the SDK may create
  1078. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1079. // for more information on using Contexts.
  1080. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1081. req, out := c.DeleteBucketTaggingRequest(input)
  1082. req.SetContext(ctx)
  1083. req.ApplyOptions(opts...)
  1084. return out, req.Send()
  1085. }
  1086. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1087. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1088. // client's request for the DeleteBucketWebsite operation. The "output" return
  1089. // value will be populated with the request's response once the request completes
  1090. // successfully.
  1091. //
  1092. // Use "Send" method on the returned Request to send the API call to the service.
  1093. // the "output" return value is not valid until after Send returns without error.
  1094. //
  1095. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1096. // API call, and error handling.
  1097. //
  1098. // This method is useful when you want to inject custom logic or configuration
  1099. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1100. //
  1101. //
  1102. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1103. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1104. //
  1105. // err := req.Send()
  1106. // if err == nil { // resp is now filled
  1107. // fmt.Println(resp)
  1108. // }
  1109. //
  1110. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1111. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1112. op := &request.Operation{
  1113. Name: opDeleteBucketWebsite,
  1114. HTTPMethod: "DELETE",
  1115. HTTPPath: "/{Bucket}?website",
  1116. }
  1117. if input == nil {
  1118. input = &DeleteBucketWebsiteInput{}
  1119. }
  1120. output = &DeleteBucketWebsiteOutput{}
  1121. req = c.newRequest(op, input, output)
  1122. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1123. return
  1124. }
  1125. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1126. //
  1127. // This operation removes the website configuration from the bucket.
  1128. //
  1129. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1130. // with awserr.Error's Code and Message methods to get detailed information about
  1131. // the error.
  1132. //
  1133. // See the AWS API reference guide for Amazon Simple Storage Service's
  1134. // API operation DeleteBucketWebsite for usage and error information.
  1135. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1136. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1137. req, out := c.DeleteBucketWebsiteRequest(input)
  1138. return out, req.Send()
  1139. }
  1140. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1141. // the ability to pass a context and additional request options.
  1142. //
  1143. // See DeleteBucketWebsite for details on how to use this API operation.
  1144. //
  1145. // The context must be non-nil and will be used for request cancellation. If
  1146. // the context is nil a panic will occur. In the future the SDK may create
  1147. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1148. // for more information on using Contexts.
  1149. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1150. req, out := c.DeleteBucketWebsiteRequest(input)
  1151. req.SetContext(ctx)
  1152. req.ApplyOptions(opts...)
  1153. return out, req.Send()
  1154. }
  1155. const opDeleteObject = "DeleteObject"
  1156. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1157. // client's request for the DeleteObject operation. The "output" return
  1158. // value will be populated with the request's response once the request completes
  1159. // successfully.
  1160. //
  1161. // Use "Send" method on the returned Request to send the API call to the service.
  1162. // the "output" return value is not valid until after Send returns without error.
  1163. //
  1164. // See DeleteObject for more information on using the DeleteObject
  1165. // API call, and error handling.
  1166. //
  1167. // This method is useful when you want to inject custom logic or configuration
  1168. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1169. //
  1170. //
  1171. // // Example sending a request using the DeleteObjectRequest method.
  1172. // req, resp := client.DeleteObjectRequest(params)
  1173. //
  1174. // err := req.Send()
  1175. // if err == nil { // resp is now filled
  1176. // fmt.Println(resp)
  1177. // }
  1178. //
  1179. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1180. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1181. op := &request.Operation{
  1182. Name: opDeleteObject,
  1183. HTTPMethod: "DELETE",
  1184. HTTPPath: "/{Bucket}/{Key+}",
  1185. }
  1186. if input == nil {
  1187. input = &DeleteObjectInput{}
  1188. }
  1189. output = &DeleteObjectOutput{}
  1190. req = c.newRequest(op, input, output)
  1191. return
  1192. }
  1193. // DeleteObject API operation for Amazon Simple Storage Service.
  1194. //
  1195. // Removes the null version (if there is one) of an object and inserts a delete
  1196. // marker, which becomes the latest version of the object. If there isn't a
  1197. // null version, Amazon S3 does not remove any objects.
  1198. //
  1199. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1200. // with awserr.Error's Code and Message methods to get detailed information about
  1201. // the error.
  1202. //
  1203. // See the AWS API reference guide for Amazon Simple Storage Service's
  1204. // API operation DeleteObject for usage and error information.
  1205. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1206. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1207. req, out := c.DeleteObjectRequest(input)
  1208. return out, req.Send()
  1209. }
  1210. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1211. // the ability to pass a context and additional request options.
  1212. //
  1213. // See DeleteObject for details on how to use this API operation.
  1214. //
  1215. // The context must be non-nil and will be used for request cancellation. If
  1216. // the context is nil a panic will occur. In the future the SDK may create
  1217. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1218. // for more information on using Contexts.
  1219. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1220. req, out := c.DeleteObjectRequest(input)
  1221. req.SetContext(ctx)
  1222. req.ApplyOptions(opts...)
  1223. return out, req.Send()
  1224. }
  1225. const opDeleteObjectTagging = "DeleteObjectTagging"
  1226. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1227. // client's request for the DeleteObjectTagging operation. The "output" return
  1228. // value will be populated with the request's response once the request completes
  1229. // successfully.
  1230. //
  1231. // Use "Send" method on the returned Request to send the API call to the service.
  1232. // the "output" return value is not valid until after Send returns without error.
  1233. //
  1234. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  1235. // API call, and error handling.
  1236. //
  1237. // This method is useful when you want to inject custom logic or configuration
  1238. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1239. //
  1240. //
  1241. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1242. // req, resp := client.DeleteObjectTaggingRequest(params)
  1243. //
  1244. // err := req.Send()
  1245. // if err == nil { // resp is now filled
  1246. // fmt.Println(resp)
  1247. // }
  1248. //
  1249. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1250. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1251. op := &request.Operation{
  1252. Name: opDeleteObjectTagging,
  1253. HTTPMethod: "DELETE",
  1254. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1255. }
  1256. if input == nil {
  1257. input = &DeleteObjectTaggingInput{}
  1258. }
  1259. output = &DeleteObjectTaggingOutput{}
  1260. req = c.newRequest(op, input, output)
  1261. return
  1262. }
  1263. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1264. //
  1265. // Removes the tag-set from an existing object.
  1266. //
  1267. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1268. // with awserr.Error's Code and Message methods to get detailed information about
  1269. // the error.
  1270. //
  1271. // See the AWS API reference guide for Amazon Simple Storage Service's
  1272. // API operation DeleteObjectTagging for usage and error information.
  1273. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1274. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1275. req, out := c.DeleteObjectTaggingRequest(input)
  1276. return out, req.Send()
  1277. }
  1278. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1279. // the ability to pass a context and additional request options.
  1280. //
  1281. // See DeleteObjectTagging for details on how to use this API operation.
  1282. //
  1283. // The context must be non-nil and will be used for request cancellation. If
  1284. // the context is nil a panic will occur. In the future the SDK may create
  1285. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1286. // for more information on using Contexts.
  1287. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1288. req, out := c.DeleteObjectTaggingRequest(input)
  1289. req.SetContext(ctx)
  1290. req.ApplyOptions(opts...)
  1291. return out, req.Send()
  1292. }
  1293. const opDeleteObjects = "DeleteObjects"
  1294. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1295. // client's request for the DeleteObjects operation. The "output" return
  1296. // value will be populated with the request's response once the request completes
  1297. // successfully.
  1298. //
  1299. // Use "Send" method on the returned Request to send the API call to the service.
  1300. // the "output" return value is not valid until after Send returns without error.
  1301. //
  1302. // See DeleteObjects for more information on using the DeleteObjects
  1303. // API call, and error handling.
  1304. //
  1305. // This method is useful when you want to inject custom logic or configuration
  1306. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1307. //
  1308. //
  1309. // // Example sending a request using the DeleteObjectsRequest method.
  1310. // req, resp := client.DeleteObjectsRequest(params)
  1311. //
  1312. // err := req.Send()
  1313. // if err == nil { // resp is now filled
  1314. // fmt.Println(resp)
  1315. // }
  1316. //
  1317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1318. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1319. op := &request.Operation{
  1320. Name: opDeleteObjects,
  1321. HTTPMethod: "POST",
  1322. HTTPPath: "/{Bucket}?delete",
  1323. }
  1324. if input == nil {
  1325. input = &DeleteObjectsInput{}
  1326. }
  1327. output = &DeleteObjectsOutput{}
  1328. req = c.newRequest(op, input, output)
  1329. return
  1330. }
  1331. // DeleteObjects API operation for Amazon Simple Storage Service.
  1332. //
  1333. // This operation enables you to delete multiple objects from a bucket using
  1334. // a single HTTP request. You may specify up to 1000 keys.
  1335. //
  1336. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1337. // with awserr.Error's Code and Message methods to get detailed information about
  1338. // the error.
  1339. //
  1340. // See the AWS API reference guide for Amazon Simple Storage Service's
  1341. // API operation DeleteObjects for usage and error information.
  1342. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1343. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1344. req, out := c.DeleteObjectsRequest(input)
  1345. return out, req.Send()
  1346. }
  1347. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1348. // the ability to pass a context and additional request options.
  1349. //
  1350. // See DeleteObjects for details on how to use this API operation.
  1351. //
  1352. // The context must be non-nil and will be used for request cancellation. If
  1353. // the context is nil a panic will occur. In the future the SDK may create
  1354. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1355. // for more information on using Contexts.
  1356. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1357. req, out := c.DeleteObjectsRequest(input)
  1358. req.SetContext(ctx)
  1359. req.ApplyOptions(opts...)
  1360. return out, req.Send()
  1361. }
  1362. const opDeletePublicAccessBlock = "DeletePublicAccessBlock"
  1363. // DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the
  1364. // client's request for the DeletePublicAccessBlock operation. The "output" return
  1365. // value will be populated with the request's response once the request completes
  1366. // successfully.
  1367. //
  1368. // Use "Send" method on the returned Request to send the API call to the service.
  1369. // the "output" return value is not valid until after Send returns without error.
  1370. //
  1371. // See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock
  1372. // API call, and error handling.
  1373. //
  1374. // This method is useful when you want to inject custom logic or configuration
  1375. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1376. //
  1377. //
  1378. // // Example sending a request using the DeletePublicAccessBlockRequest method.
  1379. // req, resp := client.DeletePublicAccessBlockRequest(params)
  1380. //
  1381. // err := req.Send()
  1382. // if err == nil { // resp is now filled
  1383. // fmt.Println(resp)
  1384. // }
  1385. //
  1386. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  1387. func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) {
  1388. op := &request.Operation{
  1389. Name: opDeletePublicAccessBlock,
  1390. HTTPMethod: "DELETE",
  1391. HTTPPath: "/{Bucket}?publicAccessBlock",
  1392. }
  1393. if input == nil {
  1394. input = &DeletePublicAccessBlockInput{}
  1395. }
  1396. output = &DeletePublicAccessBlockOutput{}
  1397. req = c.newRequest(op, input, output)
  1398. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1399. return
  1400. }
  1401. // DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
  1402. //
  1403. // Removes the PublicAccessBlock configuration from an Amazon S3 bucket.
  1404. //
  1405. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1406. // with awserr.Error's Code and Message methods to get detailed information about
  1407. // the error.
  1408. //
  1409. // See the AWS API reference guide for Amazon Simple Storage Service's
  1410. // API operation DeletePublicAccessBlock for usage and error information.
  1411. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
  1412. func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) {
  1413. req, out := c.DeletePublicAccessBlockRequest(input)
  1414. return out, req.Send()
  1415. }
  1416. // DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of
  1417. // the ability to pass a context and additional request options.
  1418. //
  1419. // See DeletePublicAccessBlock for details on how to use this API operation.
  1420. //
  1421. // The context must be non-nil and will be used for request cancellation. If
  1422. // the context is nil a panic will occur. In the future the SDK may create
  1423. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1424. // for more information on using Contexts.
  1425. func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) {
  1426. req, out := c.DeletePublicAccessBlockRequest(input)
  1427. req.SetContext(ctx)
  1428. req.ApplyOptions(opts...)
  1429. return out, req.Send()
  1430. }
  1431. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1432. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1433. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1434. // value will be populated with the request's response once the request completes
  1435. // successfully.
  1436. //
  1437. // Use "Send" method on the returned Request to send the API call to the service.
  1438. // the "output" return value is not valid until after Send returns without error.
  1439. //
  1440. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  1441. // API call, and error handling.
  1442. //
  1443. // This method is useful when you want to inject custom logic or configuration
  1444. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1445. //
  1446. //
  1447. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1448. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1449. //
  1450. // err := req.Send()
  1451. // if err == nil { // resp is now filled
  1452. // fmt.Println(resp)
  1453. // }
  1454. //
  1455. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1456. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1457. op := &request.Operation{
  1458. Name: opGetBucketAccelerateConfiguration,
  1459. HTTPMethod: "GET",
  1460. HTTPPath: "/{Bucket}?accelerate",
  1461. }
  1462. if input == nil {
  1463. input = &GetBucketAccelerateConfigurationInput{}
  1464. }
  1465. output = &GetBucketAccelerateConfigurationOutput{}
  1466. req = c.newRequest(op, input, output)
  1467. return
  1468. }
  1469. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1470. //
  1471. // Returns the accelerate configuration of a bucket.
  1472. //
  1473. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1474. // with awserr.Error's Code and Message methods to get detailed information about
  1475. // the error.
  1476. //
  1477. // See the AWS API reference guide for Amazon Simple Storage Service's
  1478. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1479. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1480. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1481. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1482. return out, req.Send()
  1483. }
  1484. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1485. // the ability to pass a context and additional request options.
  1486. //
  1487. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1488. //
  1489. // The context must be non-nil and will be used for request cancellation. If
  1490. // the context is nil a panic will occur. In the future the SDK may create
  1491. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1492. // for more information on using Contexts.
  1493. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1494. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1495. req.SetContext(ctx)
  1496. req.ApplyOptions(opts...)
  1497. return out, req.Send()
  1498. }
  1499. const opGetBucketAcl = "GetBucketAcl"
  1500. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1501. // client's request for the GetBucketAcl operation. The "output" return
  1502. // value will be populated with the request's response once the request completes
  1503. // successfully.
  1504. //
  1505. // Use "Send" method on the returned Request to send the API call to the service.
  1506. // the "output" return value is not valid until after Send returns without error.
  1507. //
  1508. // See GetBucketAcl for more information on using the GetBucketAcl
  1509. // API call, and error handling.
  1510. //
  1511. // This method is useful when you want to inject custom logic or configuration
  1512. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1513. //
  1514. //
  1515. // // Example sending a request using the GetBucketAclRequest method.
  1516. // req, resp := client.GetBucketAclRequest(params)
  1517. //
  1518. // err := req.Send()
  1519. // if err == nil { // resp is now filled
  1520. // fmt.Println(resp)
  1521. // }
  1522. //
  1523. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1524. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1525. op := &request.Operation{
  1526. Name: opGetBucketAcl,
  1527. HTTPMethod: "GET",
  1528. HTTPPath: "/{Bucket}?acl",
  1529. }
  1530. if input == nil {
  1531. input = &GetBucketAclInput{}
  1532. }
  1533. output = &GetBucketAclOutput{}
  1534. req = c.newRequest(op, input, output)
  1535. return
  1536. }
  1537. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1538. //
  1539. // Gets the access control policy for the bucket.
  1540. //
  1541. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1542. // with awserr.Error's Code and Message methods to get detailed information about
  1543. // the error.
  1544. //
  1545. // See the AWS API reference guide for Amazon Simple Storage Service's
  1546. // API operation GetBucketAcl for usage and error information.
  1547. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1548. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1549. req, out := c.GetBucketAclRequest(input)
  1550. return out, req.Send()
  1551. }
  1552. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1553. // the ability to pass a context and additional request options.
  1554. //
  1555. // See GetBucketAcl for details on how to use this API operation.
  1556. //
  1557. // The context must be non-nil and will be used for request cancellation. If
  1558. // the context is nil a panic will occur. In the future the SDK may create
  1559. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1560. // for more information on using Contexts.
  1561. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1562. req, out := c.GetBucketAclRequest(input)
  1563. req.SetContext(ctx)
  1564. req.ApplyOptions(opts...)
  1565. return out, req.Send()
  1566. }
  1567. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1568. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1569. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1570. // value will be populated with the request's response once the request completes
  1571. // successfully.
  1572. //
  1573. // Use "Send" method on the returned Request to send the API call to the service.
  1574. // the "output" return value is not valid until after Send returns without error.
  1575. //
  1576. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  1577. // API call, and error handling.
  1578. //
  1579. // This method is useful when you want to inject custom logic or configuration
  1580. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1581. //
  1582. //
  1583. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1584. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1585. //
  1586. // err := req.Send()
  1587. // if err == nil { // resp is now filled
  1588. // fmt.Println(resp)
  1589. // }
  1590. //
  1591. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1592. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1593. op := &request.Operation{
  1594. Name: opGetBucketAnalyticsConfiguration,
  1595. HTTPMethod: "GET",
  1596. HTTPPath: "/{Bucket}?analytics",
  1597. }
  1598. if input == nil {
  1599. input = &GetBucketAnalyticsConfigurationInput{}
  1600. }
  1601. output = &GetBucketAnalyticsConfigurationOutput{}
  1602. req = c.newRequest(op, input, output)
  1603. return
  1604. }
  1605. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1606. //
  1607. // Gets an analytics configuration for the bucket (specified by the analytics
  1608. // configuration ID).
  1609. //
  1610. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1611. // with awserr.Error's Code and Message methods to get detailed information about
  1612. // the error.
  1613. //
  1614. // See the AWS API reference guide for Amazon Simple Storage Service's
  1615. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1616. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1617. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1618. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1619. return out, req.Send()
  1620. }
  1621. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1622. // the ability to pass a context and additional request options.
  1623. //
  1624. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1625. //
  1626. // The context must be non-nil and will be used for request cancellation. If
  1627. // the context is nil a panic will occur. In the future the SDK may create
  1628. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1629. // for more information on using Contexts.
  1630. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1631. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1632. req.SetContext(ctx)
  1633. req.ApplyOptions(opts...)
  1634. return out, req.Send()
  1635. }
  1636. const opGetBucketCors = "GetBucketCors"
  1637. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1638. // client's request for the GetBucketCors operation. The "output" return
  1639. // value will be populated with the request's response once the request completes
  1640. // successfully.
  1641. //
  1642. // Use "Send" method on the returned Request to send the API call to the service.
  1643. // the "output" return value is not valid until after Send returns without error.
  1644. //
  1645. // See GetBucketCors for more information on using the GetBucketCors
  1646. // API call, and error handling.
  1647. //
  1648. // This method is useful when you want to inject custom logic or configuration
  1649. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1650. //
  1651. //
  1652. // // Example sending a request using the GetBucketCorsRequest method.
  1653. // req, resp := client.GetBucketCorsRequest(params)
  1654. //
  1655. // err := req.Send()
  1656. // if err == nil { // resp is now filled
  1657. // fmt.Println(resp)
  1658. // }
  1659. //
  1660. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1661. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1662. op := &request.Operation{
  1663. Name: opGetBucketCors,
  1664. HTTPMethod: "GET",
  1665. HTTPPath: "/{Bucket}?cors",
  1666. }
  1667. if input == nil {
  1668. input = &GetBucketCorsInput{}
  1669. }
  1670. output = &GetBucketCorsOutput{}
  1671. req = c.newRequest(op, input, output)
  1672. return
  1673. }
  1674. // GetBucketCors API operation for Amazon Simple Storage Service.
  1675. //
  1676. // Returns the CORS configuration for the bucket.
  1677. //
  1678. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1679. // with awserr.Error's Code and Message methods to get detailed information about
  1680. // the error.
  1681. //
  1682. // See the AWS API reference guide for Amazon Simple Storage Service's
  1683. // API operation GetBucketCors for usage and error information.
  1684. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1685. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1686. req, out := c.GetBucketCorsRequest(input)
  1687. return out, req.Send()
  1688. }
  1689. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1690. // the ability to pass a context and additional request options.
  1691. //
  1692. // See GetBucketCors for details on how to use this API operation.
  1693. //
  1694. // The context must be non-nil and will be used for request cancellation. If
  1695. // the context is nil a panic will occur. In the future the SDK may create
  1696. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1697. // for more information on using Contexts.
  1698. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1699. req, out := c.GetBucketCorsRequest(input)
  1700. req.SetContext(ctx)
  1701. req.ApplyOptions(opts...)
  1702. return out, req.Send()
  1703. }
  1704. const opGetBucketEncryption = "GetBucketEncryption"
  1705. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  1706. // client's request for the GetBucketEncryption operation. The "output" return
  1707. // value will be populated with the request's response once the request completes
  1708. // successfully.
  1709. //
  1710. // Use "Send" method on the returned Request to send the API call to the service.
  1711. // the "output" return value is not valid until after Send returns without error.
  1712. //
  1713. // See GetBucketEncryption for more information on using the GetBucketEncryption
  1714. // API call, and error handling.
  1715. //
  1716. // This method is useful when you want to inject custom logic or configuration
  1717. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1718. //
  1719. //
  1720. // // Example sending a request using the GetBucketEncryptionRequest method.
  1721. // req, resp := client.GetBucketEncryptionRequest(params)
  1722. //
  1723. // err := req.Send()
  1724. // if err == nil { // resp is now filled
  1725. // fmt.Println(resp)
  1726. // }
  1727. //
  1728. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1729. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  1730. op := &request.Operation{
  1731. Name: opGetBucketEncryption,
  1732. HTTPMethod: "GET",
  1733. HTTPPath: "/{Bucket}?encryption",
  1734. }
  1735. if input == nil {
  1736. input = &GetBucketEncryptionInput{}
  1737. }
  1738. output = &GetBucketEncryptionOutput{}
  1739. req = c.newRequest(op, input, output)
  1740. return
  1741. }
  1742. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  1743. //
  1744. // Returns the server-side encryption configuration of a bucket.
  1745. //
  1746. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1747. // with awserr.Error's Code and Message methods to get detailed information about
  1748. // the error.
  1749. //
  1750. // See the AWS API reference guide for Amazon Simple Storage Service's
  1751. // API operation GetBucketEncryption for usage and error information.
  1752. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1753. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  1754. req, out := c.GetBucketEncryptionRequest(input)
  1755. return out, req.Send()
  1756. }
  1757. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  1758. // the ability to pass a context and additional request options.
  1759. //
  1760. // See GetBucketEncryption for details on how to use this API operation.
  1761. //
  1762. // The context must be non-nil and will be used for request cancellation. If
  1763. // the context is nil a panic will occur. In the future the SDK may create
  1764. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1765. // for more information on using Contexts.
  1766. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  1767. req, out := c.GetBucketEncryptionRequest(input)
  1768. req.SetContext(ctx)
  1769. req.ApplyOptions(opts...)
  1770. return out, req.Send()
  1771. }
  1772. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1773. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1774. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1775. // value will be populated with the request's response once the request completes
  1776. // successfully.
  1777. //
  1778. // Use "Send" method on the returned Request to send the API call to the service.
  1779. // the "output" return value is not valid until after Send returns without error.
  1780. //
  1781. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  1782. // API call, and error handling.
  1783. //
  1784. // This method is useful when you want to inject custom logic or configuration
  1785. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1786. //
  1787. //
  1788. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1789. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1790. //
  1791. // err := req.Send()
  1792. // if err == nil { // resp is now filled
  1793. // fmt.Println(resp)
  1794. // }
  1795. //
  1796. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1797. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1798. op := &request.Operation{
  1799. Name: opGetBucketInventoryConfiguration,
  1800. HTTPMethod: "GET",
  1801. HTTPPath: "/{Bucket}?inventory",
  1802. }
  1803. if input == nil {
  1804. input = &GetBucketInventoryConfigurationInput{}
  1805. }
  1806. output = &GetBucketInventoryConfigurationOutput{}
  1807. req = c.newRequest(op, input, output)
  1808. return
  1809. }
  1810. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1811. //
  1812. // Returns an inventory configuration (identified by the inventory ID) from
  1813. // the bucket.
  1814. //
  1815. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1816. // with awserr.Error's Code and Message methods to get detailed information about
  1817. // the error.
  1818. //
  1819. // See the AWS API reference guide for Amazon Simple Storage Service's
  1820. // API operation GetBucketInventoryConfiguration for usage and error information.
  1821. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1822. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1823. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1824. return out, req.Send()
  1825. }
  1826. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1827. // the ability to pass a context and additional request options.
  1828. //
  1829. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1830. //
  1831. // The context must be non-nil and will be used for request cancellation. If
  1832. // the context is nil a panic will occur. In the future the SDK may create
  1833. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1834. // for more information on using Contexts.
  1835. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1836. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1837. req.SetContext(ctx)
  1838. req.ApplyOptions(opts...)
  1839. return out, req.Send()
  1840. }
  1841. const opGetBucketLifecycle = "GetBucketLifecycle"
  1842. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1843. // client's request for the GetBucketLifecycle operation. The "output" return
  1844. // value will be populated with the request's response once the request completes
  1845. // successfully.
  1846. //
  1847. // Use "Send" method on the returned Request to send the API call to the service.
  1848. // the "output" return value is not valid until after Send returns without error.
  1849. //
  1850. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  1851. // API call, and error handling.
  1852. //
  1853. // This method is useful when you want to inject custom logic or configuration
  1854. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1855. //
  1856. //
  1857. // // Example sending a request using the GetBucketLifecycleRequest method.
  1858. // req, resp := client.GetBucketLifecycleRequest(params)
  1859. //
  1860. // err := req.Send()
  1861. // if err == nil { // resp is now filled
  1862. // fmt.Println(resp)
  1863. // }
  1864. //
  1865. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1866. //
  1867. // Deprecated: GetBucketLifecycle has been deprecated
  1868. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1869. if c.Client.Config.Logger != nil {
  1870. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1871. }
  1872. op := &request.Operation{
  1873. Name: opGetBucketLifecycle,
  1874. HTTPMethod: "GET",
  1875. HTTPPath: "/{Bucket}?lifecycle",
  1876. }
  1877. if input == nil {
  1878. input = &GetBucketLifecycleInput{}
  1879. }
  1880. output = &GetBucketLifecycleOutput{}
  1881. req = c.newRequest(op, input, output)
  1882. return
  1883. }
  1884. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1885. //
  1886. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1887. //
  1888. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1889. // with awserr.Error's Code and Message methods to get detailed information about
  1890. // the error.
  1891. //
  1892. // See the AWS API reference guide for Amazon Simple Storage Service's
  1893. // API operation GetBucketLifecycle for usage and error information.
  1894. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1895. //
  1896. // Deprecated: GetBucketLifecycle has been deprecated
  1897. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1898. req, out := c.GetBucketLifecycleRequest(input)
  1899. return out, req.Send()
  1900. }
  1901. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1902. // the ability to pass a context and additional request options.
  1903. //
  1904. // See GetBucketLifecycle for details on how to use this API operation.
  1905. //
  1906. // The context must be non-nil and will be used for request cancellation. If
  1907. // the context is nil a panic will occur. In the future the SDK may create
  1908. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1909. // for more information on using Contexts.
  1910. //
  1911. // Deprecated: GetBucketLifecycleWithContext has been deprecated
  1912. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1913. req, out := c.GetBucketLifecycleRequest(input)
  1914. req.SetContext(ctx)
  1915. req.ApplyOptions(opts...)
  1916. return out, req.Send()
  1917. }
  1918. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1919. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1920. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1921. // value will be populated with the request's response once the request completes
  1922. // successfully.
  1923. //
  1924. // Use "Send" method on the returned Request to send the API call to the service.
  1925. // the "output" return value is not valid until after Send returns without error.
  1926. //
  1927. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  1928. // API call, and error handling.
  1929. //
  1930. // This method is useful when you want to inject custom logic or configuration
  1931. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1932. //
  1933. //
  1934. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1935. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1936. //
  1937. // err := req.Send()
  1938. // if err == nil { // resp is now filled
  1939. // fmt.Println(resp)
  1940. // }
  1941. //
  1942. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1943. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1944. op := &request.Operation{
  1945. Name: opGetBucketLifecycleConfiguration,
  1946. HTTPMethod: "GET",
  1947. HTTPPath: "/{Bucket}?lifecycle",
  1948. }
  1949. if input == nil {
  1950. input = &GetBucketLifecycleConfigurationInput{}
  1951. }
  1952. output = &GetBucketLifecycleConfigurationOutput{}
  1953. req = c.newRequest(op, input, output)
  1954. return
  1955. }
  1956. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1957. //
  1958. // Returns the lifecycle configuration information set on the bucket.
  1959. //
  1960. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1961. // with awserr.Error's Code and Message methods to get detailed information about
  1962. // the error.
  1963. //
  1964. // See the AWS API reference guide for Amazon Simple Storage Service's
  1965. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1966. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1967. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1968. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1969. return out, req.Send()
  1970. }
  1971. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1972. // the ability to pass a context and additional request options.
  1973. //
  1974. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1975. //
  1976. // The context must be non-nil and will be used for request cancellation. If
  1977. // the context is nil a panic will occur. In the future the SDK may create
  1978. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1979. // for more information on using Contexts.
  1980. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1981. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1982. req.SetContext(ctx)
  1983. req.ApplyOptions(opts...)
  1984. return out, req.Send()
  1985. }
  1986. const opGetBucketLocation = "GetBucketLocation"
  1987. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1988. // client's request for the GetBucketLocation operation. The "output" return
  1989. // value will be populated with the request's response once the request completes
  1990. // successfully.
  1991. //
  1992. // Use "Send" method on the returned Request to send the API call to the service.
  1993. // the "output" return value is not valid until after Send returns without error.
  1994. //
  1995. // See GetBucketLocation for more information on using the GetBucketLocation
  1996. // API call, and error handling.
  1997. //
  1998. // This method is useful when you want to inject custom logic or configuration
  1999. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2000. //
  2001. //
  2002. // // Example sending a request using the GetBucketLocationRequest method.
  2003. // req, resp := client.GetBucketLocationRequest(params)
  2004. //
  2005. // err := req.Send()
  2006. // if err == nil { // resp is now filled
  2007. // fmt.Println(resp)
  2008. // }
  2009. //
  2010. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  2011. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  2012. op := &request.Operation{
  2013. Name: opGetBucketLocation,
  2014. HTTPMethod: "GET",
  2015. HTTPPath: "/{Bucket}?location",
  2016. }
  2017. if input == nil {
  2018. input = &GetBucketLocationInput{}
  2019. }
  2020. output = &GetBucketLocationOutput{}
  2021. req = c.newRequest(op, input, output)
  2022. return
  2023. }
  2024. // GetBucketLocation API operation for Amazon Simple Storage Service.
  2025. //
  2026. // Returns the region the bucket resides in.
  2027. //
  2028. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2029. // with awserr.Error's Code and Message methods to get detailed information about
  2030. // the error.
  2031. //
  2032. // See the AWS API reference guide for Amazon Simple Storage Service's
  2033. // API operation GetBucketLocation for usage and error information.
  2034. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  2035. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  2036. req, out := c.GetBucketLocationRequest(input)
  2037. return out, req.Send()
  2038. }
  2039. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  2040. // the ability to pass a context and additional request options.
  2041. //
  2042. // See GetBucketLocation for details on how to use this API operation.
  2043. //
  2044. // The context must be non-nil and will be used for request cancellation. If
  2045. // the context is nil a panic will occur. In the future the SDK may create
  2046. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2047. // for more information on using Contexts.
  2048. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  2049. req, out := c.GetBucketLocationRequest(input)
  2050. req.SetContext(ctx)
  2051. req.ApplyOptions(opts...)
  2052. return out, req.Send()
  2053. }
  2054. const opGetBucketLogging = "GetBucketLogging"
  2055. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  2056. // client's request for the GetBucketLogging operation. The "output" return
  2057. // value will be populated with the request's response once the request completes
  2058. // successfully.
  2059. //
  2060. // Use "Send" method on the returned Request to send the API call to the service.
  2061. // the "output" return value is not valid until after Send returns without error.
  2062. //
  2063. // See GetBucketLogging for more information on using the GetBucketLogging
  2064. // API call, and error handling.
  2065. //
  2066. // This method is useful when you want to inject custom logic or configuration
  2067. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2068. //
  2069. //
  2070. // // Example sending a request using the GetBucketLoggingRequest method.
  2071. // req, resp := client.GetBucketLoggingRequest(params)
  2072. //
  2073. // err := req.Send()
  2074. // if err == nil { // resp is now filled
  2075. // fmt.Println(resp)
  2076. // }
  2077. //
  2078. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2079. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  2080. op := &request.Operation{
  2081. Name: opGetBucketLogging,
  2082. HTTPMethod: "GET",
  2083. HTTPPath: "/{Bucket}?logging",
  2084. }
  2085. if input == nil {
  2086. input = &GetBucketLoggingInput{}
  2087. }
  2088. output = &GetBucketLoggingOutput{}
  2089. req = c.newRequest(op, input, output)
  2090. return
  2091. }
  2092. // GetBucketLogging API operation for Amazon Simple Storage Service.
  2093. //
  2094. // Returns the logging status of a bucket and the permissions users have to
  2095. // view and modify that status. To use GET, you must be the bucket owner.
  2096. //
  2097. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2098. // with awserr.Error's Code and Message methods to get detailed information about
  2099. // the error.
  2100. //
  2101. // See the AWS API reference guide for Amazon Simple Storage Service's
  2102. // API operation GetBucketLogging for usage and error information.
  2103. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2104. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  2105. req, out := c.GetBucketLoggingRequest(input)
  2106. return out, req.Send()
  2107. }
  2108. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  2109. // the ability to pass a context and additional request options.
  2110. //
  2111. // See GetBucketLogging for details on how to use this API operation.
  2112. //
  2113. // The context must be non-nil and will be used for request cancellation. If
  2114. // the context is nil a panic will occur. In the future the SDK may create
  2115. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2116. // for more information on using Contexts.
  2117. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  2118. req, out := c.GetBucketLoggingRequest(input)
  2119. req.SetContext(ctx)
  2120. req.ApplyOptions(opts...)
  2121. return out, req.Send()
  2122. }
  2123. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  2124. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  2125. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  2126. // value will be populated with the request's response once the request completes
  2127. // successfully.
  2128. //
  2129. // Use "Send" method on the returned Request to send the API call to the service.
  2130. // the "output" return value is not valid until after Send returns without error.
  2131. //
  2132. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  2133. // API call, and error handling.
  2134. //
  2135. // This method is useful when you want to inject custom logic or configuration
  2136. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2137. //
  2138. //
  2139. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  2140. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  2141. //
  2142. // err := req.Send()
  2143. // if err == nil { // resp is now filled
  2144. // fmt.Println(resp)
  2145. // }
  2146. //
  2147. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2148. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  2149. op := &request.Operation{
  2150. Name: opGetBucketMetricsConfiguration,
  2151. HTTPMethod: "GET",
  2152. HTTPPath: "/{Bucket}?metrics",
  2153. }
  2154. if input == nil {
  2155. input = &GetBucketMetricsConfigurationInput{}
  2156. }
  2157. output = &GetBucketMetricsConfigurationOutput{}
  2158. req = c.newRequest(op, input, output)
  2159. return
  2160. }
  2161. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  2162. //
  2163. // Gets a metrics configuration (specified by the metrics configuration ID)
  2164. // from the bucket.
  2165. //
  2166. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2167. // with awserr.Error's Code and Message methods to get detailed information about
  2168. // the error.
  2169. //
  2170. // See the AWS API reference guide for Amazon Simple Storage Service's
  2171. // API operation GetBucketMetricsConfiguration for usage and error information.
  2172. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2173. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  2174. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2175. return out, req.Send()
  2176. }
  2177. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  2178. // the ability to pass a context and additional request options.
  2179. //
  2180. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  2181. //
  2182. // The context must be non-nil and will be used for request cancellation. If
  2183. // the context is nil a panic will occur. In the future the SDK may create
  2184. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2185. // for more information on using Contexts.
  2186. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2187. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2188. req.SetContext(ctx)
  2189. req.ApplyOptions(opts...)
  2190. return out, req.Send()
  2191. }
  2192. const opGetBucketNotification = "GetBucketNotification"
  2193. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2194. // client's request for the GetBucketNotification operation. The "output" return
  2195. // value will be populated with the request's response once the request completes
  2196. // successfully.
  2197. //
  2198. // Use "Send" method on the returned Request to send the API call to the service.
  2199. // the "output" return value is not valid until after Send returns without error.
  2200. //
  2201. // See GetBucketNotification for more information on using the GetBucketNotification
  2202. // API call, and error handling.
  2203. //
  2204. // This method is useful when you want to inject custom logic or configuration
  2205. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2206. //
  2207. //
  2208. // // Example sending a request using the GetBucketNotificationRequest method.
  2209. // req, resp := client.GetBucketNotificationRequest(params)
  2210. //
  2211. // err := req.Send()
  2212. // if err == nil { // resp is now filled
  2213. // fmt.Println(resp)
  2214. // }
  2215. //
  2216. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2217. //
  2218. // Deprecated: GetBucketNotification has been deprecated
  2219. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2220. if c.Client.Config.Logger != nil {
  2221. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2222. }
  2223. op := &request.Operation{
  2224. Name: opGetBucketNotification,
  2225. HTTPMethod: "GET",
  2226. HTTPPath: "/{Bucket}?notification",
  2227. }
  2228. if input == nil {
  2229. input = &GetBucketNotificationConfigurationRequest{}
  2230. }
  2231. output = &NotificationConfigurationDeprecated{}
  2232. req = c.newRequest(op, input, output)
  2233. return
  2234. }
  2235. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2236. //
  2237. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2238. //
  2239. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2240. // with awserr.Error's Code and Message methods to get detailed information about
  2241. // the error.
  2242. //
  2243. // See the AWS API reference guide for Amazon Simple Storage Service's
  2244. // API operation GetBucketNotification for usage and error information.
  2245. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2246. //
  2247. // Deprecated: GetBucketNotification has been deprecated
  2248. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2249. req, out := c.GetBucketNotificationRequest(input)
  2250. return out, req.Send()
  2251. }
  2252. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2253. // the ability to pass a context and additional request options.
  2254. //
  2255. // See GetBucketNotification for details on how to use this API operation.
  2256. //
  2257. // The context must be non-nil and will be used for request cancellation. If
  2258. // the context is nil a panic will occur. In the future the SDK may create
  2259. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2260. // for more information on using Contexts.
  2261. //
  2262. // Deprecated: GetBucketNotificationWithContext has been deprecated
  2263. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2264. req, out := c.GetBucketNotificationRequest(input)
  2265. req.SetContext(ctx)
  2266. req.ApplyOptions(opts...)
  2267. return out, req.Send()
  2268. }
  2269. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2270. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2271. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2272. // value will be populated with the request's response once the request completes
  2273. // successfully.
  2274. //
  2275. // Use "Send" method on the returned Request to send the API call to the service.
  2276. // the "output" return value is not valid until after Send returns without error.
  2277. //
  2278. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  2279. // API call, and error handling.
  2280. //
  2281. // This method is useful when you want to inject custom logic or configuration
  2282. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2283. //
  2284. //
  2285. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2286. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2287. //
  2288. // err := req.Send()
  2289. // if err == nil { // resp is now filled
  2290. // fmt.Println(resp)
  2291. // }
  2292. //
  2293. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2294. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2295. op := &request.Operation{
  2296. Name: opGetBucketNotificationConfiguration,
  2297. HTTPMethod: "GET",
  2298. HTTPPath: "/{Bucket}?notification",
  2299. }
  2300. if input == nil {
  2301. input = &GetBucketNotificationConfigurationRequest{}
  2302. }
  2303. output = &NotificationConfiguration{}
  2304. req = c.newRequest(op, input, output)
  2305. return
  2306. }
  2307. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2308. //
  2309. // Returns the notification configuration of a bucket.
  2310. //
  2311. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2312. // with awserr.Error's Code and Message methods to get detailed information about
  2313. // the error.
  2314. //
  2315. // See the AWS API reference guide for Amazon Simple Storage Service's
  2316. // API operation GetBucketNotificationConfiguration for usage and error information.
  2317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2318. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2319. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2320. return out, req.Send()
  2321. }
  2322. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2323. // the ability to pass a context and additional request options.
  2324. //
  2325. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2326. //
  2327. // The context must be non-nil and will be used for request cancellation. If
  2328. // the context is nil a panic will occur. In the future the SDK may create
  2329. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2330. // for more information on using Contexts.
  2331. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2332. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2333. req.SetContext(ctx)
  2334. req.ApplyOptions(opts...)
  2335. return out, req.Send()
  2336. }
  2337. const opGetBucketPolicy = "GetBucketPolicy"
  2338. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2339. // client's request for the GetBucketPolicy operation. The "output" return
  2340. // value will be populated with the request's response once the request completes
  2341. // successfully.
  2342. //
  2343. // Use "Send" method on the returned Request to send the API call to the service.
  2344. // the "output" return value is not valid until after Send returns without error.
  2345. //
  2346. // See GetBucketPolicy for more information on using the GetBucketPolicy
  2347. // API call, and error handling.
  2348. //
  2349. // This method is useful when you want to inject custom logic or configuration
  2350. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2351. //
  2352. //
  2353. // // Example sending a request using the GetBucketPolicyRequest method.
  2354. // req, resp := client.GetBucketPolicyRequest(params)
  2355. //
  2356. // err := req.Send()
  2357. // if err == nil { // resp is now filled
  2358. // fmt.Println(resp)
  2359. // }
  2360. //
  2361. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2362. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2363. op := &request.Operation{
  2364. Name: opGetBucketPolicy,
  2365. HTTPMethod: "GET",
  2366. HTTPPath: "/{Bucket}?policy",
  2367. }
  2368. if input == nil {
  2369. input = &GetBucketPolicyInput{}
  2370. }
  2371. output = &GetBucketPolicyOutput{}
  2372. req = c.newRequest(op, input, output)
  2373. return
  2374. }
  2375. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2376. //
  2377. // Returns the policy of a specified bucket.
  2378. //
  2379. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2380. // with awserr.Error's Code and Message methods to get detailed information about
  2381. // the error.
  2382. //
  2383. // See the AWS API reference guide for Amazon Simple Storage Service's
  2384. // API operation GetBucketPolicy for usage and error information.
  2385. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2386. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2387. req, out := c.GetBucketPolicyRequest(input)
  2388. return out, req.Send()
  2389. }
  2390. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2391. // the ability to pass a context and additional request options.
  2392. //
  2393. // See GetBucketPolicy for details on how to use this API operation.
  2394. //
  2395. // The context must be non-nil and will be used for request cancellation. If
  2396. // the context is nil a panic will occur. In the future the SDK may create
  2397. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2398. // for more information on using Contexts.
  2399. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2400. req, out := c.GetBucketPolicyRequest(input)
  2401. req.SetContext(ctx)
  2402. req.ApplyOptions(opts...)
  2403. return out, req.Send()
  2404. }
  2405. const opGetBucketPolicyStatus = "GetBucketPolicyStatus"
  2406. // GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the
  2407. // client's request for the GetBucketPolicyStatus operation. The "output" return
  2408. // value will be populated with the request's response once the request completes
  2409. // successfully.
  2410. //
  2411. // Use "Send" method on the returned Request to send the API call to the service.
  2412. // the "output" return value is not valid until after Send returns without error.
  2413. //
  2414. // See GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus
  2415. // API call, and error handling.
  2416. //
  2417. // This method is useful when you want to inject custom logic or configuration
  2418. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2419. //
  2420. //
  2421. // // Example sending a request using the GetBucketPolicyStatusRequest method.
  2422. // req, resp := client.GetBucketPolicyStatusRequest(params)
  2423. //
  2424. // err := req.Send()
  2425. // if err == nil { // resp is now filled
  2426. // fmt.Println(resp)
  2427. // }
  2428. //
  2429. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  2430. func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) {
  2431. op := &request.Operation{
  2432. Name: opGetBucketPolicyStatus,
  2433. HTTPMethod: "GET",
  2434. HTTPPath: "/{Bucket}?policyStatus",
  2435. }
  2436. if input == nil {
  2437. input = &GetBucketPolicyStatusInput{}
  2438. }
  2439. output = &GetBucketPolicyStatusOutput{}
  2440. req = c.newRequest(op, input, output)
  2441. return
  2442. }
  2443. // GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
  2444. //
  2445. // Retrieves the policy status for an Amazon S3 bucket, indicating whether the
  2446. // bucket is public.
  2447. //
  2448. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2449. // with awserr.Error's Code and Message methods to get detailed information about
  2450. // the error.
  2451. //
  2452. // See the AWS API reference guide for Amazon Simple Storage Service's
  2453. // API operation GetBucketPolicyStatus for usage and error information.
  2454. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
  2455. func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) {
  2456. req, out := c.GetBucketPolicyStatusRequest(input)
  2457. return out, req.Send()
  2458. }
  2459. // GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of
  2460. // the ability to pass a context and additional request options.
  2461. //
  2462. // See GetBucketPolicyStatus for details on how to use this API operation.
  2463. //
  2464. // The context must be non-nil and will be used for request cancellation. If
  2465. // the context is nil a panic will occur. In the future the SDK may create
  2466. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2467. // for more information on using Contexts.
  2468. func (c *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) {
  2469. req, out := c.GetBucketPolicyStatusRequest(input)
  2470. req.SetContext(ctx)
  2471. req.ApplyOptions(opts...)
  2472. return out, req.Send()
  2473. }
  2474. const opGetBucketReplication = "GetBucketReplication"
  2475. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2476. // client's request for the GetBucketReplication operation. The "output" return
  2477. // value will be populated with the request's response once the request completes
  2478. // successfully.
  2479. //
  2480. // Use "Send" method on the returned Request to send the API call to the service.
  2481. // the "output" return value is not valid until after Send returns without error.
  2482. //
  2483. // See GetBucketReplication for more information on using the GetBucketReplication
  2484. // API call, and error handling.
  2485. //
  2486. // This method is useful when you want to inject custom logic or configuration
  2487. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2488. //
  2489. //
  2490. // // Example sending a request using the GetBucketReplicationRequest method.
  2491. // req, resp := client.GetBucketReplicationRequest(params)
  2492. //
  2493. // err := req.Send()
  2494. // if err == nil { // resp is now filled
  2495. // fmt.Println(resp)
  2496. // }
  2497. //
  2498. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2499. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2500. op := &request.Operation{
  2501. Name: opGetBucketReplication,
  2502. HTTPMethod: "GET",
  2503. HTTPPath: "/{Bucket}?replication",
  2504. }
  2505. if input == nil {
  2506. input = &GetBucketReplicationInput{}
  2507. }
  2508. output = &GetBucketReplicationOutput{}
  2509. req = c.newRequest(op, input, output)
  2510. return
  2511. }
  2512. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2513. //
  2514. // Returns the replication configuration of a bucket.
  2515. //
  2516. // It can take a while to propagate the put or delete a replication configuration
  2517. // to all Amazon S3 systems. Therefore, a get request soon after put or delete
  2518. // can return a wrong result.
  2519. //
  2520. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2521. // with awserr.Error's Code and Message methods to get detailed information about
  2522. // the error.
  2523. //
  2524. // See the AWS API reference guide for Amazon Simple Storage Service's
  2525. // API operation GetBucketReplication for usage and error information.
  2526. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2527. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2528. req, out := c.GetBucketReplicationRequest(input)
  2529. return out, req.Send()
  2530. }
  2531. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2532. // the ability to pass a context and additional request options.
  2533. //
  2534. // See GetBucketReplication for details on how to use this API operation.
  2535. //
  2536. // The context must be non-nil and will be used for request cancellation. If
  2537. // the context is nil a panic will occur. In the future the SDK may create
  2538. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2539. // for more information on using Contexts.
  2540. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2541. req, out := c.GetBucketReplicationRequest(input)
  2542. req.SetContext(ctx)
  2543. req.ApplyOptions(opts...)
  2544. return out, req.Send()
  2545. }
  2546. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2547. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2548. // client's request for the GetBucketRequestPayment operation. The "output" return
  2549. // value will be populated with the request's response once the request completes
  2550. // successfully.
  2551. //
  2552. // Use "Send" method on the returned Request to send the API call to the service.
  2553. // the "output" return value is not valid until after Send returns without error.
  2554. //
  2555. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  2556. // API call, and error handling.
  2557. //
  2558. // This method is useful when you want to inject custom logic or configuration
  2559. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2560. //
  2561. //
  2562. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2563. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2564. //
  2565. // err := req.Send()
  2566. // if err == nil { // resp is now filled
  2567. // fmt.Println(resp)
  2568. // }
  2569. //
  2570. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2571. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2572. op := &request.Operation{
  2573. Name: opGetBucketRequestPayment,
  2574. HTTPMethod: "GET",
  2575. HTTPPath: "/{Bucket}?requestPayment",
  2576. }
  2577. if input == nil {
  2578. input = &GetBucketRequestPaymentInput{}
  2579. }
  2580. output = &GetBucketRequestPaymentOutput{}
  2581. req = c.newRequest(op, input, output)
  2582. return
  2583. }
  2584. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2585. //
  2586. // Returns the request payment configuration of a bucket.
  2587. //
  2588. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2589. // with awserr.Error's Code and Message methods to get detailed information about
  2590. // the error.
  2591. //
  2592. // See the AWS API reference guide for Amazon Simple Storage Service's
  2593. // API operation GetBucketRequestPayment for usage and error information.
  2594. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2595. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2596. req, out := c.GetBucketRequestPaymentRequest(input)
  2597. return out, req.Send()
  2598. }
  2599. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2600. // the ability to pass a context and additional request options.
  2601. //
  2602. // See GetBucketRequestPayment for details on how to use this API operation.
  2603. //
  2604. // The context must be non-nil and will be used for request cancellation. If
  2605. // the context is nil a panic will occur. In the future the SDK may create
  2606. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2607. // for more information on using Contexts.
  2608. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2609. req, out := c.GetBucketRequestPaymentRequest(input)
  2610. req.SetContext(ctx)
  2611. req.ApplyOptions(opts...)
  2612. return out, req.Send()
  2613. }
  2614. const opGetBucketTagging = "GetBucketTagging"
  2615. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2616. // client's request for the GetBucketTagging operation. The "output" return
  2617. // value will be populated with the request's response once the request completes
  2618. // successfully.
  2619. //
  2620. // Use "Send" method on the returned Request to send the API call to the service.
  2621. // the "output" return value is not valid until after Send returns without error.
  2622. //
  2623. // See GetBucketTagging for more information on using the GetBucketTagging
  2624. // API call, and error handling.
  2625. //
  2626. // This method is useful when you want to inject custom logic or configuration
  2627. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2628. //
  2629. //
  2630. // // Example sending a request using the GetBucketTaggingRequest method.
  2631. // req, resp := client.GetBucketTaggingRequest(params)
  2632. //
  2633. // err := req.Send()
  2634. // if err == nil { // resp is now filled
  2635. // fmt.Println(resp)
  2636. // }
  2637. //
  2638. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2639. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2640. op := &request.Operation{
  2641. Name: opGetBucketTagging,
  2642. HTTPMethod: "GET",
  2643. HTTPPath: "/{Bucket}?tagging",
  2644. }
  2645. if input == nil {
  2646. input = &GetBucketTaggingInput{}
  2647. }
  2648. output = &GetBucketTaggingOutput{}
  2649. req = c.newRequest(op, input, output)
  2650. return
  2651. }
  2652. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2653. //
  2654. // Returns the tag set associated with the bucket.
  2655. //
  2656. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2657. // with awserr.Error's Code and Message methods to get detailed information about
  2658. // the error.
  2659. //
  2660. // See the AWS API reference guide for Amazon Simple Storage Service's
  2661. // API operation GetBucketTagging for usage and error information.
  2662. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2663. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2664. req, out := c.GetBucketTaggingRequest(input)
  2665. return out, req.Send()
  2666. }
  2667. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2668. // the ability to pass a context and additional request options.
  2669. //
  2670. // See GetBucketTagging for details on how to use this API operation.
  2671. //
  2672. // The context must be non-nil and will be used for request cancellation. If
  2673. // the context is nil a panic will occur. In the future the SDK may create
  2674. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2675. // for more information on using Contexts.
  2676. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2677. req, out := c.GetBucketTaggingRequest(input)
  2678. req.SetContext(ctx)
  2679. req.ApplyOptions(opts...)
  2680. return out, req.Send()
  2681. }
  2682. const opGetBucketVersioning = "GetBucketVersioning"
  2683. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2684. // client's request for the GetBucketVersioning operation. The "output" return
  2685. // value will be populated with the request's response once the request completes
  2686. // successfully.
  2687. //
  2688. // Use "Send" method on the returned Request to send the API call to the service.
  2689. // the "output" return value is not valid until after Send returns without error.
  2690. //
  2691. // See GetBucketVersioning for more information on using the GetBucketVersioning
  2692. // API call, and error handling.
  2693. //
  2694. // This method is useful when you want to inject custom logic or configuration
  2695. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2696. //
  2697. //
  2698. // // Example sending a request using the GetBucketVersioningRequest method.
  2699. // req, resp := client.GetBucketVersioningRequest(params)
  2700. //
  2701. // err := req.Send()
  2702. // if err == nil { // resp is now filled
  2703. // fmt.Println(resp)
  2704. // }
  2705. //
  2706. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2707. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2708. op := &request.Operation{
  2709. Name: opGetBucketVersioning,
  2710. HTTPMethod: "GET",
  2711. HTTPPath: "/{Bucket}?versioning",
  2712. }
  2713. if input == nil {
  2714. input = &GetBucketVersioningInput{}
  2715. }
  2716. output = &GetBucketVersioningOutput{}
  2717. req = c.newRequest(op, input, output)
  2718. return
  2719. }
  2720. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2721. //
  2722. // Returns the versioning state of a bucket.
  2723. //
  2724. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2725. // with awserr.Error's Code and Message methods to get detailed information about
  2726. // the error.
  2727. //
  2728. // See the AWS API reference guide for Amazon Simple Storage Service's
  2729. // API operation GetBucketVersioning for usage and error information.
  2730. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2731. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2732. req, out := c.GetBucketVersioningRequest(input)
  2733. return out, req.Send()
  2734. }
  2735. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2736. // the ability to pass a context and additional request options.
  2737. //
  2738. // See GetBucketVersioning for details on how to use this API operation.
  2739. //
  2740. // The context must be non-nil and will be used for request cancellation. If
  2741. // the context is nil a panic will occur. In the future the SDK may create
  2742. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2743. // for more information on using Contexts.
  2744. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2745. req, out := c.GetBucketVersioningRequest(input)
  2746. req.SetContext(ctx)
  2747. req.ApplyOptions(opts...)
  2748. return out, req.Send()
  2749. }
  2750. const opGetBucketWebsite = "GetBucketWebsite"
  2751. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2752. // client's request for the GetBucketWebsite operation. The "output" return
  2753. // value will be populated with the request's response once the request completes
  2754. // successfully.
  2755. //
  2756. // Use "Send" method on the returned Request to send the API call to the service.
  2757. // the "output" return value is not valid until after Send returns without error.
  2758. //
  2759. // See GetBucketWebsite for more information on using the GetBucketWebsite
  2760. // API call, and error handling.
  2761. //
  2762. // This method is useful when you want to inject custom logic or configuration
  2763. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2764. //
  2765. //
  2766. // // Example sending a request using the GetBucketWebsiteRequest method.
  2767. // req, resp := client.GetBucketWebsiteRequest(params)
  2768. //
  2769. // err := req.Send()
  2770. // if err == nil { // resp is now filled
  2771. // fmt.Println(resp)
  2772. // }
  2773. //
  2774. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2775. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2776. op := &request.Operation{
  2777. Name: opGetBucketWebsite,
  2778. HTTPMethod: "GET",
  2779. HTTPPath: "/{Bucket}?website",
  2780. }
  2781. if input == nil {
  2782. input = &GetBucketWebsiteInput{}
  2783. }
  2784. output = &GetBucketWebsiteOutput{}
  2785. req = c.newRequest(op, input, output)
  2786. return
  2787. }
  2788. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2789. //
  2790. // Returns the website configuration for a bucket.
  2791. //
  2792. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2793. // with awserr.Error's Code and Message methods to get detailed information about
  2794. // the error.
  2795. //
  2796. // See the AWS API reference guide for Amazon Simple Storage Service's
  2797. // API operation GetBucketWebsite for usage and error information.
  2798. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2799. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2800. req, out := c.GetBucketWebsiteRequest(input)
  2801. return out, req.Send()
  2802. }
  2803. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2804. // the ability to pass a context and additional request options.
  2805. //
  2806. // See GetBucketWebsite for details on how to use this API operation.
  2807. //
  2808. // The context must be non-nil and will be used for request cancellation. If
  2809. // the context is nil a panic will occur. In the future the SDK may create
  2810. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2811. // for more information on using Contexts.
  2812. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2813. req, out := c.GetBucketWebsiteRequest(input)
  2814. req.SetContext(ctx)
  2815. req.ApplyOptions(opts...)
  2816. return out, req.Send()
  2817. }
  2818. const opGetObject = "GetObject"
  2819. // GetObjectRequest generates a "aws/request.Request" representing the
  2820. // client's request for the GetObject operation. The "output" return
  2821. // value will be populated with the request's response once the request completes
  2822. // successfully.
  2823. //
  2824. // Use "Send" method on the returned Request to send the API call to the service.
  2825. // the "output" return value is not valid until after Send returns without error.
  2826. //
  2827. // See GetObject for more information on using the GetObject
  2828. // API call, and error handling.
  2829. //
  2830. // This method is useful when you want to inject custom logic or configuration
  2831. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2832. //
  2833. //
  2834. // // Example sending a request using the GetObjectRequest method.
  2835. // req, resp := client.GetObjectRequest(params)
  2836. //
  2837. // err := req.Send()
  2838. // if err == nil { // resp is now filled
  2839. // fmt.Println(resp)
  2840. // }
  2841. //
  2842. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2843. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2844. op := &request.Operation{
  2845. Name: opGetObject,
  2846. HTTPMethod: "GET",
  2847. HTTPPath: "/{Bucket}/{Key+}",
  2848. }
  2849. if input == nil {
  2850. input = &GetObjectInput{}
  2851. }
  2852. output = &GetObjectOutput{}
  2853. req = c.newRequest(op, input, output)
  2854. return
  2855. }
  2856. // GetObject API operation for Amazon Simple Storage Service.
  2857. //
  2858. // Retrieves objects from Amazon S3.
  2859. //
  2860. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2861. // with awserr.Error's Code and Message methods to get detailed information about
  2862. // the error.
  2863. //
  2864. // See the AWS API reference guide for Amazon Simple Storage Service's
  2865. // API operation GetObject for usage and error information.
  2866. //
  2867. // Returned Error Codes:
  2868. // * ErrCodeNoSuchKey "NoSuchKey"
  2869. // The specified key does not exist.
  2870. //
  2871. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2872. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2873. req, out := c.GetObjectRequest(input)
  2874. return out, req.Send()
  2875. }
  2876. // GetObjectWithContext is the same as GetObject with the addition of
  2877. // the ability to pass a context and additional request options.
  2878. //
  2879. // See GetObject for details on how to use this API operation.
  2880. //
  2881. // The context must be non-nil and will be used for request cancellation. If
  2882. // the context is nil a panic will occur. In the future the SDK may create
  2883. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2884. // for more information on using Contexts.
  2885. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2886. req, out := c.GetObjectRequest(input)
  2887. req.SetContext(ctx)
  2888. req.ApplyOptions(opts...)
  2889. return out, req.Send()
  2890. }
  2891. const opGetObjectAcl = "GetObjectAcl"
  2892. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2893. // client's request for the GetObjectAcl operation. The "output" return
  2894. // value will be populated with the request's response once the request completes
  2895. // successfully.
  2896. //
  2897. // Use "Send" method on the returned Request to send the API call to the service.
  2898. // the "output" return value is not valid until after Send returns without error.
  2899. //
  2900. // See GetObjectAcl for more information on using the GetObjectAcl
  2901. // API call, and error handling.
  2902. //
  2903. // This method is useful when you want to inject custom logic or configuration
  2904. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2905. //
  2906. //
  2907. // // Example sending a request using the GetObjectAclRequest method.
  2908. // req, resp := client.GetObjectAclRequest(params)
  2909. //
  2910. // err := req.Send()
  2911. // if err == nil { // resp is now filled
  2912. // fmt.Println(resp)
  2913. // }
  2914. //
  2915. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2916. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2917. op := &request.Operation{
  2918. Name: opGetObjectAcl,
  2919. HTTPMethod: "GET",
  2920. HTTPPath: "/{Bucket}/{Key+}?acl",
  2921. }
  2922. if input == nil {
  2923. input = &GetObjectAclInput{}
  2924. }
  2925. output = &GetObjectAclOutput{}
  2926. req = c.newRequest(op, input, output)
  2927. return
  2928. }
  2929. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2930. //
  2931. // Returns the access control list (ACL) of an object.
  2932. //
  2933. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2934. // with awserr.Error's Code and Message methods to get detailed information about
  2935. // the error.
  2936. //
  2937. // See the AWS API reference guide for Amazon Simple Storage Service's
  2938. // API operation GetObjectAcl for usage and error information.
  2939. //
  2940. // Returned Error Codes:
  2941. // * ErrCodeNoSuchKey "NoSuchKey"
  2942. // The specified key does not exist.
  2943. //
  2944. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2945. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2946. req, out := c.GetObjectAclRequest(input)
  2947. return out, req.Send()
  2948. }
  2949. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2950. // the ability to pass a context and additional request options.
  2951. //
  2952. // See GetObjectAcl for details on how to use this API operation.
  2953. //
  2954. // The context must be non-nil and will be used for request cancellation. If
  2955. // the context is nil a panic will occur. In the future the SDK may create
  2956. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2957. // for more information on using Contexts.
  2958. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2959. req, out := c.GetObjectAclRequest(input)
  2960. req.SetContext(ctx)
  2961. req.ApplyOptions(opts...)
  2962. return out, req.Send()
  2963. }
  2964. const opGetObjectLegalHold = "GetObjectLegalHold"
  2965. // GetObjectLegalHoldRequest generates a "aws/request.Request" representing the
  2966. // client's request for the GetObjectLegalHold operation. The "output" return
  2967. // value will be populated with the request's response once the request completes
  2968. // successfully.
  2969. //
  2970. // Use "Send" method on the returned Request to send the API call to the service.
  2971. // the "output" return value is not valid until after Send returns without error.
  2972. //
  2973. // See GetObjectLegalHold for more information on using the GetObjectLegalHold
  2974. // API call, and error handling.
  2975. //
  2976. // This method is useful when you want to inject custom logic or configuration
  2977. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2978. //
  2979. //
  2980. // // Example sending a request using the GetObjectLegalHoldRequest method.
  2981. // req, resp := client.GetObjectLegalHoldRequest(params)
  2982. //
  2983. // err := req.Send()
  2984. // if err == nil { // resp is now filled
  2985. // fmt.Println(resp)
  2986. // }
  2987. //
  2988. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  2989. func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) {
  2990. op := &request.Operation{
  2991. Name: opGetObjectLegalHold,
  2992. HTTPMethod: "GET",
  2993. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  2994. }
  2995. if input == nil {
  2996. input = &GetObjectLegalHoldInput{}
  2997. }
  2998. output = &GetObjectLegalHoldOutput{}
  2999. req = c.newRequest(op, input, output)
  3000. return
  3001. }
  3002. // GetObjectLegalHold API operation for Amazon Simple Storage Service.
  3003. //
  3004. // Gets an object's current Legal Hold status.
  3005. //
  3006. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3007. // with awserr.Error's Code and Message methods to get detailed information about
  3008. // the error.
  3009. //
  3010. // See the AWS API reference guide for Amazon Simple Storage Service's
  3011. // API operation GetObjectLegalHold for usage and error information.
  3012. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
  3013. func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) {
  3014. req, out := c.GetObjectLegalHoldRequest(input)
  3015. return out, req.Send()
  3016. }
  3017. // GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of
  3018. // the ability to pass a context and additional request options.
  3019. //
  3020. // See GetObjectLegalHold for details on how to use this API operation.
  3021. //
  3022. // The context must be non-nil and will be used for request cancellation. If
  3023. // the context is nil a panic will occur. In the future the SDK may create
  3024. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3025. // for more information on using Contexts.
  3026. func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) {
  3027. req, out := c.GetObjectLegalHoldRequest(input)
  3028. req.SetContext(ctx)
  3029. req.ApplyOptions(opts...)
  3030. return out, req.Send()
  3031. }
  3032. const opGetObjectLockConfiguration = "GetObjectLockConfiguration"
  3033. // GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  3034. // client's request for the GetObjectLockConfiguration operation. The "output" return
  3035. // value will be populated with the request's response once the request completes
  3036. // successfully.
  3037. //
  3038. // Use "Send" method on the returned Request to send the API call to the service.
  3039. // the "output" return value is not valid until after Send returns without error.
  3040. //
  3041. // See GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration
  3042. // API call, and error handling.
  3043. //
  3044. // This method is useful when you want to inject custom logic or configuration
  3045. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3046. //
  3047. //
  3048. // // Example sending a request using the GetObjectLockConfigurationRequest method.
  3049. // req, resp := client.GetObjectLockConfigurationRequest(params)
  3050. //
  3051. // err := req.Send()
  3052. // if err == nil { // resp is now filled
  3053. // fmt.Println(resp)
  3054. // }
  3055. //
  3056. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  3057. func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) {
  3058. op := &request.Operation{
  3059. Name: opGetObjectLockConfiguration,
  3060. HTTPMethod: "GET",
  3061. HTTPPath: "/{Bucket}?object-lock",
  3062. }
  3063. if input == nil {
  3064. input = &GetObjectLockConfigurationInput{}
  3065. }
  3066. output = &GetObjectLockConfigurationOutput{}
  3067. req = c.newRequest(op, input, output)
  3068. return
  3069. }
  3070. // GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
  3071. //
  3072. // Gets the Object Lock configuration for a bucket. The rule specified in the
  3073. // Object Lock configuration will be applied by default to every new object
  3074. // placed in the specified bucket.
  3075. //
  3076. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3077. // with awserr.Error's Code and Message methods to get detailed information about
  3078. // the error.
  3079. //
  3080. // See the AWS API reference guide for Amazon Simple Storage Service's
  3081. // API operation GetObjectLockConfiguration for usage and error information.
  3082. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
  3083. func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) {
  3084. req, out := c.GetObjectLockConfigurationRequest(input)
  3085. return out, req.Send()
  3086. }
  3087. // GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of
  3088. // the ability to pass a context and additional request options.
  3089. //
  3090. // See GetObjectLockConfiguration for details on how to use this API operation.
  3091. //
  3092. // The context must be non-nil and will be used for request cancellation. If
  3093. // the context is nil a panic will occur. In the future the SDK may create
  3094. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3095. // for more information on using Contexts.
  3096. func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) {
  3097. req, out := c.GetObjectLockConfigurationRequest(input)
  3098. req.SetContext(ctx)
  3099. req.ApplyOptions(opts...)
  3100. return out, req.Send()
  3101. }
  3102. const opGetObjectRetention = "GetObjectRetention"
  3103. // GetObjectRetentionRequest generates a "aws/request.Request" representing the
  3104. // client's request for the GetObjectRetention operation. The "output" return
  3105. // value will be populated with the request's response once the request completes
  3106. // successfully.
  3107. //
  3108. // Use "Send" method on the returned Request to send the API call to the service.
  3109. // the "output" return value is not valid until after Send returns without error.
  3110. //
  3111. // See GetObjectRetention for more information on using the GetObjectRetention
  3112. // API call, and error handling.
  3113. //
  3114. // This method is useful when you want to inject custom logic or configuration
  3115. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3116. //
  3117. //
  3118. // // Example sending a request using the GetObjectRetentionRequest method.
  3119. // req, resp := client.GetObjectRetentionRequest(params)
  3120. //
  3121. // err := req.Send()
  3122. // if err == nil { // resp is now filled
  3123. // fmt.Println(resp)
  3124. // }
  3125. //
  3126. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  3127. func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) {
  3128. op := &request.Operation{
  3129. Name: opGetObjectRetention,
  3130. HTTPMethod: "GET",
  3131. HTTPPath: "/{Bucket}/{Key+}?retention",
  3132. }
  3133. if input == nil {
  3134. input = &GetObjectRetentionInput{}
  3135. }
  3136. output = &GetObjectRetentionOutput{}
  3137. req = c.newRequest(op, input, output)
  3138. return
  3139. }
  3140. // GetObjectRetention API operation for Amazon Simple Storage Service.
  3141. //
  3142. // Retrieves an object's retention settings.
  3143. //
  3144. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3145. // with awserr.Error's Code and Message methods to get detailed information about
  3146. // the error.
  3147. //
  3148. // See the AWS API reference guide for Amazon Simple Storage Service's
  3149. // API operation GetObjectRetention for usage and error information.
  3150. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
  3151. func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) {
  3152. req, out := c.GetObjectRetentionRequest(input)
  3153. return out, req.Send()
  3154. }
  3155. // GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of
  3156. // the ability to pass a context and additional request options.
  3157. //
  3158. // See GetObjectRetention for details on how to use this API operation.
  3159. //
  3160. // The context must be non-nil and will be used for request cancellation. If
  3161. // the context is nil a panic will occur. In the future the SDK may create
  3162. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3163. // for more information on using Contexts.
  3164. func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) {
  3165. req, out := c.GetObjectRetentionRequest(input)
  3166. req.SetContext(ctx)
  3167. req.ApplyOptions(opts...)
  3168. return out, req.Send()
  3169. }
  3170. const opGetObjectTagging = "GetObjectTagging"
  3171. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  3172. // client's request for the GetObjectTagging operation. The "output" return
  3173. // value will be populated with the request's response once the request completes
  3174. // successfully.
  3175. //
  3176. // Use "Send" method on the returned Request to send the API call to the service.
  3177. // the "output" return value is not valid until after Send returns without error.
  3178. //
  3179. // See GetObjectTagging for more information on using the GetObjectTagging
  3180. // API call, and error handling.
  3181. //
  3182. // This method is useful when you want to inject custom logic or configuration
  3183. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3184. //
  3185. //
  3186. // // Example sending a request using the GetObjectTaggingRequest method.
  3187. // req, resp := client.GetObjectTaggingRequest(params)
  3188. //
  3189. // err := req.Send()
  3190. // if err == nil { // resp is now filled
  3191. // fmt.Println(resp)
  3192. // }
  3193. //
  3194. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  3195. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  3196. op := &request.Operation{
  3197. Name: opGetObjectTagging,
  3198. HTTPMethod: "GET",
  3199. HTTPPath: "/{Bucket}/{Key+}?tagging",
  3200. }
  3201. if input == nil {
  3202. input = &GetObjectTaggingInput{}
  3203. }
  3204. output = &GetObjectTaggingOutput{}
  3205. req = c.newRequest(op, input, output)
  3206. return
  3207. }
  3208. // GetObjectTagging API operation for Amazon Simple Storage Service.
  3209. //
  3210. // Returns the tag-set of an object.
  3211. //
  3212. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3213. // with awserr.Error's Code and Message methods to get detailed information about
  3214. // the error.
  3215. //
  3216. // See the AWS API reference guide for Amazon Simple Storage Service's
  3217. // API operation GetObjectTagging for usage and error information.
  3218. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  3219. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  3220. req, out := c.GetObjectTaggingRequest(input)
  3221. return out, req.Send()
  3222. }
  3223. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  3224. // the ability to pass a context and additional request options.
  3225. //
  3226. // See GetObjectTagging for details on how to use this API operation.
  3227. //
  3228. // The context must be non-nil and will be used for request cancellation. If
  3229. // the context is nil a panic will occur. In the future the SDK may create
  3230. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3231. // for more information on using Contexts.
  3232. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  3233. req, out := c.GetObjectTaggingRequest(input)
  3234. req.SetContext(ctx)
  3235. req.ApplyOptions(opts...)
  3236. return out, req.Send()
  3237. }
  3238. const opGetObjectTorrent = "GetObjectTorrent"
  3239. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  3240. // client's request for the GetObjectTorrent operation. The "output" return
  3241. // value will be populated with the request's response once the request completes
  3242. // successfully.
  3243. //
  3244. // Use "Send" method on the returned Request to send the API call to the service.
  3245. // the "output" return value is not valid until after Send returns without error.
  3246. //
  3247. // See GetObjectTorrent for more information on using the GetObjectTorrent
  3248. // API call, and error handling.
  3249. //
  3250. // This method is useful when you want to inject custom logic or configuration
  3251. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3252. //
  3253. //
  3254. // // Example sending a request using the GetObjectTorrentRequest method.
  3255. // req, resp := client.GetObjectTorrentRequest(params)
  3256. //
  3257. // err := req.Send()
  3258. // if err == nil { // resp is now filled
  3259. // fmt.Println(resp)
  3260. // }
  3261. //
  3262. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  3263. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  3264. op := &request.Operation{
  3265. Name: opGetObjectTorrent,
  3266. HTTPMethod: "GET",
  3267. HTTPPath: "/{Bucket}/{Key+}?torrent",
  3268. }
  3269. if input == nil {
  3270. input = &GetObjectTorrentInput{}
  3271. }
  3272. output = &GetObjectTorrentOutput{}
  3273. req = c.newRequest(op, input, output)
  3274. return
  3275. }
  3276. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  3277. //
  3278. // Return torrent files from a bucket.
  3279. //
  3280. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3281. // with awserr.Error's Code and Message methods to get detailed information about
  3282. // the error.
  3283. //
  3284. // See the AWS API reference guide for Amazon Simple Storage Service's
  3285. // API operation GetObjectTorrent for usage and error information.
  3286. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  3287. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  3288. req, out := c.GetObjectTorrentRequest(input)
  3289. return out, req.Send()
  3290. }
  3291. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  3292. // the ability to pass a context and additional request options.
  3293. //
  3294. // See GetObjectTorrent for details on how to use this API operation.
  3295. //
  3296. // The context must be non-nil and will be used for request cancellation. If
  3297. // the context is nil a panic will occur. In the future the SDK may create
  3298. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3299. // for more information on using Contexts.
  3300. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  3301. req, out := c.GetObjectTorrentRequest(input)
  3302. req.SetContext(ctx)
  3303. req.ApplyOptions(opts...)
  3304. return out, req.Send()
  3305. }
  3306. const opGetPublicAccessBlock = "GetPublicAccessBlock"
  3307. // GetPublicAccessBlockRequest generates a "aws/request.Request" representing the
  3308. // client's request for the GetPublicAccessBlock operation. The "output" return
  3309. // value will be populated with the request's response once the request completes
  3310. // successfully.
  3311. //
  3312. // Use "Send" method on the returned Request to send the API call to the service.
  3313. // the "output" return value is not valid until after Send returns without error.
  3314. //
  3315. // See GetPublicAccessBlock for more information on using the GetPublicAccessBlock
  3316. // API call, and error handling.
  3317. //
  3318. // This method is useful when you want to inject custom logic or configuration
  3319. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3320. //
  3321. //
  3322. // // Example sending a request using the GetPublicAccessBlockRequest method.
  3323. // req, resp := client.GetPublicAccessBlockRequest(params)
  3324. //
  3325. // err := req.Send()
  3326. // if err == nil { // resp is now filled
  3327. // fmt.Println(resp)
  3328. // }
  3329. //
  3330. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  3331. func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) {
  3332. op := &request.Operation{
  3333. Name: opGetPublicAccessBlock,
  3334. HTTPMethod: "GET",
  3335. HTTPPath: "/{Bucket}?publicAccessBlock",
  3336. }
  3337. if input == nil {
  3338. input = &GetPublicAccessBlockInput{}
  3339. }
  3340. output = &GetPublicAccessBlockOutput{}
  3341. req = c.newRequest(op, input, output)
  3342. return
  3343. }
  3344. // GetPublicAccessBlock API operation for Amazon Simple Storage Service.
  3345. //
  3346. // Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket.
  3347. //
  3348. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3349. // with awserr.Error's Code and Message methods to get detailed information about
  3350. // the error.
  3351. //
  3352. // See the AWS API reference guide for Amazon Simple Storage Service's
  3353. // API operation GetPublicAccessBlock for usage and error information.
  3354. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
  3355. func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) {
  3356. req, out := c.GetPublicAccessBlockRequest(input)
  3357. return out, req.Send()
  3358. }
  3359. // GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of
  3360. // the ability to pass a context and additional request options.
  3361. //
  3362. // See GetPublicAccessBlock for details on how to use this API operation.
  3363. //
  3364. // The context must be non-nil and will be used for request cancellation. If
  3365. // the context is nil a panic will occur. In the future the SDK may create
  3366. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3367. // for more information on using Contexts.
  3368. func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) {
  3369. req, out := c.GetPublicAccessBlockRequest(input)
  3370. req.SetContext(ctx)
  3371. req.ApplyOptions(opts...)
  3372. return out, req.Send()
  3373. }
  3374. const opHeadBucket = "HeadBucket"
  3375. // HeadBucketRequest generates a "aws/request.Request" representing the
  3376. // client's request for the HeadBucket operation. The "output" return
  3377. // value will be populated with the request's response once the request completes
  3378. // successfully.
  3379. //
  3380. // Use "Send" method on the returned Request to send the API call to the service.
  3381. // the "output" return value is not valid until after Send returns without error.
  3382. //
  3383. // See HeadBucket for more information on using the HeadBucket
  3384. // API call, and error handling.
  3385. //
  3386. // This method is useful when you want to inject custom logic or configuration
  3387. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3388. //
  3389. //
  3390. // // Example sending a request using the HeadBucketRequest method.
  3391. // req, resp := client.HeadBucketRequest(params)
  3392. //
  3393. // err := req.Send()
  3394. // if err == nil { // resp is now filled
  3395. // fmt.Println(resp)
  3396. // }
  3397. //
  3398. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3399. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  3400. op := &request.Operation{
  3401. Name: opHeadBucket,
  3402. HTTPMethod: "HEAD",
  3403. HTTPPath: "/{Bucket}",
  3404. }
  3405. if input == nil {
  3406. input = &HeadBucketInput{}
  3407. }
  3408. output = &HeadBucketOutput{}
  3409. req = c.newRequest(op, input, output)
  3410. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  3411. return
  3412. }
  3413. // HeadBucket API operation for Amazon Simple Storage Service.
  3414. //
  3415. // This operation is useful to determine if a bucket exists and you have permission
  3416. // to access it.
  3417. //
  3418. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3419. // with awserr.Error's Code and Message methods to get detailed information about
  3420. // the error.
  3421. //
  3422. // See the AWS API reference guide for Amazon Simple Storage Service's
  3423. // API operation HeadBucket for usage and error information.
  3424. //
  3425. // Returned Error Codes:
  3426. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3427. // The specified bucket does not exist.
  3428. //
  3429. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3430. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  3431. req, out := c.HeadBucketRequest(input)
  3432. return out, req.Send()
  3433. }
  3434. // HeadBucketWithContext is the same as HeadBucket with the addition of
  3435. // the ability to pass a context and additional request options.
  3436. //
  3437. // See HeadBucket for details on how to use this API operation.
  3438. //
  3439. // The context must be non-nil and will be used for request cancellation. If
  3440. // the context is nil a panic will occur. In the future the SDK may create
  3441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3442. // for more information on using Contexts.
  3443. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  3444. req, out := c.HeadBucketRequest(input)
  3445. req.SetContext(ctx)
  3446. req.ApplyOptions(opts...)
  3447. return out, req.Send()
  3448. }
  3449. const opHeadObject = "HeadObject"
  3450. // HeadObjectRequest generates a "aws/request.Request" representing the
  3451. // client's request for the HeadObject operation. The "output" return
  3452. // value will be populated with the request's response once the request completes
  3453. // successfully.
  3454. //
  3455. // Use "Send" method on the returned Request to send the API call to the service.
  3456. // the "output" return value is not valid until after Send returns without error.
  3457. //
  3458. // See HeadObject for more information on using the HeadObject
  3459. // API call, and error handling.
  3460. //
  3461. // This method is useful when you want to inject custom logic or configuration
  3462. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3463. //
  3464. //
  3465. // // Example sending a request using the HeadObjectRequest method.
  3466. // req, resp := client.HeadObjectRequest(params)
  3467. //
  3468. // err := req.Send()
  3469. // if err == nil { // resp is now filled
  3470. // fmt.Println(resp)
  3471. // }
  3472. //
  3473. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3474. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  3475. op := &request.Operation{
  3476. Name: opHeadObject,
  3477. HTTPMethod: "HEAD",
  3478. HTTPPath: "/{Bucket}/{Key+}",
  3479. }
  3480. if input == nil {
  3481. input = &HeadObjectInput{}
  3482. }
  3483. output = &HeadObjectOutput{}
  3484. req = c.newRequest(op, input, output)
  3485. return
  3486. }
  3487. // HeadObject API operation for Amazon Simple Storage Service.
  3488. //
  3489. // The HEAD operation retrieves metadata from an object without returning the
  3490. // object itself. This operation is useful if you're only interested in an object's
  3491. // metadata. To use HEAD, you must have READ access to the object.
  3492. //
  3493. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  3494. // for more information on returned errors.
  3495. //
  3496. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3497. // with awserr.Error's Code and Message methods to get detailed information about
  3498. // the error.
  3499. //
  3500. // See the AWS API reference guide for Amazon Simple Storage Service's
  3501. // API operation HeadObject for usage and error information.
  3502. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3503. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  3504. req, out := c.HeadObjectRequest(input)
  3505. return out, req.Send()
  3506. }
  3507. // HeadObjectWithContext is the same as HeadObject with the addition of
  3508. // the ability to pass a context and additional request options.
  3509. //
  3510. // See HeadObject for details on how to use this API operation.
  3511. //
  3512. // The context must be non-nil and will be used for request cancellation. If
  3513. // the context is nil a panic will occur. In the future the SDK may create
  3514. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3515. // for more information on using Contexts.
  3516. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  3517. req, out := c.HeadObjectRequest(input)
  3518. req.SetContext(ctx)
  3519. req.ApplyOptions(opts...)
  3520. return out, req.Send()
  3521. }
  3522. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3523. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3524. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3525. // value will be populated with the request's response once the request completes
  3526. // successfully.
  3527. //
  3528. // Use "Send" method on the returned Request to send the API call to the service.
  3529. // the "output" return value is not valid until after Send returns without error.
  3530. //
  3531. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  3532. // API call, and error handling.
  3533. //
  3534. // This method is useful when you want to inject custom logic or configuration
  3535. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3536. //
  3537. //
  3538. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3539. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3540. //
  3541. // err := req.Send()
  3542. // if err == nil { // resp is now filled
  3543. // fmt.Println(resp)
  3544. // }
  3545. //
  3546. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3547. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3548. op := &request.Operation{
  3549. Name: opListBucketAnalyticsConfigurations,
  3550. HTTPMethod: "GET",
  3551. HTTPPath: "/{Bucket}?analytics",
  3552. }
  3553. if input == nil {
  3554. input = &ListBucketAnalyticsConfigurationsInput{}
  3555. }
  3556. output = &ListBucketAnalyticsConfigurationsOutput{}
  3557. req = c.newRequest(op, input, output)
  3558. return
  3559. }
  3560. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3561. //
  3562. // Lists the analytics configurations for the bucket.
  3563. //
  3564. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3565. // with awserr.Error's Code and Message methods to get detailed information about
  3566. // the error.
  3567. //
  3568. // See the AWS API reference guide for Amazon Simple Storage Service's
  3569. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3570. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3571. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3572. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3573. return out, req.Send()
  3574. }
  3575. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3576. // the ability to pass a context and additional request options.
  3577. //
  3578. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3579. //
  3580. // The context must be non-nil and will be used for request cancellation. If
  3581. // the context is nil a panic will occur. In the future the SDK may create
  3582. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3583. // for more information on using Contexts.
  3584. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3585. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3586. req.SetContext(ctx)
  3587. req.ApplyOptions(opts...)
  3588. return out, req.Send()
  3589. }
  3590. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3591. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3592. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3593. // value will be populated with the request's response once the request completes
  3594. // successfully.
  3595. //
  3596. // Use "Send" method on the returned Request to send the API call to the service.
  3597. // the "output" return value is not valid until after Send returns without error.
  3598. //
  3599. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  3600. // API call, and error handling.
  3601. //
  3602. // This method is useful when you want to inject custom logic or configuration
  3603. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3604. //
  3605. //
  3606. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3607. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3608. //
  3609. // err := req.Send()
  3610. // if err == nil { // resp is now filled
  3611. // fmt.Println(resp)
  3612. // }
  3613. //
  3614. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3615. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3616. op := &request.Operation{
  3617. Name: opListBucketInventoryConfigurations,
  3618. HTTPMethod: "GET",
  3619. HTTPPath: "/{Bucket}?inventory",
  3620. }
  3621. if input == nil {
  3622. input = &ListBucketInventoryConfigurationsInput{}
  3623. }
  3624. output = &ListBucketInventoryConfigurationsOutput{}
  3625. req = c.newRequest(op, input, output)
  3626. return
  3627. }
  3628. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3629. //
  3630. // Returns a list of inventory configurations for the bucket.
  3631. //
  3632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3633. // with awserr.Error's Code and Message methods to get detailed information about
  3634. // the error.
  3635. //
  3636. // See the AWS API reference guide for Amazon Simple Storage Service's
  3637. // API operation ListBucketInventoryConfigurations for usage and error information.
  3638. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3639. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3640. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3641. return out, req.Send()
  3642. }
  3643. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3644. // the ability to pass a context and additional request options.
  3645. //
  3646. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3647. //
  3648. // The context must be non-nil and will be used for request cancellation. If
  3649. // the context is nil a panic will occur. In the future the SDK may create
  3650. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3651. // for more information on using Contexts.
  3652. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3653. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3654. req.SetContext(ctx)
  3655. req.ApplyOptions(opts...)
  3656. return out, req.Send()
  3657. }
  3658. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3659. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3660. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3661. // value will be populated with the request's response once the request completes
  3662. // successfully.
  3663. //
  3664. // Use "Send" method on the returned Request to send the API call to the service.
  3665. // the "output" return value is not valid until after Send returns without error.
  3666. //
  3667. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  3668. // API call, and error handling.
  3669. //
  3670. // This method is useful when you want to inject custom logic or configuration
  3671. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3672. //
  3673. //
  3674. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3675. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3676. //
  3677. // err := req.Send()
  3678. // if err == nil { // resp is now filled
  3679. // fmt.Println(resp)
  3680. // }
  3681. //
  3682. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3683. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3684. op := &request.Operation{
  3685. Name: opListBucketMetricsConfigurations,
  3686. HTTPMethod: "GET",
  3687. HTTPPath: "/{Bucket}?metrics",
  3688. }
  3689. if input == nil {
  3690. input = &ListBucketMetricsConfigurationsInput{}
  3691. }
  3692. output = &ListBucketMetricsConfigurationsOutput{}
  3693. req = c.newRequest(op, input, output)
  3694. return
  3695. }
  3696. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3697. //
  3698. // Lists the metrics configurations for the bucket.
  3699. //
  3700. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3701. // with awserr.Error's Code and Message methods to get detailed information about
  3702. // the error.
  3703. //
  3704. // See the AWS API reference guide for Amazon Simple Storage Service's
  3705. // API operation ListBucketMetricsConfigurations for usage and error information.
  3706. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3707. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3708. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3709. return out, req.Send()
  3710. }
  3711. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3712. // the ability to pass a context and additional request options.
  3713. //
  3714. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3715. //
  3716. // The context must be non-nil and will be used for request cancellation. If
  3717. // the context is nil a panic will occur. In the future the SDK may create
  3718. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3719. // for more information on using Contexts.
  3720. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3721. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3722. req.SetContext(ctx)
  3723. req.ApplyOptions(opts...)
  3724. return out, req.Send()
  3725. }
  3726. const opListBuckets = "ListBuckets"
  3727. // ListBucketsRequest generates a "aws/request.Request" representing the
  3728. // client's request for the ListBuckets operation. The "output" return
  3729. // value will be populated with the request's response once the request completes
  3730. // successfully.
  3731. //
  3732. // Use "Send" method on the returned Request to send the API call to the service.
  3733. // the "output" return value is not valid until after Send returns without error.
  3734. //
  3735. // See ListBuckets for more information on using the ListBuckets
  3736. // API call, and error handling.
  3737. //
  3738. // This method is useful when you want to inject custom logic or configuration
  3739. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3740. //
  3741. //
  3742. // // Example sending a request using the ListBucketsRequest method.
  3743. // req, resp := client.ListBucketsRequest(params)
  3744. //
  3745. // err := req.Send()
  3746. // if err == nil { // resp is now filled
  3747. // fmt.Println(resp)
  3748. // }
  3749. //
  3750. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3751. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3752. op := &request.Operation{
  3753. Name: opListBuckets,
  3754. HTTPMethod: "GET",
  3755. HTTPPath: "/",
  3756. }
  3757. if input == nil {
  3758. input = &ListBucketsInput{}
  3759. }
  3760. output = &ListBucketsOutput{}
  3761. req = c.newRequest(op, input, output)
  3762. return
  3763. }
  3764. // ListBuckets API operation for Amazon Simple Storage Service.
  3765. //
  3766. // Returns a list of all buckets owned by the authenticated sender of the request.
  3767. //
  3768. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3769. // with awserr.Error's Code and Message methods to get detailed information about
  3770. // the error.
  3771. //
  3772. // See the AWS API reference guide for Amazon Simple Storage Service's
  3773. // API operation ListBuckets for usage and error information.
  3774. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3775. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3776. req, out := c.ListBucketsRequest(input)
  3777. return out, req.Send()
  3778. }
  3779. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3780. // the ability to pass a context and additional request options.
  3781. //
  3782. // See ListBuckets for details on how to use this API operation.
  3783. //
  3784. // The context must be non-nil and will be used for request cancellation. If
  3785. // the context is nil a panic will occur. In the future the SDK may create
  3786. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3787. // for more information on using Contexts.
  3788. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3789. req, out := c.ListBucketsRequest(input)
  3790. req.SetContext(ctx)
  3791. req.ApplyOptions(opts...)
  3792. return out, req.Send()
  3793. }
  3794. const opListMultipartUploads = "ListMultipartUploads"
  3795. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3796. // client's request for the ListMultipartUploads operation. The "output" return
  3797. // value will be populated with the request's response once the request completes
  3798. // successfully.
  3799. //
  3800. // Use "Send" method on the returned Request to send the API call to the service.
  3801. // the "output" return value is not valid until after Send returns without error.
  3802. //
  3803. // See ListMultipartUploads for more information on using the ListMultipartUploads
  3804. // API call, and error handling.
  3805. //
  3806. // This method is useful when you want to inject custom logic or configuration
  3807. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3808. //
  3809. //
  3810. // // Example sending a request using the ListMultipartUploadsRequest method.
  3811. // req, resp := client.ListMultipartUploadsRequest(params)
  3812. //
  3813. // err := req.Send()
  3814. // if err == nil { // resp is now filled
  3815. // fmt.Println(resp)
  3816. // }
  3817. //
  3818. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3819. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3820. op := &request.Operation{
  3821. Name: opListMultipartUploads,
  3822. HTTPMethod: "GET",
  3823. HTTPPath: "/{Bucket}?uploads",
  3824. Paginator: &request.Paginator{
  3825. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3826. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3827. LimitToken: "MaxUploads",
  3828. TruncationToken: "IsTruncated",
  3829. },
  3830. }
  3831. if input == nil {
  3832. input = &ListMultipartUploadsInput{}
  3833. }
  3834. output = &ListMultipartUploadsOutput{}
  3835. req = c.newRequest(op, input, output)
  3836. return
  3837. }
  3838. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3839. //
  3840. // This operation lists in-progress multipart uploads.
  3841. //
  3842. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3843. // with awserr.Error's Code and Message methods to get detailed information about
  3844. // the error.
  3845. //
  3846. // See the AWS API reference guide for Amazon Simple Storage Service's
  3847. // API operation ListMultipartUploads for usage and error information.
  3848. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3849. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3850. req, out := c.ListMultipartUploadsRequest(input)
  3851. return out, req.Send()
  3852. }
  3853. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3854. // the ability to pass a context and additional request options.
  3855. //
  3856. // See ListMultipartUploads for details on how to use this API operation.
  3857. //
  3858. // The context must be non-nil and will be used for request cancellation. If
  3859. // the context is nil a panic will occur. In the future the SDK may create
  3860. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3861. // for more information on using Contexts.
  3862. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3863. req, out := c.ListMultipartUploadsRequest(input)
  3864. req.SetContext(ctx)
  3865. req.ApplyOptions(opts...)
  3866. return out, req.Send()
  3867. }
  3868. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3869. // calling the "fn" function with the response data for each page. To stop
  3870. // iterating, return false from the fn function.
  3871. //
  3872. // See ListMultipartUploads method for more information on how to use this operation.
  3873. //
  3874. // Note: This operation can generate multiple requests to a service.
  3875. //
  3876. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3877. // pageNum := 0
  3878. // err := client.ListMultipartUploadsPages(params,
  3879. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3880. // pageNum++
  3881. // fmt.Println(page)
  3882. // return pageNum <= 3
  3883. // })
  3884. //
  3885. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3886. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3887. }
  3888. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3889. // it takes a Context and allows setting request options on the pages.
  3890. //
  3891. // The context must be non-nil and will be used for request cancellation. If
  3892. // the context is nil a panic will occur. In the future the SDK may create
  3893. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3894. // for more information on using Contexts.
  3895. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3896. p := request.Pagination{
  3897. NewRequest: func() (*request.Request, error) {
  3898. var inCpy *ListMultipartUploadsInput
  3899. if input != nil {
  3900. tmp := *input
  3901. inCpy = &tmp
  3902. }
  3903. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3904. req.SetContext(ctx)
  3905. req.ApplyOptions(opts...)
  3906. return req, nil
  3907. },
  3908. }
  3909. cont := true
  3910. for p.Next() && cont {
  3911. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3912. }
  3913. return p.Err()
  3914. }
  3915. const opListObjectVersions = "ListObjectVersions"
  3916. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3917. // client's request for the ListObjectVersions operation. The "output" return
  3918. // value will be populated with the request's response once the request completes
  3919. // successfully.
  3920. //
  3921. // Use "Send" method on the returned Request to send the API call to the service.
  3922. // the "output" return value is not valid until after Send returns without error.
  3923. //
  3924. // See ListObjectVersions for more information on using the ListObjectVersions
  3925. // API call, and error handling.
  3926. //
  3927. // This method is useful when you want to inject custom logic or configuration
  3928. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3929. //
  3930. //
  3931. // // Example sending a request using the ListObjectVersionsRequest method.
  3932. // req, resp := client.ListObjectVersionsRequest(params)
  3933. //
  3934. // err := req.Send()
  3935. // if err == nil { // resp is now filled
  3936. // fmt.Println(resp)
  3937. // }
  3938. //
  3939. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3940. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3941. op := &request.Operation{
  3942. Name: opListObjectVersions,
  3943. HTTPMethod: "GET",
  3944. HTTPPath: "/{Bucket}?versions",
  3945. Paginator: &request.Paginator{
  3946. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3947. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3948. LimitToken: "MaxKeys",
  3949. TruncationToken: "IsTruncated",
  3950. },
  3951. }
  3952. if input == nil {
  3953. input = &ListObjectVersionsInput{}
  3954. }
  3955. output = &ListObjectVersionsOutput{}
  3956. req = c.newRequest(op, input, output)
  3957. return
  3958. }
  3959. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3960. //
  3961. // Returns metadata about all of the versions of objects in a bucket.
  3962. //
  3963. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3964. // with awserr.Error's Code and Message methods to get detailed information about
  3965. // the error.
  3966. //
  3967. // See the AWS API reference guide for Amazon Simple Storage Service's
  3968. // API operation ListObjectVersions for usage and error information.
  3969. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3970. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3971. req, out := c.ListObjectVersionsRequest(input)
  3972. return out, req.Send()
  3973. }
  3974. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3975. // the ability to pass a context and additional request options.
  3976. //
  3977. // See ListObjectVersions for details on how to use this API operation.
  3978. //
  3979. // The context must be non-nil and will be used for request cancellation. If
  3980. // the context is nil a panic will occur. In the future the SDK may create
  3981. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3982. // for more information on using Contexts.
  3983. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3984. req, out := c.ListObjectVersionsRequest(input)
  3985. req.SetContext(ctx)
  3986. req.ApplyOptions(opts...)
  3987. return out, req.Send()
  3988. }
  3989. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3990. // calling the "fn" function with the response data for each page. To stop
  3991. // iterating, return false from the fn function.
  3992. //
  3993. // See ListObjectVersions method for more information on how to use this operation.
  3994. //
  3995. // Note: This operation can generate multiple requests to a service.
  3996. //
  3997. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3998. // pageNum := 0
  3999. // err := client.ListObjectVersionsPages(params,
  4000. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  4001. // pageNum++
  4002. // fmt.Println(page)
  4003. // return pageNum <= 3
  4004. // })
  4005. //
  4006. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  4007. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  4008. }
  4009. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  4010. // it takes a Context and allows setting request options on the pages.
  4011. //
  4012. // The context must be non-nil and will be used for request cancellation. If
  4013. // the context is nil a panic will occur. In the future the SDK may create
  4014. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4015. // for more information on using Contexts.
  4016. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  4017. p := request.Pagination{
  4018. NewRequest: func() (*request.Request, error) {
  4019. var inCpy *ListObjectVersionsInput
  4020. if input != nil {
  4021. tmp := *input
  4022. inCpy = &tmp
  4023. }
  4024. req, _ := c.ListObjectVersionsRequest(inCpy)
  4025. req.SetContext(ctx)
  4026. req.ApplyOptions(opts...)
  4027. return req, nil
  4028. },
  4029. }
  4030. cont := true
  4031. for p.Next() && cont {
  4032. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  4033. }
  4034. return p.Err()
  4035. }
  4036. const opListObjects = "ListObjects"
  4037. // ListObjectsRequest generates a "aws/request.Request" representing the
  4038. // client's request for the ListObjects operation. The "output" return
  4039. // value will be populated with the request's response once the request completes
  4040. // successfully.
  4041. //
  4042. // Use "Send" method on the returned Request to send the API call to the service.
  4043. // the "output" return value is not valid until after Send returns without error.
  4044. //
  4045. // See ListObjects for more information on using the ListObjects
  4046. // API call, and error handling.
  4047. //
  4048. // This method is useful when you want to inject custom logic or configuration
  4049. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4050. //
  4051. //
  4052. // // Example sending a request using the ListObjectsRequest method.
  4053. // req, resp := client.ListObjectsRequest(params)
  4054. //
  4055. // err := req.Send()
  4056. // if err == nil { // resp is now filled
  4057. // fmt.Println(resp)
  4058. // }
  4059. //
  4060. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  4061. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  4062. op := &request.Operation{
  4063. Name: opListObjects,
  4064. HTTPMethod: "GET",
  4065. HTTPPath: "/{Bucket}",
  4066. Paginator: &request.Paginator{
  4067. InputTokens: []string{"Marker"},
  4068. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  4069. LimitToken: "MaxKeys",
  4070. TruncationToken: "IsTruncated",
  4071. },
  4072. }
  4073. if input == nil {
  4074. input = &ListObjectsInput{}
  4075. }
  4076. output = &ListObjectsOutput{}
  4077. req = c.newRequest(op, input, output)
  4078. return
  4079. }
  4080. // ListObjects API operation for Amazon Simple Storage Service.
  4081. //
  4082. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  4083. // the request parameters as selection criteria to return a subset of the objects
  4084. // in a bucket.
  4085. //
  4086. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4087. // with awserr.Error's Code and Message methods to get detailed information about
  4088. // the error.
  4089. //
  4090. // See the AWS API reference guide for Amazon Simple Storage Service's
  4091. // API operation ListObjects for usage and error information.
  4092. //
  4093. // Returned Error Codes:
  4094. // * ErrCodeNoSuchBucket "NoSuchBucket"
  4095. // The specified bucket does not exist.
  4096. //
  4097. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  4098. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  4099. req, out := c.ListObjectsRequest(input)
  4100. return out, req.Send()
  4101. }
  4102. // ListObjectsWithContext is the same as ListObjects with the addition of
  4103. // the ability to pass a context and additional request options.
  4104. //
  4105. // See ListObjects for details on how to use this API operation.
  4106. //
  4107. // The context must be non-nil and will be used for request cancellation. If
  4108. // the context is nil a panic will occur. In the future the SDK may create
  4109. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4110. // for more information on using Contexts.
  4111. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  4112. req, out := c.ListObjectsRequest(input)
  4113. req.SetContext(ctx)
  4114. req.ApplyOptions(opts...)
  4115. return out, req.Send()
  4116. }
  4117. // ListObjectsPages iterates over the pages of a ListObjects operation,
  4118. // calling the "fn" function with the response data for each page. To stop
  4119. // iterating, return false from the fn function.
  4120. //
  4121. // See ListObjects method for more information on how to use this operation.
  4122. //
  4123. // Note: This operation can generate multiple requests to a service.
  4124. //
  4125. // // Example iterating over at most 3 pages of a ListObjects operation.
  4126. // pageNum := 0
  4127. // err := client.ListObjectsPages(params,
  4128. // func(page *ListObjectsOutput, lastPage bool) bool {
  4129. // pageNum++
  4130. // fmt.Println(page)
  4131. // return pageNum <= 3
  4132. // })
  4133. //
  4134. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  4135. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  4136. }
  4137. // ListObjectsPagesWithContext same as ListObjectsPages except
  4138. // it takes a Context and allows setting request options on the pages.
  4139. //
  4140. // The context must be non-nil and will be used for request cancellation. If
  4141. // the context is nil a panic will occur. In the future the SDK may create
  4142. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4143. // for more information on using Contexts.
  4144. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  4145. p := request.Pagination{
  4146. NewRequest: func() (*request.Request, error) {
  4147. var inCpy *ListObjectsInput
  4148. if input != nil {
  4149. tmp := *input
  4150. inCpy = &tmp
  4151. }
  4152. req, _ := c.ListObjectsRequest(inCpy)
  4153. req.SetContext(ctx)
  4154. req.ApplyOptions(opts...)
  4155. return req, nil
  4156. },
  4157. }
  4158. cont := true
  4159. for p.Next() && cont {
  4160. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  4161. }
  4162. return p.Err()
  4163. }
  4164. const opListObjectsV2 = "ListObjectsV2"
  4165. // ListObjectsV2Request generates a "aws/request.Request" representing the
  4166. // client's request for the ListObjectsV2 operation. The "output" return
  4167. // value will be populated with the request's response once the request completes
  4168. // successfully.
  4169. //
  4170. // Use "Send" method on the returned Request to send the API call to the service.
  4171. // the "output" return value is not valid until after Send returns without error.
  4172. //
  4173. // See ListObjectsV2 for more information on using the ListObjectsV2
  4174. // API call, and error handling.
  4175. //
  4176. // This method is useful when you want to inject custom logic or configuration
  4177. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4178. //
  4179. //
  4180. // // Example sending a request using the ListObjectsV2Request method.
  4181. // req, resp := client.ListObjectsV2Request(params)
  4182. //
  4183. // err := req.Send()
  4184. // if err == nil { // resp is now filled
  4185. // fmt.Println(resp)
  4186. // }
  4187. //
  4188. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  4189. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  4190. op := &request.Operation{
  4191. Name: opListObjectsV2,
  4192. HTTPMethod: "GET",
  4193. HTTPPath: "/{Bucket}?list-type=2",
  4194. Paginator: &request.Paginator{
  4195. InputTokens: []string{"ContinuationToken"},
  4196. OutputTokens: []string{"NextContinuationToken"},
  4197. LimitToken: "MaxKeys",
  4198. TruncationToken: "",
  4199. },
  4200. }
  4201. if input == nil {
  4202. input = &ListObjectsV2Input{}
  4203. }
  4204. output = &ListObjectsV2Output{}
  4205. req = c.newRequest(op, input, output)
  4206. return
  4207. }
  4208. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  4209. //
  4210. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  4211. // the request parameters as selection criteria to return a subset of the objects
  4212. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  4213. // you use this revised API for new application development.
  4214. //
  4215. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4216. // with awserr.Error's Code and Message methods to get detailed information about
  4217. // the error.
  4218. //
  4219. // See the AWS API reference guide for Amazon Simple Storage Service's
  4220. // API operation ListObjectsV2 for usage and error information.
  4221. //
  4222. // Returned Error Codes:
  4223. // * ErrCodeNoSuchBucket "NoSuchBucket"
  4224. // The specified bucket does not exist.
  4225. //
  4226. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  4227. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  4228. req, out := c.ListObjectsV2Request(input)
  4229. return out, req.Send()
  4230. }
  4231. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  4232. // the ability to pass a context and additional request options.
  4233. //
  4234. // See ListObjectsV2 for details on how to use this API operation.
  4235. //
  4236. // The context must be non-nil and will be used for request cancellation. If
  4237. // the context is nil a panic will occur. In the future the SDK may create
  4238. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4239. // for more information on using Contexts.
  4240. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  4241. req, out := c.ListObjectsV2Request(input)
  4242. req.SetContext(ctx)
  4243. req.ApplyOptions(opts...)
  4244. return out, req.Send()
  4245. }
  4246. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  4247. // calling the "fn" function with the response data for each page. To stop
  4248. // iterating, return false from the fn function.
  4249. //
  4250. // See ListObjectsV2 method for more information on how to use this operation.
  4251. //
  4252. // Note: This operation can generate multiple requests to a service.
  4253. //
  4254. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  4255. // pageNum := 0
  4256. // err := client.ListObjectsV2Pages(params,
  4257. // func(page *ListObjectsV2Output, lastPage bool) bool {
  4258. // pageNum++
  4259. // fmt.Println(page)
  4260. // return pageNum <= 3
  4261. // })
  4262. //
  4263. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  4264. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  4265. }
  4266. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  4267. // it takes a Context and allows setting request options on the pages.
  4268. //
  4269. // The context must be non-nil and will be used for request cancellation. If
  4270. // the context is nil a panic will occur. In the future the SDK may create
  4271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4272. // for more information on using Contexts.
  4273. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  4274. p := request.Pagination{
  4275. NewRequest: func() (*request.Request, error) {
  4276. var inCpy *ListObjectsV2Input
  4277. if input != nil {
  4278. tmp := *input
  4279. inCpy = &tmp
  4280. }
  4281. req, _ := c.ListObjectsV2Request(inCpy)
  4282. req.SetContext(ctx)
  4283. req.ApplyOptions(opts...)
  4284. return req, nil
  4285. },
  4286. }
  4287. cont := true
  4288. for p.Next() && cont {
  4289. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  4290. }
  4291. return p.Err()
  4292. }
  4293. const opListParts = "ListParts"
  4294. // ListPartsRequest generates a "aws/request.Request" representing the
  4295. // client's request for the ListParts operation. The "output" return
  4296. // value will be populated with the request's response once the request completes
  4297. // successfully.
  4298. //
  4299. // Use "Send" method on the returned Request to send the API call to the service.
  4300. // the "output" return value is not valid until after Send returns without error.
  4301. //
  4302. // See ListParts for more information on using the ListParts
  4303. // API call, and error handling.
  4304. //
  4305. // This method is useful when you want to inject custom logic or configuration
  4306. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4307. //
  4308. //
  4309. // // Example sending a request using the ListPartsRequest method.
  4310. // req, resp := client.ListPartsRequest(params)
  4311. //
  4312. // err := req.Send()
  4313. // if err == nil { // resp is now filled
  4314. // fmt.Println(resp)
  4315. // }
  4316. //
  4317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  4318. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  4319. op := &request.Operation{
  4320. Name: opListParts,
  4321. HTTPMethod: "GET",
  4322. HTTPPath: "/{Bucket}/{Key+}",
  4323. Paginator: &request.Paginator{
  4324. InputTokens: []string{"PartNumberMarker"},
  4325. OutputTokens: []string{"NextPartNumberMarker"},
  4326. LimitToken: "MaxParts",
  4327. TruncationToken: "IsTruncated",
  4328. },
  4329. }
  4330. if input == nil {
  4331. input = &ListPartsInput{}
  4332. }
  4333. output = &ListPartsOutput{}
  4334. req = c.newRequest(op, input, output)
  4335. return
  4336. }
  4337. // ListParts API operation for Amazon Simple Storage Service.
  4338. //
  4339. // Lists the parts that have been uploaded for a specific multipart upload.
  4340. //
  4341. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4342. // with awserr.Error's Code and Message methods to get detailed information about
  4343. // the error.
  4344. //
  4345. // See the AWS API reference guide for Amazon Simple Storage Service's
  4346. // API operation ListParts for usage and error information.
  4347. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  4348. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  4349. req, out := c.ListPartsRequest(input)
  4350. return out, req.Send()
  4351. }
  4352. // ListPartsWithContext is the same as ListParts with the addition of
  4353. // the ability to pass a context and additional request options.
  4354. //
  4355. // See ListParts for details on how to use this API operation.
  4356. //
  4357. // The context must be non-nil and will be used for request cancellation. If
  4358. // the context is nil a panic will occur. In the future the SDK may create
  4359. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4360. // for more information on using Contexts.
  4361. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  4362. req, out := c.ListPartsRequest(input)
  4363. req.SetContext(ctx)
  4364. req.ApplyOptions(opts...)
  4365. return out, req.Send()
  4366. }
  4367. // ListPartsPages iterates over the pages of a ListParts operation,
  4368. // calling the "fn" function with the response data for each page. To stop
  4369. // iterating, return false from the fn function.
  4370. //
  4371. // See ListParts method for more information on how to use this operation.
  4372. //
  4373. // Note: This operation can generate multiple requests to a service.
  4374. //
  4375. // // Example iterating over at most 3 pages of a ListParts operation.
  4376. // pageNum := 0
  4377. // err := client.ListPartsPages(params,
  4378. // func(page *ListPartsOutput, lastPage bool) bool {
  4379. // pageNum++
  4380. // fmt.Println(page)
  4381. // return pageNum <= 3
  4382. // })
  4383. //
  4384. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  4385. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  4386. }
  4387. // ListPartsPagesWithContext same as ListPartsPages except
  4388. // it takes a Context and allows setting request options on the pages.
  4389. //
  4390. // The context must be non-nil and will be used for request cancellation. If
  4391. // the context is nil a panic will occur. In the future the SDK may create
  4392. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4393. // for more information on using Contexts.
  4394. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  4395. p := request.Pagination{
  4396. NewRequest: func() (*request.Request, error) {
  4397. var inCpy *ListPartsInput
  4398. if input != nil {
  4399. tmp := *input
  4400. inCpy = &tmp
  4401. }
  4402. req, _ := c.ListPartsRequest(inCpy)
  4403. req.SetContext(ctx)
  4404. req.ApplyOptions(opts...)
  4405. return req, nil
  4406. },
  4407. }
  4408. cont := true
  4409. for p.Next() && cont {
  4410. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  4411. }
  4412. return p.Err()
  4413. }
  4414. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  4415. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  4416. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  4417. // value will be populated with the request's response once the request completes
  4418. // successfully.
  4419. //
  4420. // Use "Send" method on the returned Request to send the API call to the service.
  4421. // the "output" return value is not valid until after Send returns without error.
  4422. //
  4423. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  4424. // API call, and error handling.
  4425. //
  4426. // This method is useful when you want to inject custom logic or configuration
  4427. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4428. //
  4429. //
  4430. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  4431. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  4432. //
  4433. // err := req.Send()
  4434. // if err == nil { // resp is now filled
  4435. // fmt.Println(resp)
  4436. // }
  4437. //
  4438. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4439. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  4440. op := &request.Operation{
  4441. Name: opPutBucketAccelerateConfiguration,
  4442. HTTPMethod: "PUT",
  4443. HTTPPath: "/{Bucket}?accelerate",
  4444. }
  4445. if input == nil {
  4446. input = &PutBucketAccelerateConfigurationInput{}
  4447. }
  4448. output = &PutBucketAccelerateConfigurationOutput{}
  4449. req = c.newRequest(op, input, output)
  4450. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4451. return
  4452. }
  4453. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  4454. //
  4455. // Sets the accelerate configuration of an existing bucket.
  4456. //
  4457. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4458. // with awserr.Error's Code and Message methods to get detailed information about
  4459. // the error.
  4460. //
  4461. // See the AWS API reference guide for Amazon Simple Storage Service's
  4462. // API operation PutBucketAccelerateConfiguration for usage and error information.
  4463. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4464. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  4465. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4466. return out, req.Send()
  4467. }
  4468. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  4469. // the ability to pass a context and additional request options.
  4470. //
  4471. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  4472. //
  4473. // The context must be non-nil and will be used for request cancellation. If
  4474. // the context is nil a panic will occur. In the future the SDK may create
  4475. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4476. // for more information on using Contexts.
  4477. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  4478. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4479. req.SetContext(ctx)
  4480. req.ApplyOptions(opts...)
  4481. return out, req.Send()
  4482. }
  4483. const opPutBucketAcl = "PutBucketAcl"
  4484. // PutBucketAclRequest generates a "aws/request.Request" representing the
  4485. // client's request for the PutBucketAcl operation. The "output" return
  4486. // value will be populated with the request's response once the request completes
  4487. // successfully.
  4488. //
  4489. // Use "Send" method on the returned Request to send the API call to the service.
  4490. // the "output" return value is not valid until after Send returns without error.
  4491. //
  4492. // See PutBucketAcl for more information on using the PutBucketAcl
  4493. // API call, and error handling.
  4494. //
  4495. // This method is useful when you want to inject custom logic or configuration
  4496. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4497. //
  4498. //
  4499. // // Example sending a request using the PutBucketAclRequest method.
  4500. // req, resp := client.PutBucketAclRequest(params)
  4501. //
  4502. // err := req.Send()
  4503. // if err == nil { // resp is now filled
  4504. // fmt.Println(resp)
  4505. // }
  4506. //
  4507. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4508. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4509. op := &request.Operation{
  4510. Name: opPutBucketAcl,
  4511. HTTPMethod: "PUT",
  4512. HTTPPath: "/{Bucket}?acl",
  4513. }
  4514. if input == nil {
  4515. input = &PutBucketAclInput{}
  4516. }
  4517. output = &PutBucketAclOutput{}
  4518. req = c.newRequest(op, input, output)
  4519. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4520. return
  4521. }
  4522. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4523. //
  4524. // Sets the permissions on a bucket using access control lists (ACL).
  4525. //
  4526. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4527. // with awserr.Error's Code and Message methods to get detailed information about
  4528. // the error.
  4529. //
  4530. // See the AWS API reference guide for Amazon Simple Storage Service's
  4531. // API operation PutBucketAcl for usage and error information.
  4532. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4533. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4534. req, out := c.PutBucketAclRequest(input)
  4535. return out, req.Send()
  4536. }
  4537. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4538. // the ability to pass a context and additional request options.
  4539. //
  4540. // See PutBucketAcl for details on how to use this API operation.
  4541. //
  4542. // The context must be non-nil and will be used for request cancellation. If
  4543. // the context is nil a panic will occur. In the future the SDK may create
  4544. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4545. // for more information on using Contexts.
  4546. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4547. req, out := c.PutBucketAclRequest(input)
  4548. req.SetContext(ctx)
  4549. req.ApplyOptions(opts...)
  4550. return out, req.Send()
  4551. }
  4552. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4553. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4554. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4555. // value will be populated with the request's response once the request completes
  4556. // successfully.
  4557. //
  4558. // Use "Send" method on the returned Request to send the API call to the service.
  4559. // the "output" return value is not valid until after Send returns without error.
  4560. //
  4561. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  4562. // API call, and error handling.
  4563. //
  4564. // This method is useful when you want to inject custom logic or configuration
  4565. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4566. //
  4567. //
  4568. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4569. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4570. //
  4571. // err := req.Send()
  4572. // if err == nil { // resp is now filled
  4573. // fmt.Println(resp)
  4574. // }
  4575. //
  4576. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4577. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4578. op := &request.Operation{
  4579. Name: opPutBucketAnalyticsConfiguration,
  4580. HTTPMethod: "PUT",
  4581. HTTPPath: "/{Bucket}?analytics",
  4582. }
  4583. if input == nil {
  4584. input = &PutBucketAnalyticsConfigurationInput{}
  4585. }
  4586. output = &PutBucketAnalyticsConfigurationOutput{}
  4587. req = c.newRequest(op, input, output)
  4588. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4589. return
  4590. }
  4591. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4592. //
  4593. // Sets an analytics configuration for the bucket (specified by the analytics
  4594. // configuration ID).
  4595. //
  4596. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4597. // with awserr.Error's Code and Message methods to get detailed information about
  4598. // the error.
  4599. //
  4600. // See the AWS API reference guide for Amazon Simple Storage Service's
  4601. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4602. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4603. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4604. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4605. return out, req.Send()
  4606. }
  4607. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4608. // the ability to pass a context and additional request options.
  4609. //
  4610. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4611. //
  4612. // The context must be non-nil and will be used for request cancellation. If
  4613. // the context is nil a panic will occur. In the future the SDK may create
  4614. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4615. // for more information on using Contexts.
  4616. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4617. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4618. req.SetContext(ctx)
  4619. req.ApplyOptions(opts...)
  4620. return out, req.Send()
  4621. }
  4622. const opPutBucketCors = "PutBucketCors"
  4623. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4624. // client's request for the PutBucketCors operation. The "output" return
  4625. // value will be populated with the request's response once the request completes
  4626. // successfully.
  4627. //
  4628. // Use "Send" method on the returned Request to send the API call to the service.
  4629. // the "output" return value is not valid until after Send returns without error.
  4630. //
  4631. // See PutBucketCors for more information on using the PutBucketCors
  4632. // API call, and error handling.
  4633. //
  4634. // This method is useful when you want to inject custom logic or configuration
  4635. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4636. //
  4637. //
  4638. // // Example sending a request using the PutBucketCorsRequest method.
  4639. // req, resp := client.PutBucketCorsRequest(params)
  4640. //
  4641. // err := req.Send()
  4642. // if err == nil { // resp is now filled
  4643. // fmt.Println(resp)
  4644. // }
  4645. //
  4646. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4647. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4648. op := &request.Operation{
  4649. Name: opPutBucketCors,
  4650. HTTPMethod: "PUT",
  4651. HTTPPath: "/{Bucket}?cors",
  4652. }
  4653. if input == nil {
  4654. input = &PutBucketCorsInput{}
  4655. }
  4656. output = &PutBucketCorsOutput{}
  4657. req = c.newRequest(op, input, output)
  4658. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4659. return
  4660. }
  4661. // PutBucketCors API operation for Amazon Simple Storage Service.
  4662. //
  4663. // Sets the CORS configuration for a bucket.
  4664. //
  4665. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4666. // with awserr.Error's Code and Message methods to get detailed information about
  4667. // the error.
  4668. //
  4669. // See the AWS API reference guide for Amazon Simple Storage Service's
  4670. // API operation PutBucketCors for usage and error information.
  4671. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4672. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4673. req, out := c.PutBucketCorsRequest(input)
  4674. return out, req.Send()
  4675. }
  4676. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4677. // the ability to pass a context and additional request options.
  4678. //
  4679. // See PutBucketCors for details on how to use this API operation.
  4680. //
  4681. // The context must be non-nil and will be used for request cancellation. If
  4682. // the context is nil a panic will occur. In the future the SDK may create
  4683. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4684. // for more information on using Contexts.
  4685. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4686. req, out := c.PutBucketCorsRequest(input)
  4687. req.SetContext(ctx)
  4688. req.ApplyOptions(opts...)
  4689. return out, req.Send()
  4690. }
  4691. const opPutBucketEncryption = "PutBucketEncryption"
  4692. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  4693. // client's request for the PutBucketEncryption operation. The "output" return
  4694. // value will be populated with the request's response once the request completes
  4695. // successfully.
  4696. //
  4697. // Use "Send" method on the returned Request to send the API call to the service.
  4698. // the "output" return value is not valid until after Send returns without error.
  4699. //
  4700. // See PutBucketEncryption for more information on using the PutBucketEncryption
  4701. // API call, and error handling.
  4702. //
  4703. // This method is useful when you want to inject custom logic or configuration
  4704. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4705. //
  4706. //
  4707. // // Example sending a request using the PutBucketEncryptionRequest method.
  4708. // req, resp := client.PutBucketEncryptionRequest(params)
  4709. //
  4710. // err := req.Send()
  4711. // if err == nil { // resp is now filled
  4712. // fmt.Println(resp)
  4713. // }
  4714. //
  4715. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4716. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  4717. op := &request.Operation{
  4718. Name: opPutBucketEncryption,
  4719. HTTPMethod: "PUT",
  4720. HTTPPath: "/{Bucket}?encryption",
  4721. }
  4722. if input == nil {
  4723. input = &PutBucketEncryptionInput{}
  4724. }
  4725. output = &PutBucketEncryptionOutput{}
  4726. req = c.newRequest(op, input, output)
  4727. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4728. return
  4729. }
  4730. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  4731. //
  4732. // Creates a new server-side encryption configuration (or replaces an existing
  4733. // one, if present).
  4734. //
  4735. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4736. // with awserr.Error's Code and Message methods to get detailed information about
  4737. // the error.
  4738. //
  4739. // See the AWS API reference guide for Amazon Simple Storage Service's
  4740. // API operation PutBucketEncryption for usage and error information.
  4741. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4742. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  4743. req, out := c.PutBucketEncryptionRequest(input)
  4744. return out, req.Send()
  4745. }
  4746. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  4747. // the ability to pass a context and additional request options.
  4748. //
  4749. // See PutBucketEncryption for details on how to use this API operation.
  4750. //
  4751. // The context must be non-nil and will be used for request cancellation. If
  4752. // the context is nil a panic will occur. In the future the SDK may create
  4753. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4754. // for more information on using Contexts.
  4755. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  4756. req, out := c.PutBucketEncryptionRequest(input)
  4757. req.SetContext(ctx)
  4758. req.ApplyOptions(opts...)
  4759. return out, req.Send()
  4760. }
  4761. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4762. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4763. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4764. // value will be populated with the request's response once the request completes
  4765. // successfully.
  4766. //
  4767. // Use "Send" method on the returned Request to send the API call to the service.
  4768. // the "output" return value is not valid until after Send returns without error.
  4769. //
  4770. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  4771. // API call, and error handling.
  4772. //
  4773. // This method is useful when you want to inject custom logic or configuration
  4774. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4775. //
  4776. //
  4777. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4778. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4779. //
  4780. // err := req.Send()
  4781. // if err == nil { // resp is now filled
  4782. // fmt.Println(resp)
  4783. // }
  4784. //
  4785. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4786. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4787. op := &request.Operation{
  4788. Name: opPutBucketInventoryConfiguration,
  4789. HTTPMethod: "PUT",
  4790. HTTPPath: "/{Bucket}?inventory",
  4791. }
  4792. if input == nil {
  4793. input = &PutBucketInventoryConfigurationInput{}
  4794. }
  4795. output = &PutBucketInventoryConfigurationOutput{}
  4796. req = c.newRequest(op, input, output)
  4797. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4798. return
  4799. }
  4800. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4801. //
  4802. // Adds an inventory configuration (identified by the inventory ID) from the
  4803. // bucket.
  4804. //
  4805. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4806. // with awserr.Error's Code and Message methods to get detailed information about
  4807. // the error.
  4808. //
  4809. // See the AWS API reference guide for Amazon Simple Storage Service's
  4810. // API operation PutBucketInventoryConfiguration for usage and error information.
  4811. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4812. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4813. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4814. return out, req.Send()
  4815. }
  4816. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4817. // the ability to pass a context and additional request options.
  4818. //
  4819. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4820. //
  4821. // The context must be non-nil and will be used for request cancellation. If
  4822. // the context is nil a panic will occur. In the future the SDK may create
  4823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4824. // for more information on using Contexts.
  4825. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4826. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4827. req.SetContext(ctx)
  4828. req.ApplyOptions(opts...)
  4829. return out, req.Send()
  4830. }
  4831. const opPutBucketLifecycle = "PutBucketLifecycle"
  4832. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4833. // client's request for the PutBucketLifecycle operation. The "output" return
  4834. // value will be populated with the request's response once the request completes
  4835. // successfully.
  4836. //
  4837. // Use "Send" method on the returned Request to send the API call to the service.
  4838. // the "output" return value is not valid until after Send returns without error.
  4839. //
  4840. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  4841. // API call, and error handling.
  4842. //
  4843. // This method is useful when you want to inject custom logic or configuration
  4844. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4845. //
  4846. //
  4847. // // Example sending a request using the PutBucketLifecycleRequest method.
  4848. // req, resp := client.PutBucketLifecycleRequest(params)
  4849. //
  4850. // err := req.Send()
  4851. // if err == nil { // resp is now filled
  4852. // fmt.Println(resp)
  4853. // }
  4854. //
  4855. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4856. //
  4857. // Deprecated: PutBucketLifecycle has been deprecated
  4858. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4859. if c.Client.Config.Logger != nil {
  4860. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4861. }
  4862. op := &request.Operation{
  4863. Name: opPutBucketLifecycle,
  4864. HTTPMethod: "PUT",
  4865. HTTPPath: "/{Bucket}?lifecycle",
  4866. }
  4867. if input == nil {
  4868. input = &PutBucketLifecycleInput{}
  4869. }
  4870. output = &PutBucketLifecycleOutput{}
  4871. req = c.newRequest(op, input, output)
  4872. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4873. return
  4874. }
  4875. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4876. //
  4877. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4878. //
  4879. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4880. // with awserr.Error's Code and Message methods to get detailed information about
  4881. // the error.
  4882. //
  4883. // See the AWS API reference guide for Amazon Simple Storage Service's
  4884. // API operation PutBucketLifecycle for usage and error information.
  4885. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4886. //
  4887. // Deprecated: PutBucketLifecycle has been deprecated
  4888. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4889. req, out := c.PutBucketLifecycleRequest(input)
  4890. return out, req.Send()
  4891. }
  4892. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4893. // the ability to pass a context and additional request options.
  4894. //
  4895. // See PutBucketLifecycle for details on how to use this API operation.
  4896. //
  4897. // The context must be non-nil and will be used for request cancellation. If
  4898. // the context is nil a panic will occur. In the future the SDK may create
  4899. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4900. // for more information on using Contexts.
  4901. //
  4902. // Deprecated: PutBucketLifecycleWithContext has been deprecated
  4903. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4904. req, out := c.PutBucketLifecycleRequest(input)
  4905. req.SetContext(ctx)
  4906. req.ApplyOptions(opts...)
  4907. return out, req.Send()
  4908. }
  4909. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4910. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4911. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4912. // value will be populated with the request's response once the request completes
  4913. // successfully.
  4914. //
  4915. // Use "Send" method on the returned Request to send the API call to the service.
  4916. // the "output" return value is not valid until after Send returns without error.
  4917. //
  4918. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  4919. // API call, and error handling.
  4920. //
  4921. // This method is useful when you want to inject custom logic or configuration
  4922. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4923. //
  4924. //
  4925. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4926. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4927. //
  4928. // err := req.Send()
  4929. // if err == nil { // resp is now filled
  4930. // fmt.Println(resp)
  4931. // }
  4932. //
  4933. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4934. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4935. op := &request.Operation{
  4936. Name: opPutBucketLifecycleConfiguration,
  4937. HTTPMethod: "PUT",
  4938. HTTPPath: "/{Bucket}?lifecycle",
  4939. }
  4940. if input == nil {
  4941. input = &PutBucketLifecycleConfigurationInput{}
  4942. }
  4943. output = &PutBucketLifecycleConfigurationOutput{}
  4944. req = c.newRequest(op, input, output)
  4945. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  4946. return
  4947. }
  4948. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4949. //
  4950. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4951. // exists, it replaces it.
  4952. //
  4953. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4954. // with awserr.Error's Code and Message methods to get detailed information about
  4955. // the error.
  4956. //
  4957. // See the AWS API reference guide for Amazon Simple Storage Service's
  4958. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4959. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4960. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4961. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4962. return out, req.Send()
  4963. }
  4964. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4965. // the ability to pass a context and additional request options.
  4966. //
  4967. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4968. //
  4969. // The context must be non-nil and will be used for request cancellation. If
  4970. // the context is nil a panic will occur. In the future the SDK may create
  4971. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4972. // for more information on using Contexts.
  4973. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4974. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4975. req.SetContext(ctx)
  4976. req.ApplyOptions(opts...)
  4977. return out, req.Send()
  4978. }
  4979. const opPutBucketLogging = "PutBucketLogging"
  4980. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4981. // client's request for the PutBucketLogging operation. The "output" return
  4982. // value will be populated with the request's response once the request completes
  4983. // successfully.
  4984. //
  4985. // Use "Send" method on the returned Request to send the API call to the service.
  4986. // the "output" return value is not valid until after Send returns without error.
  4987. //
  4988. // See PutBucketLogging for more information on using the PutBucketLogging
  4989. // API call, and error handling.
  4990. //
  4991. // This method is useful when you want to inject custom logic or configuration
  4992. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4993. //
  4994. //
  4995. // // Example sending a request using the PutBucketLoggingRequest method.
  4996. // req, resp := client.PutBucketLoggingRequest(params)
  4997. //
  4998. // err := req.Send()
  4999. // if err == nil { // resp is now filled
  5000. // fmt.Println(resp)
  5001. // }
  5002. //
  5003. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  5004. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  5005. op := &request.Operation{
  5006. Name: opPutBucketLogging,
  5007. HTTPMethod: "PUT",
  5008. HTTPPath: "/{Bucket}?logging",
  5009. }
  5010. if input == nil {
  5011. input = &PutBucketLoggingInput{}
  5012. }
  5013. output = &PutBucketLoggingOutput{}
  5014. req = c.newRequest(op, input, output)
  5015. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5016. return
  5017. }
  5018. // PutBucketLogging API operation for Amazon Simple Storage Service.
  5019. //
  5020. // Set the logging parameters for a bucket and to specify permissions for who
  5021. // can view and modify the logging parameters. To set the logging status of
  5022. // a bucket, you must be the bucket owner.
  5023. //
  5024. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5025. // with awserr.Error's Code and Message methods to get detailed information about
  5026. // the error.
  5027. //
  5028. // See the AWS API reference guide for Amazon Simple Storage Service's
  5029. // API operation PutBucketLogging for usage and error information.
  5030. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  5031. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  5032. req, out := c.PutBucketLoggingRequest(input)
  5033. return out, req.Send()
  5034. }
  5035. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  5036. // the ability to pass a context and additional request options.
  5037. //
  5038. // See PutBucketLogging for details on how to use this API operation.
  5039. //
  5040. // The context must be non-nil and will be used for request cancellation. If
  5041. // the context is nil a panic will occur. In the future the SDK may create
  5042. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5043. // for more information on using Contexts.
  5044. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  5045. req, out := c.PutBucketLoggingRequest(input)
  5046. req.SetContext(ctx)
  5047. req.ApplyOptions(opts...)
  5048. return out, req.Send()
  5049. }
  5050. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  5051. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  5052. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  5053. // value will be populated with the request's response once the request completes
  5054. // successfully.
  5055. //
  5056. // Use "Send" method on the returned Request to send the API call to the service.
  5057. // the "output" return value is not valid until after Send returns without error.
  5058. //
  5059. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  5060. // API call, and error handling.
  5061. //
  5062. // This method is useful when you want to inject custom logic or configuration
  5063. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5064. //
  5065. //
  5066. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  5067. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  5068. //
  5069. // err := req.Send()
  5070. // if err == nil { // resp is now filled
  5071. // fmt.Println(resp)
  5072. // }
  5073. //
  5074. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  5075. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  5076. op := &request.Operation{
  5077. Name: opPutBucketMetricsConfiguration,
  5078. HTTPMethod: "PUT",
  5079. HTTPPath: "/{Bucket}?metrics",
  5080. }
  5081. if input == nil {
  5082. input = &PutBucketMetricsConfigurationInput{}
  5083. }
  5084. output = &PutBucketMetricsConfigurationOutput{}
  5085. req = c.newRequest(op, input, output)
  5086. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5087. return
  5088. }
  5089. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  5090. //
  5091. // Sets a metrics configuration (specified by the metrics configuration ID)
  5092. // for the bucket.
  5093. //
  5094. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5095. // with awserr.Error's Code and Message methods to get detailed information about
  5096. // the error.
  5097. //
  5098. // See the AWS API reference guide for Amazon Simple Storage Service's
  5099. // API operation PutBucketMetricsConfiguration for usage and error information.
  5100. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  5101. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  5102. req, out := c.PutBucketMetricsConfigurationRequest(input)
  5103. return out, req.Send()
  5104. }
  5105. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  5106. // the ability to pass a context and additional request options.
  5107. //
  5108. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  5109. //
  5110. // The context must be non-nil and will be used for request cancellation. If
  5111. // the context is nil a panic will occur. In the future the SDK may create
  5112. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5113. // for more information on using Contexts.
  5114. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  5115. req, out := c.PutBucketMetricsConfigurationRequest(input)
  5116. req.SetContext(ctx)
  5117. req.ApplyOptions(opts...)
  5118. return out, req.Send()
  5119. }
  5120. const opPutBucketNotification = "PutBucketNotification"
  5121. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  5122. // client's request for the PutBucketNotification operation. The "output" return
  5123. // value will be populated with the request's response once the request completes
  5124. // successfully.
  5125. //
  5126. // Use "Send" method on the returned Request to send the API call to the service.
  5127. // the "output" return value is not valid until after Send returns without error.
  5128. //
  5129. // See PutBucketNotification for more information on using the PutBucketNotification
  5130. // API call, and error handling.
  5131. //
  5132. // This method is useful when you want to inject custom logic or configuration
  5133. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5134. //
  5135. //
  5136. // // Example sending a request using the PutBucketNotificationRequest method.
  5137. // req, resp := client.PutBucketNotificationRequest(params)
  5138. //
  5139. // err := req.Send()
  5140. // if err == nil { // resp is now filled
  5141. // fmt.Println(resp)
  5142. // }
  5143. //
  5144. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  5145. //
  5146. // Deprecated: PutBucketNotification has been deprecated
  5147. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  5148. if c.Client.Config.Logger != nil {
  5149. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  5150. }
  5151. op := &request.Operation{
  5152. Name: opPutBucketNotification,
  5153. HTTPMethod: "PUT",
  5154. HTTPPath: "/{Bucket}?notification",
  5155. }
  5156. if input == nil {
  5157. input = &PutBucketNotificationInput{}
  5158. }
  5159. output = &PutBucketNotificationOutput{}
  5160. req = c.newRequest(op, input, output)
  5161. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5162. return
  5163. }
  5164. // PutBucketNotification API operation for Amazon Simple Storage Service.
  5165. //
  5166. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  5167. //
  5168. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5169. // with awserr.Error's Code and Message methods to get detailed information about
  5170. // the error.
  5171. //
  5172. // See the AWS API reference guide for Amazon Simple Storage Service's
  5173. // API operation PutBucketNotification for usage and error information.
  5174. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  5175. //
  5176. // Deprecated: PutBucketNotification has been deprecated
  5177. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  5178. req, out := c.PutBucketNotificationRequest(input)
  5179. return out, req.Send()
  5180. }
  5181. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  5182. // the ability to pass a context and additional request options.
  5183. //
  5184. // See PutBucketNotification for details on how to use this API operation.
  5185. //
  5186. // The context must be non-nil and will be used for request cancellation. If
  5187. // the context is nil a panic will occur. In the future the SDK may create
  5188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5189. // for more information on using Contexts.
  5190. //
  5191. // Deprecated: PutBucketNotificationWithContext has been deprecated
  5192. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  5193. req, out := c.PutBucketNotificationRequest(input)
  5194. req.SetContext(ctx)
  5195. req.ApplyOptions(opts...)
  5196. return out, req.Send()
  5197. }
  5198. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  5199. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  5200. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  5201. // value will be populated with the request's response once the request completes
  5202. // successfully.
  5203. //
  5204. // Use "Send" method on the returned Request to send the API call to the service.
  5205. // the "output" return value is not valid until after Send returns without error.
  5206. //
  5207. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  5208. // API call, and error handling.
  5209. //
  5210. // This method is useful when you want to inject custom logic or configuration
  5211. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5212. //
  5213. //
  5214. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  5215. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  5216. //
  5217. // err := req.Send()
  5218. // if err == nil { // resp is now filled
  5219. // fmt.Println(resp)
  5220. // }
  5221. //
  5222. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  5223. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  5224. op := &request.Operation{
  5225. Name: opPutBucketNotificationConfiguration,
  5226. HTTPMethod: "PUT",
  5227. HTTPPath: "/{Bucket}?notification",
  5228. }
  5229. if input == nil {
  5230. input = &PutBucketNotificationConfigurationInput{}
  5231. }
  5232. output = &PutBucketNotificationConfigurationOutput{}
  5233. req = c.newRequest(op, input, output)
  5234. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5235. return
  5236. }
  5237. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  5238. //
  5239. // Enables notifications of specified events for a bucket.
  5240. //
  5241. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5242. // with awserr.Error's Code and Message methods to get detailed information about
  5243. // the error.
  5244. //
  5245. // See the AWS API reference guide for Amazon Simple Storage Service's
  5246. // API operation PutBucketNotificationConfiguration for usage and error information.
  5247. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  5248. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  5249. req, out := c.PutBucketNotificationConfigurationRequest(input)
  5250. return out, req.Send()
  5251. }
  5252. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  5253. // the ability to pass a context and additional request options.
  5254. //
  5255. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  5256. //
  5257. // The context must be non-nil and will be used for request cancellation. If
  5258. // the context is nil a panic will occur. In the future the SDK may create
  5259. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5260. // for more information on using Contexts.
  5261. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  5262. req, out := c.PutBucketNotificationConfigurationRequest(input)
  5263. req.SetContext(ctx)
  5264. req.ApplyOptions(opts...)
  5265. return out, req.Send()
  5266. }
  5267. const opPutBucketPolicy = "PutBucketPolicy"
  5268. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  5269. // client's request for the PutBucketPolicy operation. The "output" return
  5270. // value will be populated with the request's response once the request completes
  5271. // successfully.
  5272. //
  5273. // Use "Send" method on the returned Request to send the API call to the service.
  5274. // the "output" return value is not valid until after Send returns without error.
  5275. //
  5276. // See PutBucketPolicy for more information on using the PutBucketPolicy
  5277. // API call, and error handling.
  5278. //
  5279. // This method is useful when you want to inject custom logic or configuration
  5280. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5281. //
  5282. //
  5283. // // Example sending a request using the PutBucketPolicyRequest method.
  5284. // req, resp := client.PutBucketPolicyRequest(params)
  5285. //
  5286. // err := req.Send()
  5287. // if err == nil { // resp is now filled
  5288. // fmt.Println(resp)
  5289. // }
  5290. //
  5291. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  5292. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  5293. op := &request.Operation{
  5294. Name: opPutBucketPolicy,
  5295. HTTPMethod: "PUT",
  5296. HTTPPath: "/{Bucket}?policy",
  5297. }
  5298. if input == nil {
  5299. input = &PutBucketPolicyInput{}
  5300. }
  5301. output = &PutBucketPolicyOutput{}
  5302. req = c.newRequest(op, input, output)
  5303. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5304. return
  5305. }
  5306. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  5307. //
  5308. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  5309. // in this request completely replaces it.
  5310. //
  5311. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5312. // with awserr.Error's Code and Message methods to get detailed information about
  5313. // the error.
  5314. //
  5315. // See the AWS API reference guide for Amazon Simple Storage Service's
  5316. // API operation PutBucketPolicy for usage and error information.
  5317. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  5318. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  5319. req, out := c.PutBucketPolicyRequest(input)
  5320. return out, req.Send()
  5321. }
  5322. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  5323. // the ability to pass a context and additional request options.
  5324. //
  5325. // See PutBucketPolicy for details on how to use this API operation.
  5326. //
  5327. // The context must be non-nil and will be used for request cancellation. If
  5328. // the context is nil a panic will occur. In the future the SDK may create
  5329. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5330. // for more information on using Contexts.
  5331. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  5332. req, out := c.PutBucketPolicyRequest(input)
  5333. req.SetContext(ctx)
  5334. req.ApplyOptions(opts...)
  5335. return out, req.Send()
  5336. }
  5337. const opPutBucketReplication = "PutBucketReplication"
  5338. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  5339. // client's request for the PutBucketReplication operation. The "output" return
  5340. // value will be populated with the request's response once the request completes
  5341. // successfully.
  5342. //
  5343. // Use "Send" method on the returned Request to send the API call to the service.
  5344. // the "output" return value is not valid until after Send returns without error.
  5345. //
  5346. // See PutBucketReplication for more information on using the PutBucketReplication
  5347. // API call, and error handling.
  5348. //
  5349. // This method is useful when you want to inject custom logic or configuration
  5350. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5351. //
  5352. //
  5353. // // Example sending a request using the PutBucketReplicationRequest method.
  5354. // req, resp := client.PutBucketReplicationRequest(params)
  5355. //
  5356. // err := req.Send()
  5357. // if err == nil { // resp is now filled
  5358. // fmt.Println(resp)
  5359. // }
  5360. //
  5361. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  5362. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  5363. op := &request.Operation{
  5364. Name: opPutBucketReplication,
  5365. HTTPMethod: "PUT",
  5366. HTTPPath: "/{Bucket}?replication",
  5367. }
  5368. if input == nil {
  5369. input = &PutBucketReplicationInput{}
  5370. }
  5371. output = &PutBucketReplicationOutput{}
  5372. req = c.newRequest(op, input, output)
  5373. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5374. return
  5375. }
  5376. // PutBucketReplication API operation for Amazon Simple Storage Service.
  5377. //
  5378. // Creates a replication configuration or replaces an existing one. For more
  5379. // information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  5380. // in the Amazon S3 Developer Guide.
  5381. //
  5382. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5383. // with awserr.Error's Code and Message methods to get detailed information about
  5384. // the error.
  5385. //
  5386. // See the AWS API reference guide for Amazon Simple Storage Service's
  5387. // API operation PutBucketReplication for usage and error information.
  5388. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  5389. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  5390. req, out := c.PutBucketReplicationRequest(input)
  5391. return out, req.Send()
  5392. }
  5393. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  5394. // the ability to pass a context and additional request options.
  5395. //
  5396. // See PutBucketReplication for details on how to use this API operation.
  5397. //
  5398. // The context must be non-nil and will be used for request cancellation. If
  5399. // the context is nil a panic will occur. In the future the SDK may create
  5400. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5401. // for more information on using Contexts.
  5402. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  5403. req, out := c.PutBucketReplicationRequest(input)
  5404. req.SetContext(ctx)
  5405. req.ApplyOptions(opts...)
  5406. return out, req.Send()
  5407. }
  5408. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  5409. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  5410. // client's request for the PutBucketRequestPayment operation. The "output" return
  5411. // value will be populated with the request's response once the request completes
  5412. // successfully.
  5413. //
  5414. // Use "Send" method on the returned Request to send the API call to the service.
  5415. // the "output" return value is not valid until after Send returns without error.
  5416. //
  5417. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  5418. // API call, and error handling.
  5419. //
  5420. // This method is useful when you want to inject custom logic or configuration
  5421. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5422. //
  5423. //
  5424. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  5425. // req, resp := client.PutBucketRequestPaymentRequest(params)
  5426. //
  5427. // err := req.Send()
  5428. // if err == nil { // resp is now filled
  5429. // fmt.Println(resp)
  5430. // }
  5431. //
  5432. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5433. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  5434. op := &request.Operation{
  5435. Name: opPutBucketRequestPayment,
  5436. HTTPMethod: "PUT",
  5437. HTTPPath: "/{Bucket}?requestPayment",
  5438. }
  5439. if input == nil {
  5440. input = &PutBucketRequestPaymentInput{}
  5441. }
  5442. output = &PutBucketRequestPaymentOutput{}
  5443. req = c.newRequest(op, input, output)
  5444. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5445. return
  5446. }
  5447. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  5448. //
  5449. // Sets the request payment configuration for a bucket. By default, the bucket
  5450. // owner pays for downloads from the bucket. This configuration parameter enables
  5451. // the bucket owner (only) to specify that the person requesting the download
  5452. // will be charged for the download. Documentation on requester pays buckets
  5453. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  5454. //
  5455. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5456. // with awserr.Error's Code and Message methods to get detailed information about
  5457. // the error.
  5458. //
  5459. // See the AWS API reference guide for Amazon Simple Storage Service's
  5460. // API operation PutBucketRequestPayment for usage and error information.
  5461. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5462. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  5463. req, out := c.PutBucketRequestPaymentRequest(input)
  5464. return out, req.Send()
  5465. }
  5466. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  5467. // the ability to pass a context and additional request options.
  5468. //
  5469. // See PutBucketRequestPayment for details on how to use this API operation.
  5470. //
  5471. // The context must be non-nil and will be used for request cancellation. If
  5472. // the context is nil a panic will occur. In the future the SDK may create
  5473. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5474. // for more information on using Contexts.
  5475. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  5476. req, out := c.PutBucketRequestPaymentRequest(input)
  5477. req.SetContext(ctx)
  5478. req.ApplyOptions(opts...)
  5479. return out, req.Send()
  5480. }
  5481. const opPutBucketTagging = "PutBucketTagging"
  5482. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  5483. // client's request for the PutBucketTagging operation. The "output" return
  5484. // value will be populated with the request's response once the request completes
  5485. // successfully.
  5486. //
  5487. // Use "Send" method on the returned Request to send the API call to the service.
  5488. // the "output" return value is not valid until after Send returns without error.
  5489. //
  5490. // See PutBucketTagging for more information on using the PutBucketTagging
  5491. // API call, and error handling.
  5492. //
  5493. // This method is useful when you want to inject custom logic or configuration
  5494. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5495. //
  5496. //
  5497. // // Example sending a request using the PutBucketTaggingRequest method.
  5498. // req, resp := client.PutBucketTaggingRequest(params)
  5499. //
  5500. // err := req.Send()
  5501. // if err == nil { // resp is now filled
  5502. // fmt.Println(resp)
  5503. // }
  5504. //
  5505. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5506. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  5507. op := &request.Operation{
  5508. Name: opPutBucketTagging,
  5509. HTTPMethod: "PUT",
  5510. HTTPPath: "/{Bucket}?tagging",
  5511. }
  5512. if input == nil {
  5513. input = &PutBucketTaggingInput{}
  5514. }
  5515. output = &PutBucketTaggingOutput{}
  5516. req = c.newRequest(op, input, output)
  5517. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5518. return
  5519. }
  5520. // PutBucketTagging API operation for Amazon Simple Storage Service.
  5521. //
  5522. // Sets the tags for a bucket.
  5523. //
  5524. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5525. // with awserr.Error's Code and Message methods to get detailed information about
  5526. // the error.
  5527. //
  5528. // See the AWS API reference guide for Amazon Simple Storage Service's
  5529. // API operation PutBucketTagging for usage and error information.
  5530. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5531. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  5532. req, out := c.PutBucketTaggingRequest(input)
  5533. return out, req.Send()
  5534. }
  5535. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  5536. // the ability to pass a context and additional request options.
  5537. //
  5538. // See PutBucketTagging for details on how to use this API operation.
  5539. //
  5540. // The context must be non-nil and will be used for request cancellation. If
  5541. // the context is nil a panic will occur. In the future the SDK may create
  5542. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5543. // for more information on using Contexts.
  5544. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  5545. req, out := c.PutBucketTaggingRequest(input)
  5546. req.SetContext(ctx)
  5547. req.ApplyOptions(opts...)
  5548. return out, req.Send()
  5549. }
  5550. const opPutBucketVersioning = "PutBucketVersioning"
  5551. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  5552. // client's request for the PutBucketVersioning operation. The "output" return
  5553. // value will be populated with the request's response once the request completes
  5554. // successfully.
  5555. //
  5556. // Use "Send" method on the returned Request to send the API call to the service.
  5557. // the "output" return value is not valid until after Send returns without error.
  5558. //
  5559. // See PutBucketVersioning for more information on using the PutBucketVersioning
  5560. // API call, and error handling.
  5561. //
  5562. // This method is useful when you want to inject custom logic or configuration
  5563. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5564. //
  5565. //
  5566. // // Example sending a request using the PutBucketVersioningRequest method.
  5567. // req, resp := client.PutBucketVersioningRequest(params)
  5568. //
  5569. // err := req.Send()
  5570. // if err == nil { // resp is now filled
  5571. // fmt.Println(resp)
  5572. // }
  5573. //
  5574. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5575. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5576. op := &request.Operation{
  5577. Name: opPutBucketVersioning,
  5578. HTTPMethod: "PUT",
  5579. HTTPPath: "/{Bucket}?versioning",
  5580. }
  5581. if input == nil {
  5582. input = &PutBucketVersioningInput{}
  5583. }
  5584. output = &PutBucketVersioningOutput{}
  5585. req = c.newRequest(op, input, output)
  5586. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5587. return
  5588. }
  5589. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5590. //
  5591. // Sets the versioning state of an existing bucket. To set the versioning state,
  5592. // you must be the bucket owner.
  5593. //
  5594. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5595. // with awserr.Error's Code and Message methods to get detailed information about
  5596. // the error.
  5597. //
  5598. // See the AWS API reference guide for Amazon Simple Storage Service's
  5599. // API operation PutBucketVersioning for usage and error information.
  5600. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5601. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5602. req, out := c.PutBucketVersioningRequest(input)
  5603. return out, req.Send()
  5604. }
  5605. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5606. // the ability to pass a context and additional request options.
  5607. //
  5608. // See PutBucketVersioning for details on how to use this API operation.
  5609. //
  5610. // The context must be non-nil and will be used for request cancellation. If
  5611. // the context is nil a panic will occur. In the future the SDK may create
  5612. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5613. // for more information on using Contexts.
  5614. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5615. req, out := c.PutBucketVersioningRequest(input)
  5616. req.SetContext(ctx)
  5617. req.ApplyOptions(opts...)
  5618. return out, req.Send()
  5619. }
  5620. const opPutBucketWebsite = "PutBucketWebsite"
  5621. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5622. // client's request for the PutBucketWebsite operation. The "output" return
  5623. // value will be populated with the request's response once the request completes
  5624. // successfully.
  5625. //
  5626. // Use "Send" method on the returned Request to send the API call to the service.
  5627. // the "output" return value is not valid until after Send returns without error.
  5628. //
  5629. // See PutBucketWebsite for more information on using the PutBucketWebsite
  5630. // API call, and error handling.
  5631. //
  5632. // This method is useful when you want to inject custom logic or configuration
  5633. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5634. //
  5635. //
  5636. // // Example sending a request using the PutBucketWebsiteRequest method.
  5637. // req, resp := client.PutBucketWebsiteRequest(params)
  5638. //
  5639. // err := req.Send()
  5640. // if err == nil { // resp is now filled
  5641. // fmt.Println(resp)
  5642. // }
  5643. //
  5644. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5645. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5646. op := &request.Operation{
  5647. Name: opPutBucketWebsite,
  5648. HTTPMethod: "PUT",
  5649. HTTPPath: "/{Bucket}?website",
  5650. }
  5651. if input == nil {
  5652. input = &PutBucketWebsiteInput{}
  5653. }
  5654. output = &PutBucketWebsiteOutput{}
  5655. req = c.newRequest(op, input, output)
  5656. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  5657. return
  5658. }
  5659. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5660. //
  5661. // Set the website configuration for a bucket.
  5662. //
  5663. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5664. // with awserr.Error's Code and Message methods to get detailed information about
  5665. // the error.
  5666. //
  5667. // See the AWS API reference guide for Amazon Simple Storage Service's
  5668. // API operation PutBucketWebsite for usage and error information.
  5669. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5670. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5671. req, out := c.PutBucketWebsiteRequest(input)
  5672. return out, req.Send()
  5673. }
  5674. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5675. // the ability to pass a context and additional request options.
  5676. //
  5677. // See PutBucketWebsite for details on how to use this API operation.
  5678. //
  5679. // The context must be non-nil and will be used for request cancellation. If
  5680. // the context is nil a panic will occur. In the future the SDK may create
  5681. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5682. // for more information on using Contexts.
  5683. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5684. req, out := c.PutBucketWebsiteRequest(input)
  5685. req.SetContext(ctx)
  5686. req.ApplyOptions(opts...)
  5687. return out, req.Send()
  5688. }
  5689. const opPutObject = "PutObject"
  5690. // PutObjectRequest generates a "aws/request.Request" representing the
  5691. // client's request for the PutObject operation. The "output" return
  5692. // value will be populated with the request's response once the request completes
  5693. // successfully.
  5694. //
  5695. // Use "Send" method on the returned Request to send the API call to the service.
  5696. // the "output" return value is not valid until after Send returns without error.
  5697. //
  5698. // See PutObject for more information on using the PutObject
  5699. // API call, and error handling.
  5700. //
  5701. // This method is useful when you want to inject custom logic or configuration
  5702. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5703. //
  5704. //
  5705. // // Example sending a request using the PutObjectRequest method.
  5706. // req, resp := client.PutObjectRequest(params)
  5707. //
  5708. // err := req.Send()
  5709. // if err == nil { // resp is now filled
  5710. // fmt.Println(resp)
  5711. // }
  5712. //
  5713. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5714. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5715. op := &request.Operation{
  5716. Name: opPutObject,
  5717. HTTPMethod: "PUT",
  5718. HTTPPath: "/{Bucket}/{Key+}",
  5719. }
  5720. if input == nil {
  5721. input = &PutObjectInput{}
  5722. }
  5723. output = &PutObjectOutput{}
  5724. req = c.newRequest(op, input, output)
  5725. return
  5726. }
  5727. // PutObject API operation for Amazon Simple Storage Service.
  5728. //
  5729. // Adds an object to a bucket.
  5730. //
  5731. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5732. // with awserr.Error's Code and Message methods to get detailed information about
  5733. // the error.
  5734. //
  5735. // See the AWS API reference guide for Amazon Simple Storage Service's
  5736. // API operation PutObject for usage and error information.
  5737. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5738. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5739. req, out := c.PutObjectRequest(input)
  5740. return out, req.Send()
  5741. }
  5742. // PutObjectWithContext is the same as PutObject with the addition of
  5743. // the ability to pass a context and additional request options.
  5744. //
  5745. // See PutObject for details on how to use this API operation.
  5746. //
  5747. // The context must be non-nil and will be used for request cancellation. If
  5748. // the context is nil a panic will occur. In the future the SDK may create
  5749. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5750. // for more information on using Contexts.
  5751. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5752. req, out := c.PutObjectRequest(input)
  5753. req.SetContext(ctx)
  5754. req.ApplyOptions(opts...)
  5755. return out, req.Send()
  5756. }
  5757. const opPutObjectAcl = "PutObjectAcl"
  5758. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5759. // client's request for the PutObjectAcl operation. The "output" return
  5760. // value will be populated with the request's response once the request completes
  5761. // successfully.
  5762. //
  5763. // Use "Send" method on the returned Request to send the API call to the service.
  5764. // the "output" return value is not valid until after Send returns without error.
  5765. //
  5766. // See PutObjectAcl for more information on using the PutObjectAcl
  5767. // API call, and error handling.
  5768. //
  5769. // This method is useful when you want to inject custom logic or configuration
  5770. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5771. //
  5772. //
  5773. // // Example sending a request using the PutObjectAclRequest method.
  5774. // req, resp := client.PutObjectAclRequest(params)
  5775. //
  5776. // err := req.Send()
  5777. // if err == nil { // resp is now filled
  5778. // fmt.Println(resp)
  5779. // }
  5780. //
  5781. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5782. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5783. op := &request.Operation{
  5784. Name: opPutObjectAcl,
  5785. HTTPMethod: "PUT",
  5786. HTTPPath: "/{Bucket}/{Key+}?acl",
  5787. }
  5788. if input == nil {
  5789. input = &PutObjectAclInput{}
  5790. }
  5791. output = &PutObjectAclOutput{}
  5792. req = c.newRequest(op, input, output)
  5793. return
  5794. }
  5795. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5796. //
  5797. // uses the acl subresource to set the access control list (ACL) permissions
  5798. // for an object that already exists in a bucket
  5799. //
  5800. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5801. // with awserr.Error's Code and Message methods to get detailed information about
  5802. // the error.
  5803. //
  5804. // See the AWS API reference guide for Amazon Simple Storage Service's
  5805. // API operation PutObjectAcl for usage and error information.
  5806. //
  5807. // Returned Error Codes:
  5808. // * ErrCodeNoSuchKey "NoSuchKey"
  5809. // The specified key does not exist.
  5810. //
  5811. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5812. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5813. req, out := c.PutObjectAclRequest(input)
  5814. return out, req.Send()
  5815. }
  5816. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5817. // the ability to pass a context and additional request options.
  5818. //
  5819. // See PutObjectAcl for details on how to use this API operation.
  5820. //
  5821. // The context must be non-nil and will be used for request cancellation. If
  5822. // the context is nil a panic will occur. In the future the SDK may create
  5823. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5824. // for more information on using Contexts.
  5825. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5826. req, out := c.PutObjectAclRequest(input)
  5827. req.SetContext(ctx)
  5828. req.ApplyOptions(opts...)
  5829. return out, req.Send()
  5830. }
  5831. const opPutObjectLegalHold = "PutObjectLegalHold"
  5832. // PutObjectLegalHoldRequest generates a "aws/request.Request" representing the
  5833. // client's request for the PutObjectLegalHold operation. The "output" return
  5834. // value will be populated with the request's response once the request completes
  5835. // successfully.
  5836. //
  5837. // Use "Send" method on the returned Request to send the API call to the service.
  5838. // the "output" return value is not valid until after Send returns without error.
  5839. //
  5840. // See PutObjectLegalHold for more information on using the PutObjectLegalHold
  5841. // API call, and error handling.
  5842. //
  5843. // This method is useful when you want to inject custom logic or configuration
  5844. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5845. //
  5846. //
  5847. // // Example sending a request using the PutObjectLegalHoldRequest method.
  5848. // req, resp := client.PutObjectLegalHoldRequest(params)
  5849. //
  5850. // err := req.Send()
  5851. // if err == nil { // resp is now filled
  5852. // fmt.Println(resp)
  5853. // }
  5854. //
  5855. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  5856. func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) {
  5857. op := &request.Operation{
  5858. Name: opPutObjectLegalHold,
  5859. HTTPMethod: "PUT",
  5860. HTTPPath: "/{Bucket}/{Key+}?legal-hold",
  5861. }
  5862. if input == nil {
  5863. input = &PutObjectLegalHoldInput{}
  5864. }
  5865. output = &PutObjectLegalHoldOutput{}
  5866. req = c.newRequest(op, input, output)
  5867. return
  5868. }
  5869. // PutObjectLegalHold API operation for Amazon Simple Storage Service.
  5870. //
  5871. // Applies a Legal Hold configuration to the specified object.
  5872. //
  5873. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5874. // with awserr.Error's Code and Message methods to get detailed information about
  5875. // the error.
  5876. //
  5877. // See the AWS API reference guide for Amazon Simple Storage Service's
  5878. // API operation PutObjectLegalHold for usage and error information.
  5879. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
  5880. func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) {
  5881. req, out := c.PutObjectLegalHoldRequest(input)
  5882. return out, req.Send()
  5883. }
  5884. // PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of
  5885. // the ability to pass a context and additional request options.
  5886. //
  5887. // See PutObjectLegalHold for details on how to use this API operation.
  5888. //
  5889. // The context must be non-nil and will be used for request cancellation. If
  5890. // the context is nil a panic will occur. In the future the SDK may create
  5891. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5892. // for more information on using Contexts.
  5893. func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) {
  5894. req, out := c.PutObjectLegalHoldRequest(input)
  5895. req.SetContext(ctx)
  5896. req.ApplyOptions(opts...)
  5897. return out, req.Send()
  5898. }
  5899. const opPutObjectLockConfiguration = "PutObjectLockConfiguration"
  5900. // PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the
  5901. // client's request for the PutObjectLockConfiguration operation. The "output" return
  5902. // value will be populated with the request's response once the request completes
  5903. // successfully.
  5904. //
  5905. // Use "Send" method on the returned Request to send the API call to the service.
  5906. // the "output" return value is not valid until after Send returns without error.
  5907. //
  5908. // See PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration
  5909. // API call, and error handling.
  5910. //
  5911. // This method is useful when you want to inject custom logic or configuration
  5912. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5913. //
  5914. //
  5915. // // Example sending a request using the PutObjectLockConfigurationRequest method.
  5916. // req, resp := client.PutObjectLockConfigurationRequest(params)
  5917. //
  5918. // err := req.Send()
  5919. // if err == nil { // resp is now filled
  5920. // fmt.Println(resp)
  5921. // }
  5922. //
  5923. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  5924. func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) {
  5925. op := &request.Operation{
  5926. Name: opPutObjectLockConfiguration,
  5927. HTTPMethod: "PUT",
  5928. HTTPPath: "/{Bucket}?object-lock",
  5929. }
  5930. if input == nil {
  5931. input = &PutObjectLockConfigurationInput{}
  5932. }
  5933. output = &PutObjectLockConfigurationOutput{}
  5934. req = c.newRequest(op, input, output)
  5935. return
  5936. }
  5937. // PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
  5938. //
  5939. // Places an Object Lock configuration on the specified bucket. The rule specified
  5940. // in the Object Lock configuration will be applied by default to every new
  5941. // object placed in the specified bucket.
  5942. //
  5943. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5944. // with awserr.Error's Code and Message methods to get detailed information about
  5945. // the error.
  5946. //
  5947. // See the AWS API reference guide for Amazon Simple Storage Service's
  5948. // API operation PutObjectLockConfiguration for usage and error information.
  5949. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
  5950. func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) {
  5951. req, out := c.PutObjectLockConfigurationRequest(input)
  5952. return out, req.Send()
  5953. }
  5954. // PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of
  5955. // the ability to pass a context and additional request options.
  5956. //
  5957. // See PutObjectLockConfiguration for details on how to use this API operation.
  5958. //
  5959. // The context must be non-nil and will be used for request cancellation. If
  5960. // the context is nil a panic will occur. In the future the SDK may create
  5961. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5962. // for more information on using Contexts.
  5963. func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) {
  5964. req, out := c.PutObjectLockConfigurationRequest(input)
  5965. req.SetContext(ctx)
  5966. req.ApplyOptions(opts...)
  5967. return out, req.Send()
  5968. }
  5969. const opPutObjectRetention = "PutObjectRetention"
  5970. // PutObjectRetentionRequest generates a "aws/request.Request" representing the
  5971. // client's request for the PutObjectRetention operation. The "output" return
  5972. // value will be populated with the request's response once the request completes
  5973. // successfully.
  5974. //
  5975. // Use "Send" method on the returned Request to send the API call to the service.
  5976. // the "output" return value is not valid until after Send returns without error.
  5977. //
  5978. // See PutObjectRetention for more information on using the PutObjectRetention
  5979. // API call, and error handling.
  5980. //
  5981. // This method is useful when you want to inject custom logic or configuration
  5982. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5983. //
  5984. //
  5985. // // Example sending a request using the PutObjectRetentionRequest method.
  5986. // req, resp := client.PutObjectRetentionRequest(params)
  5987. //
  5988. // err := req.Send()
  5989. // if err == nil { // resp is now filled
  5990. // fmt.Println(resp)
  5991. // }
  5992. //
  5993. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  5994. func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) {
  5995. op := &request.Operation{
  5996. Name: opPutObjectRetention,
  5997. HTTPMethod: "PUT",
  5998. HTTPPath: "/{Bucket}/{Key+}?retention",
  5999. }
  6000. if input == nil {
  6001. input = &PutObjectRetentionInput{}
  6002. }
  6003. output = &PutObjectRetentionOutput{}
  6004. req = c.newRequest(op, input, output)
  6005. return
  6006. }
  6007. // PutObjectRetention API operation for Amazon Simple Storage Service.
  6008. //
  6009. // Places an Object Retention configuration on an object.
  6010. //
  6011. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6012. // with awserr.Error's Code and Message methods to get detailed information about
  6013. // the error.
  6014. //
  6015. // See the AWS API reference guide for Amazon Simple Storage Service's
  6016. // API operation PutObjectRetention for usage and error information.
  6017. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
  6018. func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) {
  6019. req, out := c.PutObjectRetentionRequest(input)
  6020. return out, req.Send()
  6021. }
  6022. // PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of
  6023. // the ability to pass a context and additional request options.
  6024. //
  6025. // See PutObjectRetention for details on how to use this API operation.
  6026. //
  6027. // The context must be non-nil and will be used for request cancellation. If
  6028. // the context is nil a panic will occur. In the future the SDK may create
  6029. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6030. // for more information on using Contexts.
  6031. func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) {
  6032. req, out := c.PutObjectRetentionRequest(input)
  6033. req.SetContext(ctx)
  6034. req.ApplyOptions(opts...)
  6035. return out, req.Send()
  6036. }
  6037. const opPutObjectTagging = "PutObjectTagging"
  6038. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  6039. // client's request for the PutObjectTagging operation. The "output" return
  6040. // value will be populated with the request's response once the request completes
  6041. // successfully.
  6042. //
  6043. // Use "Send" method on the returned Request to send the API call to the service.
  6044. // the "output" return value is not valid until after Send returns without error.
  6045. //
  6046. // See PutObjectTagging for more information on using the PutObjectTagging
  6047. // API call, and error handling.
  6048. //
  6049. // This method is useful when you want to inject custom logic or configuration
  6050. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6051. //
  6052. //
  6053. // // Example sending a request using the PutObjectTaggingRequest method.
  6054. // req, resp := client.PutObjectTaggingRequest(params)
  6055. //
  6056. // err := req.Send()
  6057. // if err == nil { // resp is now filled
  6058. // fmt.Println(resp)
  6059. // }
  6060. //
  6061. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  6062. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  6063. op := &request.Operation{
  6064. Name: opPutObjectTagging,
  6065. HTTPMethod: "PUT",
  6066. HTTPPath: "/{Bucket}/{Key+}?tagging",
  6067. }
  6068. if input == nil {
  6069. input = &PutObjectTaggingInput{}
  6070. }
  6071. output = &PutObjectTaggingOutput{}
  6072. req = c.newRequest(op, input, output)
  6073. return
  6074. }
  6075. // PutObjectTagging API operation for Amazon Simple Storage Service.
  6076. //
  6077. // Sets the supplied tag-set to an object that already exists in a bucket
  6078. //
  6079. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6080. // with awserr.Error's Code and Message methods to get detailed information about
  6081. // the error.
  6082. //
  6083. // See the AWS API reference guide for Amazon Simple Storage Service's
  6084. // API operation PutObjectTagging for usage and error information.
  6085. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  6086. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  6087. req, out := c.PutObjectTaggingRequest(input)
  6088. return out, req.Send()
  6089. }
  6090. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  6091. // the ability to pass a context and additional request options.
  6092. //
  6093. // See PutObjectTagging for details on how to use this API operation.
  6094. //
  6095. // The context must be non-nil and will be used for request cancellation. If
  6096. // the context is nil a panic will occur. In the future the SDK may create
  6097. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6098. // for more information on using Contexts.
  6099. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  6100. req, out := c.PutObjectTaggingRequest(input)
  6101. req.SetContext(ctx)
  6102. req.ApplyOptions(opts...)
  6103. return out, req.Send()
  6104. }
  6105. const opPutPublicAccessBlock = "PutPublicAccessBlock"
  6106. // PutPublicAccessBlockRequest generates a "aws/request.Request" representing the
  6107. // client's request for the PutPublicAccessBlock operation. The "output" return
  6108. // value will be populated with the request's response once the request completes
  6109. // successfully.
  6110. //
  6111. // Use "Send" method on the returned Request to send the API call to the service.
  6112. // the "output" return value is not valid until after Send returns without error.
  6113. //
  6114. // See PutPublicAccessBlock for more information on using the PutPublicAccessBlock
  6115. // API call, and error handling.
  6116. //
  6117. // This method is useful when you want to inject custom logic or configuration
  6118. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6119. //
  6120. //
  6121. // // Example sending a request using the PutPublicAccessBlockRequest method.
  6122. // req, resp := client.PutPublicAccessBlockRequest(params)
  6123. //
  6124. // err := req.Send()
  6125. // if err == nil { // resp is now filled
  6126. // fmt.Println(resp)
  6127. // }
  6128. //
  6129. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  6130. func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) {
  6131. op := &request.Operation{
  6132. Name: opPutPublicAccessBlock,
  6133. HTTPMethod: "PUT",
  6134. HTTPPath: "/{Bucket}?publicAccessBlock",
  6135. }
  6136. if input == nil {
  6137. input = &PutPublicAccessBlockInput{}
  6138. }
  6139. output = &PutPublicAccessBlockOutput{}
  6140. req = c.newRequest(op, input, output)
  6141. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  6142. return
  6143. }
  6144. // PutPublicAccessBlock API operation for Amazon Simple Storage Service.
  6145. //
  6146. // Creates or modifies the PublicAccessBlock configuration for an Amazon S3
  6147. // bucket.
  6148. //
  6149. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6150. // with awserr.Error's Code and Message methods to get detailed information about
  6151. // the error.
  6152. //
  6153. // See the AWS API reference guide for Amazon Simple Storage Service's
  6154. // API operation PutPublicAccessBlock for usage and error information.
  6155. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
  6156. func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) {
  6157. req, out := c.PutPublicAccessBlockRequest(input)
  6158. return out, req.Send()
  6159. }
  6160. // PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of
  6161. // the ability to pass a context and additional request options.
  6162. //
  6163. // See PutPublicAccessBlock for details on how to use this API operation.
  6164. //
  6165. // The context must be non-nil and will be used for request cancellation. If
  6166. // the context is nil a panic will occur. In the future the SDK may create
  6167. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6168. // for more information on using Contexts.
  6169. func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) {
  6170. req, out := c.PutPublicAccessBlockRequest(input)
  6171. req.SetContext(ctx)
  6172. req.ApplyOptions(opts...)
  6173. return out, req.Send()
  6174. }
  6175. const opRestoreObject = "RestoreObject"
  6176. // RestoreObjectRequest generates a "aws/request.Request" representing the
  6177. // client's request for the RestoreObject operation. The "output" return
  6178. // value will be populated with the request's response once the request completes
  6179. // successfully.
  6180. //
  6181. // Use "Send" method on the returned Request to send the API call to the service.
  6182. // the "output" return value is not valid until after Send returns without error.
  6183. //
  6184. // See RestoreObject for more information on using the RestoreObject
  6185. // API call, and error handling.
  6186. //
  6187. // This method is useful when you want to inject custom logic or configuration
  6188. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6189. //
  6190. //
  6191. // // Example sending a request using the RestoreObjectRequest method.
  6192. // req, resp := client.RestoreObjectRequest(params)
  6193. //
  6194. // err := req.Send()
  6195. // if err == nil { // resp is now filled
  6196. // fmt.Println(resp)
  6197. // }
  6198. //
  6199. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  6200. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  6201. op := &request.Operation{
  6202. Name: opRestoreObject,
  6203. HTTPMethod: "POST",
  6204. HTTPPath: "/{Bucket}/{Key+}?restore",
  6205. }
  6206. if input == nil {
  6207. input = &RestoreObjectInput{}
  6208. }
  6209. output = &RestoreObjectOutput{}
  6210. req = c.newRequest(op, input, output)
  6211. return
  6212. }
  6213. // RestoreObject API operation for Amazon Simple Storage Service.
  6214. //
  6215. // Restores an archived copy of an object back into Amazon S3
  6216. //
  6217. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6218. // with awserr.Error's Code and Message methods to get detailed information about
  6219. // the error.
  6220. //
  6221. // See the AWS API reference guide for Amazon Simple Storage Service's
  6222. // API operation RestoreObject for usage and error information.
  6223. //
  6224. // Returned Error Codes:
  6225. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  6226. // This operation is not allowed against this storage tier
  6227. //
  6228. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  6229. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  6230. req, out := c.RestoreObjectRequest(input)
  6231. return out, req.Send()
  6232. }
  6233. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  6234. // the ability to pass a context and additional request options.
  6235. //
  6236. // See RestoreObject for details on how to use this API operation.
  6237. //
  6238. // The context must be non-nil and will be used for request cancellation. If
  6239. // the context is nil a panic will occur. In the future the SDK may create
  6240. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6241. // for more information on using Contexts.
  6242. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  6243. req, out := c.RestoreObjectRequest(input)
  6244. req.SetContext(ctx)
  6245. req.ApplyOptions(opts...)
  6246. return out, req.Send()
  6247. }
  6248. const opSelectObjectContent = "SelectObjectContent"
  6249. // SelectObjectContentRequest generates a "aws/request.Request" representing the
  6250. // client's request for the SelectObjectContent operation. The "output" return
  6251. // value will be populated with the request's response once the request completes
  6252. // successfully.
  6253. //
  6254. // Use "Send" method on the returned Request to send the API call to the service.
  6255. // the "output" return value is not valid until after Send returns without error.
  6256. //
  6257. // See SelectObjectContent for more information on using the SelectObjectContent
  6258. // API call, and error handling.
  6259. //
  6260. // This method is useful when you want to inject custom logic or configuration
  6261. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6262. //
  6263. //
  6264. // // Example sending a request using the SelectObjectContentRequest method.
  6265. // req, resp := client.SelectObjectContentRequest(params)
  6266. //
  6267. // err := req.Send()
  6268. // if err == nil { // resp is now filled
  6269. // fmt.Println(resp)
  6270. // }
  6271. //
  6272. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  6273. func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
  6274. op := &request.Operation{
  6275. Name: opSelectObjectContent,
  6276. HTTPMethod: "POST",
  6277. HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
  6278. }
  6279. if input == nil {
  6280. input = &SelectObjectContentInput{}
  6281. }
  6282. output = &SelectObjectContentOutput{}
  6283. req = c.newRequest(op, input, output)
  6284. req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
  6285. req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
  6286. req.Handlers.Unmarshal.PushBack(output.runEventStreamLoop)
  6287. return
  6288. }
  6289. // SelectObjectContent API operation for Amazon Simple Storage Service.
  6290. //
  6291. // This operation filters the contents of an Amazon S3 object based on a simple
  6292. // Structured Query Language (SQL) statement. In the request, along with the
  6293. // SQL expression, you must also specify a data serialization format (JSON or
  6294. // CSV) of the object. Amazon S3 uses this to parse object data into records,
  6295. // and returns only records that match the specified SQL expression. You must
  6296. // also specify the data serialization format for the response.
  6297. //
  6298. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6299. // with awserr.Error's Code and Message methods to get detailed information about
  6300. // the error.
  6301. //
  6302. // See the AWS API reference guide for Amazon Simple Storage Service's
  6303. // API operation SelectObjectContent for usage and error information.
  6304. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
  6305. func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
  6306. req, out := c.SelectObjectContentRequest(input)
  6307. return out, req.Send()
  6308. }
  6309. // SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
  6310. // the ability to pass a context and additional request options.
  6311. //
  6312. // See SelectObjectContent for details on how to use this API operation.
  6313. //
  6314. // The context must be non-nil and will be used for request cancellation. If
  6315. // the context is nil a panic will occur. In the future the SDK may create
  6316. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6317. // for more information on using Contexts.
  6318. func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
  6319. req, out := c.SelectObjectContentRequest(input)
  6320. req.SetContext(ctx)
  6321. req.ApplyOptions(opts...)
  6322. return out, req.Send()
  6323. }
  6324. const opUploadPart = "UploadPart"
  6325. // UploadPartRequest generates a "aws/request.Request" representing the
  6326. // client's request for the UploadPart operation. The "output" return
  6327. // value will be populated with the request's response once the request completes
  6328. // successfully.
  6329. //
  6330. // Use "Send" method on the returned Request to send the API call to the service.
  6331. // the "output" return value is not valid until after Send returns without error.
  6332. //
  6333. // See UploadPart for more information on using the UploadPart
  6334. // API call, and error handling.
  6335. //
  6336. // This method is useful when you want to inject custom logic or configuration
  6337. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6338. //
  6339. //
  6340. // // Example sending a request using the UploadPartRequest method.
  6341. // req, resp := client.UploadPartRequest(params)
  6342. //
  6343. // err := req.Send()
  6344. // if err == nil { // resp is now filled
  6345. // fmt.Println(resp)
  6346. // }
  6347. //
  6348. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  6349. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  6350. op := &request.Operation{
  6351. Name: opUploadPart,
  6352. HTTPMethod: "PUT",
  6353. HTTPPath: "/{Bucket}/{Key+}",
  6354. }
  6355. if input == nil {
  6356. input = &UploadPartInput{}
  6357. }
  6358. output = &UploadPartOutput{}
  6359. req = c.newRequest(op, input, output)
  6360. return
  6361. }
  6362. // UploadPart API operation for Amazon Simple Storage Service.
  6363. //
  6364. // Uploads a part in a multipart upload.
  6365. //
  6366. // Note: After you initiate multipart upload and upload one or more parts, you
  6367. // must either complete or abort multipart upload in order to stop getting charged
  6368. // for storage of the uploaded parts. Only after you either complete or abort
  6369. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  6370. // you for the parts storage.
  6371. //
  6372. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6373. // with awserr.Error's Code and Message methods to get detailed information about
  6374. // the error.
  6375. //
  6376. // See the AWS API reference guide for Amazon Simple Storage Service's
  6377. // API operation UploadPart for usage and error information.
  6378. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  6379. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  6380. req, out := c.UploadPartRequest(input)
  6381. return out, req.Send()
  6382. }
  6383. // UploadPartWithContext is the same as UploadPart with the addition of
  6384. // the ability to pass a context and additional request options.
  6385. //
  6386. // See UploadPart for details on how to use this API operation.
  6387. //
  6388. // The context must be non-nil and will be used for request cancellation. If
  6389. // the context is nil a panic will occur. In the future the SDK may create
  6390. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6391. // for more information on using Contexts.
  6392. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  6393. req, out := c.UploadPartRequest(input)
  6394. req.SetContext(ctx)
  6395. req.ApplyOptions(opts...)
  6396. return out, req.Send()
  6397. }
  6398. const opUploadPartCopy = "UploadPartCopy"
  6399. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  6400. // client's request for the UploadPartCopy operation. The "output" return
  6401. // value will be populated with the request's response once the request completes
  6402. // successfully.
  6403. //
  6404. // Use "Send" method on the returned Request to send the API call to the service.
  6405. // the "output" return value is not valid until after Send returns without error.
  6406. //
  6407. // See UploadPartCopy for more information on using the UploadPartCopy
  6408. // API call, and error handling.
  6409. //
  6410. // This method is useful when you want to inject custom logic or configuration
  6411. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  6412. //
  6413. //
  6414. // // Example sending a request using the UploadPartCopyRequest method.
  6415. // req, resp := client.UploadPartCopyRequest(params)
  6416. //
  6417. // err := req.Send()
  6418. // if err == nil { // resp is now filled
  6419. // fmt.Println(resp)
  6420. // }
  6421. //
  6422. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  6423. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  6424. op := &request.Operation{
  6425. Name: opUploadPartCopy,
  6426. HTTPMethod: "PUT",
  6427. HTTPPath: "/{Bucket}/{Key+}",
  6428. }
  6429. if input == nil {
  6430. input = &UploadPartCopyInput{}
  6431. }
  6432. output = &UploadPartCopyOutput{}
  6433. req = c.newRequest(op, input, output)
  6434. return
  6435. }
  6436. // UploadPartCopy API operation for Amazon Simple Storage Service.
  6437. //
  6438. // Uploads a part by copying data from an existing object as data source.
  6439. //
  6440. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  6441. // with awserr.Error's Code and Message methods to get detailed information about
  6442. // the error.
  6443. //
  6444. // See the AWS API reference guide for Amazon Simple Storage Service's
  6445. // API operation UploadPartCopy for usage and error information.
  6446. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  6447. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  6448. req, out := c.UploadPartCopyRequest(input)
  6449. return out, req.Send()
  6450. }
  6451. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  6452. // the ability to pass a context and additional request options.
  6453. //
  6454. // See UploadPartCopy for details on how to use this API operation.
  6455. //
  6456. // The context must be non-nil and will be used for request cancellation. If
  6457. // the context is nil a panic will occur. In the future the SDK may create
  6458. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  6459. // for more information on using Contexts.
  6460. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  6461. req, out := c.UploadPartCopyRequest(input)
  6462. req.SetContext(ctx)
  6463. req.ApplyOptions(opts...)
  6464. return out, req.Send()
  6465. }
  6466. // Specifies the days since the initiation of an Incomplete Multipart Upload
  6467. // that Lifecycle will wait before permanently removing all parts of the upload.
  6468. type AbortIncompleteMultipartUpload struct {
  6469. _ struct{} `type:"structure"`
  6470. // Indicates the number of days that must pass since initiation for Lifecycle
  6471. // to abort an Incomplete Multipart Upload.
  6472. DaysAfterInitiation *int64 `type:"integer"`
  6473. }
  6474. // String returns the string representation
  6475. func (s AbortIncompleteMultipartUpload) String() string {
  6476. return awsutil.Prettify(s)
  6477. }
  6478. // GoString returns the string representation
  6479. func (s AbortIncompleteMultipartUpload) GoString() string {
  6480. return s.String()
  6481. }
  6482. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  6483. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  6484. s.DaysAfterInitiation = &v
  6485. return s
  6486. }
  6487. type AbortMultipartUploadInput struct {
  6488. _ struct{} `type:"structure"`
  6489. // Bucket is a required field
  6490. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6491. // Key is a required field
  6492. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6493. // Confirms that the requester knows that she or he will be charged for the
  6494. // request. Bucket owners need not specify this parameter in their requests.
  6495. // Documentation on downloading objects from requester pays buckets can be found
  6496. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6497. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6498. // UploadId is a required field
  6499. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6500. }
  6501. // String returns the string representation
  6502. func (s AbortMultipartUploadInput) String() string {
  6503. return awsutil.Prettify(s)
  6504. }
  6505. // GoString returns the string representation
  6506. func (s AbortMultipartUploadInput) GoString() string {
  6507. return s.String()
  6508. }
  6509. // Validate inspects the fields of the type to determine if they are valid.
  6510. func (s *AbortMultipartUploadInput) Validate() error {
  6511. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  6512. if s.Bucket == nil {
  6513. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6514. }
  6515. if s.Bucket != nil && len(*s.Bucket) < 1 {
  6516. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  6517. }
  6518. if s.Key == nil {
  6519. invalidParams.Add(request.NewErrParamRequired("Key"))
  6520. }
  6521. if s.Key != nil && len(*s.Key) < 1 {
  6522. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6523. }
  6524. if s.UploadId == nil {
  6525. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6526. }
  6527. if invalidParams.Len() > 0 {
  6528. return invalidParams
  6529. }
  6530. return nil
  6531. }
  6532. // SetBucket sets the Bucket field's value.
  6533. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  6534. s.Bucket = &v
  6535. return s
  6536. }
  6537. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  6538. if s.Bucket == nil {
  6539. return v
  6540. }
  6541. return *s.Bucket
  6542. }
  6543. // SetKey sets the Key field's value.
  6544. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  6545. s.Key = &v
  6546. return s
  6547. }
  6548. // SetRequestPayer sets the RequestPayer field's value.
  6549. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  6550. s.RequestPayer = &v
  6551. return s
  6552. }
  6553. // SetUploadId sets the UploadId field's value.
  6554. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  6555. s.UploadId = &v
  6556. return s
  6557. }
  6558. type AbortMultipartUploadOutput struct {
  6559. _ struct{} `type:"structure"`
  6560. // If present, indicates that the requester was successfully charged for the
  6561. // request.
  6562. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6563. }
  6564. // String returns the string representation
  6565. func (s AbortMultipartUploadOutput) String() string {
  6566. return awsutil.Prettify(s)
  6567. }
  6568. // GoString returns the string representation
  6569. func (s AbortMultipartUploadOutput) GoString() string {
  6570. return s.String()
  6571. }
  6572. // SetRequestCharged sets the RequestCharged field's value.
  6573. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  6574. s.RequestCharged = &v
  6575. return s
  6576. }
  6577. type AccelerateConfiguration struct {
  6578. _ struct{} `type:"structure"`
  6579. // The accelerate configuration of the bucket.
  6580. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  6581. }
  6582. // String returns the string representation
  6583. func (s AccelerateConfiguration) String() string {
  6584. return awsutil.Prettify(s)
  6585. }
  6586. // GoString returns the string representation
  6587. func (s AccelerateConfiguration) GoString() string {
  6588. return s.String()
  6589. }
  6590. // SetStatus sets the Status field's value.
  6591. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  6592. s.Status = &v
  6593. return s
  6594. }
  6595. type AccessControlPolicy struct {
  6596. _ struct{} `type:"structure"`
  6597. // A list of grants.
  6598. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  6599. Owner *Owner `type:"structure"`
  6600. }
  6601. // String returns the string representation
  6602. func (s AccessControlPolicy) String() string {
  6603. return awsutil.Prettify(s)
  6604. }
  6605. // GoString returns the string representation
  6606. func (s AccessControlPolicy) GoString() string {
  6607. return s.String()
  6608. }
  6609. // Validate inspects the fields of the type to determine if they are valid.
  6610. func (s *AccessControlPolicy) Validate() error {
  6611. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  6612. if s.Grants != nil {
  6613. for i, v := range s.Grants {
  6614. if v == nil {
  6615. continue
  6616. }
  6617. if err := v.Validate(); err != nil {
  6618. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  6619. }
  6620. }
  6621. }
  6622. if invalidParams.Len() > 0 {
  6623. return invalidParams
  6624. }
  6625. return nil
  6626. }
  6627. // SetGrants sets the Grants field's value.
  6628. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  6629. s.Grants = v
  6630. return s
  6631. }
  6632. // SetOwner sets the Owner field's value.
  6633. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  6634. s.Owner = v
  6635. return s
  6636. }
  6637. // A container for information about access control for replicas.
  6638. type AccessControlTranslation struct {
  6639. _ struct{} `type:"structure"`
  6640. // The override value for the owner of the replica object.
  6641. //
  6642. // Owner is a required field
  6643. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  6644. }
  6645. // String returns the string representation
  6646. func (s AccessControlTranslation) String() string {
  6647. return awsutil.Prettify(s)
  6648. }
  6649. // GoString returns the string representation
  6650. func (s AccessControlTranslation) GoString() string {
  6651. return s.String()
  6652. }
  6653. // Validate inspects the fields of the type to determine if they are valid.
  6654. func (s *AccessControlTranslation) Validate() error {
  6655. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  6656. if s.Owner == nil {
  6657. invalidParams.Add(request.NewErrParamRequired("Owner"))
  6658. }
  6659. if invalidParams.Len() > 0 {
  6660. return invalidParams
  6661. }
  6662. return nil
  6663. }
  6664. // SetOwner sets the Owner field's value.
  6665. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  6666. s.Owner = &v
  6667. return s
  6668. }
  6669. type AnalyticsAndOperator struct {
  6670. _ struct{} `type:"structure"`
  6671. // The prefix to use when evaluating an AND predicate.
  6672. Prefix *string `type:"string"`
  6673. // The list of tags to use when evaluating an AND predicate.
  6674. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  6675. }
  6676. // String returns the string representation
  6677. func (s AnalyticsAndOperator) String() string {
  6678. return awsutil.Prettify(s)
  6679. }
  6680. // GoString returns the string representation
  6681. func (s AnalyticsAndOperator) GoString() string {
  6682. return s.String()
  6683. }
  6684. // Validate inspects the fields of the type to determine if they are valid.
  6685. func (s *AnalyticsAndOperator) Validate() error {
  6686. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  6687. if s.Tags != nil {
  6688. for i, v := range s.Tags {
  6689. if v == nil {
  6690. continue
  6691. }
  6692. if err := v.Validate(); err != nil {
  6693. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  6694. }
  6695. }
  6696. }
  6697. if invalidParams.Len() > 0 {
  6698. return invalidParams
  6699. }
  6700. return nil
  6701. }
  6702. // SetPrefix sets the Prefix field's value.
  6703. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  6704. s.Prefix = &v
  6705. return s
  6706. }
  6707. // SetTags sets the Tags field's value.
  6708. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  6709. s.Tags = v
  6710. return s
  6711. }
  6712. type AnalyticsConfiguration struct {
  6713. _ struct{} `type:"structure"`
  6714. // The filter used to describe a set of objects for analyses. A filter must
  6715. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  6716. // If no filter is provided, all objects will be considered in any analysis.
  6717. Filter *AnalyticsFilter `type:"structure"`
  6718. // The identifier used to represent an analytics configuration.
  6719. //
  6720. // Id is a required field
  6721. Id *string `type:"string" required:"true"`
  6722. // If present, it indicates that data related to access patterns will be collected
  6723. // and made available to analyze the tradeoffs between different storage classes.
  6724. //
  6725. // StorageClassAnalysis is a required field
  6726. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  6727. }
  6728. // String returns the string representation
  6729. func (s AnalyticsConfiguration) String() string {
  6730. return awsutil.Prettify(s)
  6731. }
  6732. // GoString returns the string representation
  6733. func (s AnalyticsConfiguration) GoString() string {
  6734. return s.String()
  6735. }
  6736. // Validate inspects the fields of the type to determine if they are valid.
  6737. func (s *AnalyticsConfiguration) Validate() error {
  6738. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  6739. if s.Id == nil {
  6740. invalidParams.Add(request.NewErrParamRequired("Id"))
  6741. }
  6742. if s.StorageClassAnalysis == nil {
  6743. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  6744. }
  6745. if s.Filter != nil {
  6746. if err := s.Filter.Validate(); err != nil {
  6747. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  6748. }
  6749. }
  6750. if s.StorageClassAnalysis != nil {
  6751. if err := s.StorageClassAnalysis.Validate(); err != nil {
  6752. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  6753. }
  6754. }
  6755. if invalidParams.Len() > 0 {
  6756. return invalidParams
  6757. }
  6758. return nil
  6759. }
  6760. // SetFilter sets the Filter field's value.
  6761. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  6762. s.Filter = v
  6763. return s
  6764. }
  6765. // SetId sets the Id field's value.
  6766. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  6767. s.Id = &v
  6768. return s
  6769. }
  6770. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  6771. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  6772. s.StorageClassAnalysis = v
  6773. return s
  6774. }
  6775. type AnalyticsExportDestination struct {
  6776. _ struct{} `type:"structure"`
  6777. // A destination signifying output to an S3 bucket.
  6778. //
  6779. // S3BucketDestination is a required field
  6780. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  6781. }
  6782. // String returns the string representation
  6783. func (s AnalyticsExportDestination) String() string {
  6784. return awsutil.Prettify(s)
  6785. }
  6786. // GoString returns the string representation
  6787. func (s AnalyticsExportDestination) GoString() string {
  6788. return s.String()
  6789. }
  6790. // Validate inspects the fields of the type to determine if they are valid.
  6791. func (s *AnalyticsExportDestination) Validate() error {
  6792. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  6793. if s.S3BucketDestination == nil {
  6794. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  6795. }
  6796. if s.S3BucketDestination != nil {
  6797. if err := s.S3BucketDestination.Validate(); err != nil {
  6798. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  6799. }
  6800. }
  6801. if invalidParams.Len() > 0 {
  6802. return invalidParams
  6803. }
  6804. return nil
  6805. }
  6806. // SetS3BucketDestination sets the S3BucketDestination field's value.
  6807. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  6808. s.S3BucketDestination = v
  6809. return s
  6810. }
  6811. type AnalyticsFilter struct {
  6812. _ struct{} `type:"structure"`
  6813. // A conjunction (logical AND) of predicates, which is used in evaluating an
  6814. // analytics filter. The operator must have at least two predicates.
  6815. And *AnalyticsAndOperator `type:"structure"`
  6816. // The prefix to use when evaluating an analytics filter.
  6817. Prefix *string `type:"string"`
  6818. // The tag to use when evaluating an analytics filter.
  6819. Tag *Tag `type:"structure"`
  6820. }
  6821. // String returns the string representation
  6822. func (s AnalyticsFilter) String() string {
  6823. return awsutil.Prettify(s)
  6824. }
  6825. // GoString returns the string representation
  6826. func (s AnalyticsFilter) GoString() string {
  6827. return s.String()
  6828. }
  6829. // Validate inspects the fields of the type to determine if they are valid.
  6830. func (s *AnalyticsFilter) Validate() error {
  6831. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  6832. if s.And != nil {
  6833. if err := s.And.Validate(); err != nil {
  6834. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  6835. }
  6836. }
  6837. if s.Tag != nil {
  6838. if err := s.Tag.Validate(); err != nil {
  6839. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  6840. }
  6841. }
  6842. if invalidParams.Len() > 0 {
  6843. return invalidParams
  6844. }
  6845. return nil
  6846. }
  6847. // SetAnd sets the And field's value.
  6848. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  6849. s.And = v
  6850. return s
  6851. }
  6852. // SetPrefix sets the Prefix field's value.
  6853. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  6854. s.Prefix = &v
  6855. return s
  6856. }
  6857. // SetTag sets the Tag field's value.
  6858. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  6859. s.Tag = v
  6860. return s
  6861. }
  6862. type AnalyticsS3BucketDestination struct {
  6863. _ struct{} `type:"structure"`
  6864. // The Amazon resource name (ARN) of the bucket to which data is exported.
  6865. //
  6866. // Bucket is a required field
  6867. Bucket *string `type:"string" required:"true"`
  6868. // The account ID that owns the destination bucket. If no account ID is provided,
  6869. // the owner will not be validated prior to exporting data.
  6870. BucketAccountId *string `type:"string"`
  6871. // The file format used when exporting data to Amazon S3.
  6872. //
  6873. // Format is a required field
  6874. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  6875. // The prefix to use when exporting data. The exported data begins with this
  6876. // prefix.
  6877. Prefix *string `type:"string"`
  6878. }
  6879. // String returns the string representation
  6880. func (s AnalyticsS3BucketDestination) String() string {
  6881. return awsutil.Prettify(s)
  6882. }
  6883. // GoString returns the string representation
  6884. func (s AnalyticsS3BucketDestination) GoString() string {
  6885. return s.String()
  6886. }
  6887. // Validate inspects the fields of the type to determine if they are valid.
  6888. func (s *AnalyticsS3BucketDestination) Validate() error {
  6889. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  6890. if s.Bucket == nil {
  6891. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6892. }
  6893. if s.Format == nil {
  6894. invalidParams.Add(request.NewErrParamRequired("Format"))
  6895. }
  6896. if invalidParams.Len() > 0 {
  6897. return invalidParams
  6898. }
  6899. return nil
  6900. }
  6901. // SetBucket sets the Bucket field's value.
  6902. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  6903. s.Bucket = &v
  6904. return s
  6905. }
  6906. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  6907. if s.Bucket == nil {
  6908. return v
  6909. }
  6910. return *s.Bucket
  6911. }
  6912. // SetBucketAccountId sets the BucketAccountId field's value.
  6913. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  6914. s.BucketAccountId = &v
  6915. return s
  6916. }
  6917. // SetFormat sets the Format field's value.
  6918. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  6919. s.Format = &v
  6920. return s
  6921. }
  6922. // SetPrefix sets the Prefix field's value.
  6923. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  6924. s.Prefix = &v
  6925. return s
  6926. }
  6927. type Bucket struct {
  6928. _ struct{} `type:"structure"`
  6929. // Date the bucket was created.
  6930. CreationDate *time.Time `type:"timestamp"`
  6931. // The name of the bucket.
  6932. Name *string `type:"string"`
  6933. }
  6934. // String returns the string representation
  6935. func (s Bucket) String() string {
  6936. return awsutil.Prettify(s)
  6937. }
  6938. // GoString returns the string representation
  6939. func (s Bucket) GoString() string {
  6940. return s.String()
  6941. }
  6942. // SetCreationDate sets the CreationDate field's value.
  6943. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6944. s.CreationDate = &v
  6945. return s
  6946. }
  6947. // SetName sets the Name field's value.
  6948. func (s *Bucket) SetName(v string) *Bucket {
  6949. s.Name = &v
  6950. return s
  6951. }
  6952. type BucketLifecycleConfiguration struct {
  6953. _ struct{} `type:"structure"`
  6954. // Rules is a required field
  6955. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6956. }
  6957. // String returns the string representation
  6958. func (s BucketLifecycleConfiguration) String() string {
  6959. return awsutil.Prettify(s)
  6960. }
  6961. // GoString returns the string representation
  6962. func (s BucketLifecycleConfiguration) GoString() string {
  6963. return s.String()
  6964. }
  6965. // Validate inspects the fields of the type to determine if they are valid.
  6966. func (s *BucketLifecycleConfiguration) Validate() error {
  6967. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6968. if s.Rules == nil {
  6969. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6970. }
  6971. if s.Rules != nil {
  6972. for i, v := range s.Rules {
  6973. if v == nil {
  6974. continue
  6975. }
  6976. if err := v.Validate(); err != nil {
  6977. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6978. }
  6979. }
  6980. }
  6981. if invalidParams.Len() > 0 {
  6982. return invalidParams
  6983. }
  6984. return nil
  6985. }
  6986. // SetRules sets the Rules field's value.
  6987. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6988. s.Rules = v
  6989. return s
  6990. }
  6991. type BucketLoggingStatus struct {
  6992. _ struct{} `type:"structure"`
  6993. // Container for logging information. Presence of this element indicates that
  6994. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  6995. // in this case.
  6996. LoggingEnabled *LoggingEnabled `type:"structure"`
  6997. }
  6998. // String returns the string representation
  6999. func (s BucketLoggingStatus) String() string {
  7000. return awsutil.Prettify(s)
  7001. }
  7002. // GoString returns the string representation
  7003. func (s BucketLoggingStatus) GoString() string {
  7004. return s.String()
  7005. }
  7006. // Validate inspects the fields of the type to determine if they are valid.
  7007. func (s *BucketLoggingStatus) Validate() error {
  7008. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  7009. if s.LoggingEnabled != nil {
  7010. if err := s.LoggingEnabled.Validate(); err != nil {
  7011. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  7012. }
  7013. }
  7014. if invalidParams.Len() > 0 {
  7015. return invalidParams
  7016. }
  7017. return nil
  7018. }
  7019. // SetLoggingEnabled sets the LoggingEnabled field's value.
  7020. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  7021. s.LoggingEnabled = v
  7022. return s
  7023. }
  7024. type CORSConfiguration struct {
  7025. _ struct{} `type:"structure"`
  7026. // CORSRules is a required field
  7027. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  7028. }
  7029. // String returns the string representation
  7030. func (s CORSConfiguration) String() string {
  7031. return awsutil.Prettify(s)
  7032. }
  7033. // GoString returns the string representation
  7034. func (s CORSConfiguration) GoString() string {
  7035. return s.String()
  7036. }
  7037. // Validate inspects the fields of the type to determine if they are valid.
  7038. func (s *CORSConfiguration) Validate() error {
  7039. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  7040. if s.CORSRules == nil {
  7041. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  7042. }
  7043. if s.CORSRules != nil {
  7044. for i, v := range s.CORSRules {
  7045. if v == nil {
  7046. continue
  7047. }
  7048. if err := v.Validate(); err != nil {
  7049. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  7050. }
  7051. }
  7052. }
  7053. if invalidParams.Len() > 0 {
  7054. return invalidParams
  7055. }
  7056. return nil
  7057. }
  7058. // SetCORSRules sets the CORSRules field's value.
  7059. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  7060. s.CORSRules = v
  7061. return s
  7062. }
  7063. type CORSRule struct {
  7064. _ struct{} `type:"structure"`
  7065. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  7066. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  7067. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  7068. // to execute.
  7069. //
  7070. // AllowedMethods is a required field
  7071. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  7072. // One or more origins you want customers to be able to access the bucket from.
  7073. //
  7074. // AllowedOrigins is a required field
  7075. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  7076. // One or more headers in the response that you want customers to be able to
  7077. // access from their applications (for example, from a JavaScript XMLHttpRequest
  7078. // object).
  7079. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  7080. // The time in seconds that your browser is to cache the preflight response
  7081. // for the specified resource.
  7082. MaxAgeSeconds *int64 `type:"integer"`
  7083. }
  7084. // String returns the string representation
  7085. func (s CORSRule) String() string {
  7086. return awsutil.Prettify(s)
  7087. }
  7088. // GoString returns the string representation
  7089. func (s CORSRule) GoString() string {
  7090. return s.String()
  7091. }
  7092. // Validate inspects the fields of the type to determine if they are valid.
  7093. func (s *CORSRule) Validate() error {
  7094. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  7095. if s.AllowedMethods == nil {
  7096. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  7097. }
  7098. if s.AllowedOrigins == nil {
  7099. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  7100. }
  7101. if invalidParams.Len() > 0 {
  7102. return invalidParams
  7103. }
  7104. return nil
  7105. }
  7106. // SetAllowedHeaders sets the AllowedHeaders field's value.
  7107. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  7108. s.AllowedHeaders = v
  7109. return s
  7110. }
  7111. // SetAllowedMethods sets the AllowedMethods field's value.
  7112. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  7113. s.AllowedMethods = v
  7114. return s
  7115. }
  7116. // SetAllowedOrigins sets the AllowedOrigins field's value.
  7117. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  7118. s.AllowedOrigins = v
  7119. return s
  7120. }
  7121. // SetExposeHeaders sets the ExposeHeaders field's value.
  7122. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  7123. s.ExposeHeaders = v
  7124. return s
  7125. }
  7126. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  7127. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  7128. s.MaxAgeSeconds = &v
  7129. return s
  7130. }
  7131. // Describes how a CSV-formatted input object is formatted.
  7132. type CSVInput struct {
  7133. _ struct{} `type:"structure"`
  7134. // Specifies that CSV field values may contain quoted record delimiters and
  7135. // such records should be allowed. Default value is FALSE. Setting this value
  7136. // to TRUE may lower performance.
  7137. AllowQuotedRecordDelimiter *bool `type:"boolean"`
  7138. // The single character used to indicate a row should be ignored when present
  7139. // at the start of a row.
  7140. Comments *string `type:"string"`
  7141. // The value used to separate individual fields in a record.
  7142. FieldDelimiter *string `type:"string"`
  7143. // Describes the first line of input. Valid values: None, Ignore, Use.
  7144. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  7145. // Value used for escaping where the field delimiter is part of the value.
  7146. QuoteCharacter *string `type:"string"`
  7147. // The single character used for escaping the quote character inside an already
  7148. // escaped value.
  7149. QuoteEscapeCharacter *string `type:"string"`
  7150. // The value used to separate individual records.
  7151. RecordDelimiter *string `type:"string"`
  7152. }
  7153. // String returns the string representation
  7154. func (s CSVInput) String() string {
  7155. return awsutil.Prettify(s)
  7156. }
  7157. // GoString returns the string representation
  7158. func (s CSVInput) GoString() string {
  7159. return s.String()
  7160. }
  7161. // SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
  7162. func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
  7163. s.AllowQuotedRecordDelimiter = &v
  7164. return s
  7165. }
  7166. // SetComments sets the Comments field's value.
  7167. func (s *CSVInput) SetComments(v string) *CSVInput {
  7168. s.Comments = &v
  7169. return s
  7170. }
  7171. // SetFieldDelimiter sets the FieldDelimiter field's value.
  7172. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  7173. s.FieldDelimiter = &v
  7174. return s
  7175. }
  7176. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  7177. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  7178. s.FileHeaderInfo = &v
  7179. return s
  7180. }
  7181. // SetQuoteCharacter sets the QuoteCharacter field's value.
  7182. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  7183. s.QuoteCharacter = &v
  7184. return s
  7185. }
  7186. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  7187. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  7188. s.QuoteEscapeCharacter = &v
  7189. return s
  7190. }
  7191. // SetRecordDelimiter sets the RecordDelimiter field's value.
  7192. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  7193. s.RecordDelimiter = &v
  7194. return s
  7195. }
  7196. // Describes how CSV-formatted results are formatted.
  7197. type CSVOutput struct {
  7198. _ struct{} `type:"structure"`
  7199. // The value used to separate individual fields in a record.
  7200. FieldDelimiter *string `type:"string"`
  7201. // The value used for escaping where the field delimiter is part of the value.
  7202. QuoteCharacter *string `type:"string"`
  7203. // Th single character used for escaping the quote character inside an already
  7204. // escaped value.
  7205. QuoteEscapeCharacter *string `type:"string"`
  7206. // Indicates whether or not all output fields should be quoted.
  7207. QuoteFields *string `type:"string" enum:"QuoteFields"`
  7208. // The value used to separate individual records.
  7209. RecordDelimiter *string `type:"string"`
  7210. }
  7211. // String returns the string representation
  7212. func (s CSVOutput) String() string {
  7213. return awsutil.Prettify(s)
  7214. }
  7215. // GoString returns the string representation
  7216. func (s CSVOutput) GoString() string {
  7217. return s.String()
  7218. }
  7219. // SetFieldDelimiter sets the FieldDelimiter field's value.
  7220. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  7221. s.FieldDelimiter = &v
  7222. return s
  7223. }
  7224. // SetQuoteCharacter sets the QuoteCharacter field's value.
  7225. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  7226. s.QuoteCharacter = &v
  7227. return s
  7228. }
  7229. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  7230. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  7231. s.QuoteEscapeCharacter = &v
  7232. return s
  7233. }
  7234. // SetQuoteFields sets the QuoteFields field's value.
  7235. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  7236. s.QuoteFields = &v
  7237. return s
  7238. }
  7239. // SetRecordDelimiter sets the RecordDelimiter field's value.
  7240. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  7241. s.RecordDelimiter = &v
  7242. return s
  7243. }
  7244. type CloudFunctionConfiguration struct {
  7245. _ struct{} `type:"structure"`
  7246. CloudFunction *string `type:"string"`
  7247. // The bucket event for which to send notifications.
  7248. //
  7249. // Deprecated: Event has been deprecated
  7250. Event *string `deprecated:"true" type:"string" enum:"Event"`
  7251. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  7252. // An optional unique identifier for configurations in a notification configuration.
  7253. // If you don't provide one, Amazon S3 will assign an ID.
  7254. Id *string `type:"string"`
  7255. InvocationRole *string `type:"string"`
  7256. }
  7257. // String returns the string representation
  7258. func (s CloudFunctionConfiguration) String() string {
  7259. return awsutil.Prettify(s)
  7260. }
  7261. // GoString returns the string representation
  7262. func (s CloudFunctionConfiguration) GoString() string {
  7263. return s.String()
  7264. }
  7265. // SetCloudFunction sets the CloudFunction field's value.
  7266. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  7267. s.CloudFunction = &v
  7268. return s
  7269. }
  7270. // SetEvent sets the Event field's value.
  7271. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  7272. s.Event = &v
  7273. return s
  7274. }
  7275. // SetEvents sets the Events field's value.
  7276. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  7277. s.Events = v
  7278. return s
  7279. }
  7280. // SetId sets the Id field's value.
  7281. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  7282. s.Id = &v
  7283. return s
  7284. }
  7285. // SetInvocationRole sets the InvocationRole field's value.
  7286. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  7287. s.InvocationRole = &v
  7288. return s
  7289. }
  7290. type CommonPrefix struct {
  7291. _ struct{} `type:"structure"`
  7292. Prefix *string `type:"string"`
  7293. }
  7294. // String returns the string representation
  7295. func (s CommonPrefix) String() string {
  7296. return awsutil.Prettify(s)
  7297. }
  7298. // GoString returns the string representation
  7299. func (s CommonPrefix) GoString() string {
  7300. return s.String()
  7301. }
  7302. // SetPrefix sets the Prefix field's value.
  7303. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  7304. s.Prefix = &v
  7305. return s
  7306. }
  7307. type CompleteMultipartUploadInput struct {
  7308. _ struct{} `type:"structure" payload:"MultipartUpload"`
  7309. // Bucket is a required field
  7310. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7311. // Key is a required field
  7312. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7313. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  7314. // Confirms that the requester knows that she or he will be charged for the
  7315. // request. Bucket owners need not specify this parameter in their requests.
  7316. // Documentation on downloading objects from requester pays buckets can be found
  7317. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7318. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7319. // UploadId is a required field
  7320. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  7321. }
  7322. // String returns the string representation
  7323. func (s CompleteMultipartUploadInput) String() string {
  7324. return awsutil.Prettify(s)
  7325. }
  7326. // GoString returns the string representation
  7327. func (s CompleteMultipartUploadInput) GoString() string {
  7328. return s.String()
  7329. }
  7330. // Validate inspects the fields of the type to determine if they are valid.
  7331. func (s *CompleteMultipartUploadInput) Validate() error {
  7332. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  7333. if s.Bucket == nil {
  7334. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7335. }
  7336. if s.Bucket != nil && len(*s.Bucket) < 1 {
  7337. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  7338. }
  7339. if s.Key == nil {
  7340. invalidParams.Add(request.NewErrParamRequired("Key"))
  7341. }
  7342. if s.Key != nil && len(*s.Key) < 1 {
  7343. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7344. }
  7345. if s.UploadId == nil {
  7346. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  7347. }
  7348. if invalidParams.Len() > 0 {
  7349. return invalidParams
  7350. }
  7351. return nil
  7352. }
  7353. // SetBucket sets the Bucket field's value.
  7354. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  7355. s.Bucket = &v
  7356. return s
  7357. }
  7358. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  7359. if s.Bucket == nil {
  7360. return v
  7361. }
  7362. return *s.Bucket
  7363. }
  7364. // SetKey sets the Key field's value.
  7365. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  7366. s.Key = &v
  7367. return s
  7368. }
  7369. // SetMultipartUpload sets the MultipartUpload field's value.
  7370. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  7371. s.MultipartUpload = v
  7372. return s
  7373. }
  7374. // SetRequestPayer sets the RequestPayer field's value.
  7375. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  7376. s.RequestPayer = &v
  7377. return s
  7378. }
  7379. // SetUploadId sets the UploadId field's value.
  7380. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  7381. s.UploadId = &v
  7382. return s
  7383. }
  7384. type CompleteMultipartUploadOutput struct {
  7385. _ struct{} `type:"structure"`
  7386. Bucket *string `type:"string"`
  7387. // Entity tag of the object.
  7388. ETag *string `type:"string"`
  7389. // If the object expiration is configured, this will contain the expiration
  7390. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  7391. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7392. Key *string `min:"1" type:"string"`
  7393. Location *string `type:"string"`
  7394. // If present, indicates that the requester was successfully charged for the
  7395. // request.
  7396. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7397. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7398. // encryption key that was used for the object.
  7399. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7400. // The Server-side encryption algorithm used when storing this object in S3
  7401. // (e.g., AES256, aws:kms).
  7402. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7403. // Version of the object.
  7404. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7405. }
  7406. // String returns the string representation
  7407. func (s CompleteMultipartUploadOutput) String() string {
  7408. return awsutil.Prettify(s)
  7409. }
  7410. // GoString returns the string representation
  7411. func (s CompleteMultipartUploadOutput) GoString() string {
  7412. return s.String()
  7413. }
  7414. // SetBucket sets the Bucket field's value.
  7415. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  7416. s.Bucket = &v
  7417. return s
  7418. }
  7419. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  7420. if s.Bucket == nil {
  7421. return v
  7422. }
  7423. return *s.Bucket
  7424. }
  7425. // SetETag sets the ETag field's value.
  7426. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  7427. s.ETag = &v
  7428. return s
  7429. }
  7430. // SetExpiration sets the Expiration field's value.
  7431. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  7432. s.Expiration = &v
  7433. return s
  7434. }
  7435. // SetKey sets the Key field's value.
  7436. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  7437. s.Key = &v
  7438. return s
  7439. }
  7440. // SetLocation sets the Location field's value.
  7441. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  7442. s.Location = &v
  7443. return s
  7444. }
  7445. // SetRequestCharged sets the RequestCharged field's value.
  7446. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  7447. s.RequestCharged = &v
  7448. return s
  7449. }
  7450. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7451. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  7452. s.SSEKMSKeyId = &v
  7453. return s
  7454. }
  7455. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7456. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  7457. s.ServerSideEncryption = &v
  7458. return s
  7459. }
  7460. // SetVersionId sets the VersionId field's value.
  7461. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  7462. s.VersionId = &v
  7463. return s
  7464. }
  7465. type CompletedMultipartUpload struct {
  7466. _ struct{} `type:"structure"`
  7467. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  7468. }
  7469. // String returns the string representation
  7470. func (s CompletedMultipartUpload) String() string {
  7471. return awsutil.Prettify(s)
  7472. }
  7473. // GoString returns the string representation
  7474. func (s CompletedMultipartUpload) GoString() string {
  7475. return s.String()
  7476. }
  7477. // SetParts sets the Parts field's value.
  7478. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  7479. s.Parts = v
  7480. return s
  7481. }
  7482. type CompletedPart struct {
  7483. _ struct{} `type:"structure"`
  7484. // Entity tag returned when the part was uploaded.
  7485. ETag *string `type:"string"`
  7486. // Part number that identifies the part. This is a positive integer between
  7487. // 1 and 10,000.
  7488. PartNumber *int64 `type:"integer"`
  7489. }
  7490. // String returns the string representation
  7491. func (s CompletedPart) String() string {
  7492. return awsutil.Prettify(s)
  7493. }
  7494. // GoString returns the string representation
  7495. func (s CompletedPart) GoString() string {
  7496. return s.String()
  7497. }
  7498. // SetETag sets the ETag field's value.
  7499. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  7500. s.ETag = &v
  7501. return s
  7502. }
  7503. // SetPartNumber sets the PartNumber field's value.
  7504. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  7505. s.PartNumber = &v
  7506. return s
  7507. }
  7508. type Condition struct {
  7509. _ struct{} `type:"structure"`
  7510. // The HTTP error code when the redirect is applied. In the event of an error,
  7511. // if the error code equals this value, then the specified redirect is applied.
  7512. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  7513. // is not specified. If both are specified, then both must be true for the redirect
  7514. // to be applied.
  7515. HttpErrorCodeReturnedEquals *string `type:"string"`
  7516. // The object key name prefix when the redirect is applied. For example, to
  7517. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  7518. // To redirect request for all pages with the prefix docs/, the key prefix will
  7519. // be /docs, which identifies all objects in the docs/ folder. Required when
  7520. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  7521. // is not specified. If both conditions are specified, both must be true for
  7522. // the redirect to be applied.
  7523. KeyPrefixEquals *string `type:"string"`
  7524. }
  7525. // String returns the string representation
  7526. func (s Condition) String() string {
  7527. return awsutil.Prettify(s)
  7528. }
  7529. // GoString returns the string representation
  7530. func (s Condition) GoString() string {
  7531. return s.String()
  7532. }
  7533. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  7534. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  7535. s.HttpErrorCodeReturnedEquals = &v
  7536. return s
  7537. }
  7538. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  7539. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  7540. s.KeyPrefixEquals = &v
  7541. return s
  7542. }
  7543. type ContinuationEvent struct {
  7544. _ struct{} `locationName:"ContinuationEvent" type:"structure"`
  7545. }
  7546. // String returns the string representation
  7547. func (s ContinuationEvent) String() string {
  7548. return awsutil.Prettify(s)
  7549. }
  7550. // GoString returns the string representation
  7551. func (s ContinuationEvent) GoString() string {
  7552. return s.String()
  7553. }
  7554. // The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
  7555. func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
  7556. // UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
  7557. // This method is only used internally within the SDK's EventStream handling.
  7558. func (s *ContinuationEvent) UnmarshalEvent(
  7559. payloadUnmarshaler protocol.PayloadUnmarshaler,
  7560. msg eventstream.Message,
  7561. ) error {
  7562. return nil
  7563. }
  7564. type CopyObjectInput struct {
  7565. _ struct{} `type:"structure"`
  7566. // The canned ACL to apply to the object.
  7567. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7568. // Bucket is a required field
  7569. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7570. // Specifies caching behavior along the request/reply chain.
  7571. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7572. // Specifies presentational information for the object.
  7573. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7574. // Specifies what content encodings have been applied to the object and thus
  7575. // what decoding mechanisms must be applied to obtain the media-type referenced
  7576. // by the Content-Type header field.
  7577. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7578. // The language the content is in.
  7579. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7580. // A standard MIME type describing the format of the object data.
  7581. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7582. // The name of the source bucket and key name of the source object, separated
  7583. // by a slash (/). Must be URL-encoded.
  7584. //
  7585. // CopySource is a required field
  7586. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  7587. // Copies the object if its entity tag (ETag) matches the specified tag.
  7588. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  7589. // Copies the object if it has been modified since the specified time.
  7590. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  7591. // Copies the object if its entity tag (ETag) is different than the specified
  7592. // ETag.
  7593. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  7594. // Copies the object if it hasn't been modified since the specified time.
  7595. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  7596. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  7597. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  7598. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  7599. // the source object. The encryption key provided in this header must be one
  7600. // that was used when the source object was created.
  7601. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  7602. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7603. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7604. // key was transmitted without error.
  7605. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  7606. // The date and time at which the object is no longer cacheable.
  7607. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  7608. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7609. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7610. // Allows grantee to read the object data and its metadata.
  7611. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7612. // Allows grantee to read the object ACL.
  7613. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7614. // Allows grantee to write the ACL for the applicable object.
  7615. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7616. // Key is a required field
  7617. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7618. // A map of metadata to store with the object in S3.
  7619. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7620. // Specifies whether the metadata is copied from the source object or replaced
  7621. // with metadata provided in the request.
  7622. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  7623. // Specifies whether you want to apply a Legal Hold to the copied object.
  7624. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  7625. // The Object Lock mode that you want to apply to the copied object.
  7626. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  7627. // The date and time when you want the copied object's Object Lock to expire.
  7628. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  7629. // Confirms that the requester knows that she or he will be charged for the
  7630. // request. Bucket owners need not specify this parameter in their requests.
  7631. // Documentation on downloading objects from requester pays buckets can be found
  7632. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7633. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7634. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7635. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7636. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7637. // data. This value is used to store the object and then it is discarded; Amazon
  7638. // does not store the encryption key. The key must be appropriate for use with
  7639. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7640. // header.
  7641. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  7642. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7643. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7644. // key was transmitted without error.
  7645. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7646. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7647. // requests for an object protected by AWS KMS will fail if not made via SSL
  7648. // or using SigV4. Documentation on configuring any of the officially supported
  7649. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7650. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7651. // The Server-side encryption algorithm used when storing this object in S3
  7652. // (e.g., AES256, aws:kms).
  7653. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7654. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7655. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7656. // The tag-set for the object destination object this value must be used in
  7657. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  7658. // Query parameters
  7659. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7660. // Specifies whether the object tag-set are copied from the source object or
  7661. // replaced with tag-set provided in the request.
  7662. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  7663. // If the bucket is configured as a website, redirects requests for this object
  7664. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7665. // the value of this header in the object metadata.
  7666. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7667. }
  7668. // String returns the string representation
  7669. func (s CopyObjectInput) String() string {
  7670. return awsutil.Prettify(s)
  7671. }
  7672. // GoString returns the string representation
  7673. func (s CopyObjectInput) GoString() string {
  7674. return s.String()
  7675. }
  7676. // Validate inspects the fields of the type to determine if they are valid.
  7677. func (s *CopyObjectInput) Validate() error {
  7678. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  7679. if s.Bucket == nil {
  7680. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7681. }
  7682. if s.Bucket != nil && len(*s.Bucket) < 1 {
  7683. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  7684. }
  7685. if s.CopySource == nil {
  7686. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  7687. }
  7688. if s.Key == nil {
  7689. invalidParams.Add(request.NewErrParamRequired("Key"))
  7690. }
  7691. if s.Key != nil && len(*s.Key) < 1 {
  7692. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7693. }
  7694. if invalidParams.Len() > 0 {
  7695. return invalidParams
  7696. }
  7697. return nil
  7698. }
  7699. // SetACL sets the ACL field's value.
  7700. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  7701. s.ACL = &v
  7702. return s
  7703. }
  7704. // SetBucket sets the Bucket field's value.
  7705. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  7706. s.Bucket = &v
  7707. return s
  7708. }
  7709. func (s *CopyObjectInput) getBucket() (v string) {
  7710. if s.Bucket == nil {
  7711. return v
  7712. }
  7713. return *s.Bucket
  7714. }
  7715. // SetCacheControl sets the CacheControl field's value.
  7716. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  7717. s.CacheControl = &v
  7718. return s
  7719. }
  7720. // SetContentDisposition sets the ContentDisposition field's value.
  7721. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  7722. s.ContentDisposition = &v
  7723. return s
  7724. }
  7725. // SetContentEncoding sets the ContentEncoding field's value.
  7726. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  7727. s.ContentEncoding = &v
  7728. return s
  7729. }
  7730. // SetContentLanguage sets the ContentLanguage field's value.
  7731. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  7732. s.ContentLanguage = &v
  7733. return s
  7734. }
  7735. // SetContentType sets the ContentType field's value.
  7736. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  7737. s.ContentType = &v
  7738. return s
  7739. }
  7740. // SetCopySource sets the CopySource field's value.
  7741. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  7742. s.CopySource = &v
  7743. return s
  7744. }
  7745. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  7746. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  7747. s.CopySourceIfMatch = &v
  7748. return s
  7749. }
  7750. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  7751. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  7752. s.CopySourceIfModifiedSince = &v
  7753. return s
  7754. }
  7755. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  7756. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  7757. s.CopySourceIfNoneMatch = &v
  7758. return s
  7759. }
  7760. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  7761. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  7762. s.CopySourceIfUnmodifiedSince = &v
  7763. return s
  7764. }
  7765. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  7766. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  7767. s.CopySourceSSECustomerAlgorithm = &v
  7768. return s
  7769. }
  7770. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  7771. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  7772. s.CopySourceSSECustomerKey = &v
  7773. return s
  7774. }
  7775. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  7776. if s.CopySourceSSECustomerKey == nil {
  7777. return v
  7778. }
  7779. return *s.CopySourceSSECustomerKey
  7780. }
  7781. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  7782. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  7783. s.CopySourceSSECustomerKeyMD5 = &v
  7784. return s
  7785. }
  7786. // SetExpires sets the Expires field's value.
  7787. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  7788. s.Expires = &v
  7789. return s
  7790. }
  7791. // SetGrantFullControl sets the GrantFullControl field's value.
  7792. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  7793. s.GrantFullControl = &v
  7794. return s
  7795. }
  7796. // SetGrantRead sets the GrantRead field's value.
  7797. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  7798. s.GrantRead = &v
  7799. return s
  7800. }
  7801. // SetGrantReadACP sets the GrantReadACP field's value.
  7802. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  7803. s.GrantReadACP = &v
  7804. return s
  7805. }
  7806. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7807. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  7808. s.GrantWriteACP = &v
  7809. return s
  7810. }
  7811. // SetKey sets the Key field's value.
  7812. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  7813. s.Key = &v
  7814. return s
  7815. }
  7816. // SetMetadata sets the Metadata field's value.
  7817. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  7818. s.Metadata = v
  7819. return s
  7820. }
  7821. // SetMetadataDirective sets the MetadataDirective field's value.
  7822. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  7823. s.MetadataDirective = &v
  7824. return s
  7825. }
  7826. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  7827. func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput {
  7828. s.ObjectLockLegalHoldStatus = &v
  7829. return s
  7830. }
  7831. // SetObjectLockMode sets the ObjectLockMode field's value.
  7832. func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput {
  7833. s.ObjectLockMode = &v
  7834. return s
  7835. }
  7836. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  7837. func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput {
  7838. s.ObjectLockRetainUntilDate = &v
  7839. return s
  7840. }
  7841. // SetRequestPayer sets the RequestPayer field's value.
  7842. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  7843. s.RequestPayer = &v
  7844. return s
  7845. }
  7846. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7847. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  7848. s.SSECustomerAlgorithm = &v
  7849. return s
  7850. }
  7851. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7852. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  7853. s.SSECustomerKey = &v
  7854. return s
  7855. }
  7856. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  7857. if s.SSECustomerKey == nil {
  7858. return v
  7859. }
  7860. return *s.SSECustomerKey
  7861. }
  7862. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7863. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  7864. s.SSECustomerKeyMD5 = &v
  7865. return s
  7866. }
  7867. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7868. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  7869. s.SSEKMSKeyId = &v
  7870. return s
  7871. }
  7872. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7873. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  7874. s.ServerSideEncryption = &v
  7875. return s
  7876. }
  7877. // SetStorageClass sets the StorageClass field's value.
  7878. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  7879. s.StorageClass = &v
  7880. return s
  7881. }
  7882. // SetTagging sets the Tagging field's value.
  7883. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  7884. s.Tagging = &v
  7885. return s
  7886. }
  7887. // SetTaggingDirective sets the TaggingDirective field's value.
  7888. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  7889. s.TaggingDirective = &v
  7890. return s
  7891. }
  7892. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7893. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  7894. s.WebsiteRedirectLocation = &v
  7895. return s
  7896. }
  7897. type CopyObjectOutput struct {
  7898. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  7899. CopyObjectResult *CopyObjectResult `type:"structure"`
  7900. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  7901. // If the object expiration is configured, the response includes this header.
  7902. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7903. // If present, indicates that the requester was successfully charged for the
  7904. // request.
  7905. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7906. // If server-side encryption with a customer-provided encryption key was requested,
  7907. // the response will include this header confirming the encryption algorithm
  7908. // used.
  7909. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7910. // If server-side encryption with a customer-provided encryption key was requested,
  7911. // the response will include this header to provide round trip message integrity
  7912. // verification of the customer-provided encryption key.
  7913. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7914. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7915. // encryption key that was used for the object.
  7916. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  7917. // The Server-side encryption algorithm used when storing this object in S3
  7918. // (e.g., AES256, aws:kms).
  7919. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7920. // Version ID of the newly created copy.
  7921. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7922. }
  7923. // String returns the string representation
  7924. func (s CopyObjectOutput) String() string {
  7925. return awsutil.Prettify(s)
  7926. }
  7927. // GoString returns the string representation
  7928. func (s CopyObjectOutput) GoString() string {
  7929. return s.String()
  7930. }
  7931. // SetCopyObjectResult sets the CopyObjectResult field's value.
  7932. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  7933. s.CopyObjectResult = v
  7934. return s
  7935. }
  7936. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  7937. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  7938. s.CopySourceVersionId = &v
  7939. return s
  7940. }
  7941. // SetExpiration sets the Expiration field's value.
  7942. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  7943. s.Expiration = &v
  7944. return s
  7945. }
  7946. // SetRequestCharged sets the RequestCharged field's value.
  7947. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  7948. s.RequestCharged = &v
  7949. return s
  7950. }
  7951. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7952. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  7953. s.SSECustomerAlgorithm = &v
  7954. return s
  7955. }
  7956. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7957. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  7958. s.SSECustomerKeyMD5 = &v
  7959. return s
  7960. }
  7961. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7962. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  7963. s.SSEKMSKeyId = &v
  7964. return s
  7965. }
  7966. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7967. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  7968. s.ServerSideEncryption = &v
  7969. return s
  7970. }
  7971. // SetVersionId sets the VersionId field's value.
  7972. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  7973. s.VersionId = &v
  7974. return s
  7975. }
  7976. type CopyObjectResult struct {
  7977. _ struct{} `type:"structure"`
  7978. ETag *string `type:"string"`
  7979. LastModified *time.Time `type:"timestamp"`
  7980. }
  7981. // String returns the string representation
  7982. func (s CopyObjectResult) String() string {
  7983. return awsutil.Prettify(s)
  7984. }
  7985. // GoString returns the string representation
  7986. func (s CopyObjectResult) GoString() string {
  7987. return s.String()
  7988. }
  7989. // SetETag sets the ETag field's value.
  7990. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  7991. s.ETag = &v
  7992. return s
  7993. }
  7994. // SetLastModified sets the LastModified field's value.
  7995. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  7996. s.LastModified = &v
  7997. return s
  7998. }
  7999. type CopyPartResult struct {
  8000. _ struct{} `type:"structure"`
  8001. // Entity tag of the object.
  8002. ETag *string `type:"string"`
  8003. // Date and time at which the object was uploaded.
  8004. LastModified *time.Time `type:"timestamp"`
  8005. }
  8006. // String returns the string representation
  8007. func (s CopyPartResult) String() string {
  8008. return awsutil.Prettify(s)
  8009. }
  8010. // GoString returns the string representation
  8011. func (s CopyPartResult) GoString() string {
  8012. return s.String()
  8013. }
  8014. // SetETag sets the ETag field's value.
  8015. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  8016. s.ETag = &v
  8017. return s
  8018. }
  8019. // SetLastModified sets the LastModified field's value.
  8020. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  8021. s.LastModified = &v
  8022. return s
  8023. }
  8024. type CreateBucketConfiguration struct {
  8025. _ struct{} `type:"structure"`
  8026. // Specifies the region where the bucket will be created. If you don't specify
  8027. // a region, the bucket will be created in US Standard.
  8028. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  8029. }
  8030. // String returns the string representation
  8031. func (s CreateBucketConfiguration) String() string {
  8032. return awsutil.Prettify(s)
  8033. }
  8034. // GoString returns the string representation
  8035. func (s CreateBucketConfiguration) GoString() string {
  8036. return s.String()
  8037. }
  8038. // SetLocationConstraint sets the LocationConstraint field's value.
  8039. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  8040. s.LocationConstraint = &v
  8041. return s
  8042. }
  8043. type CreateBucketInput struct {
  8044. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  8045. // The canned ACL to apply to the bucket.
  8046. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  8047. // Bucket is a required field
  8048. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8049. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8050. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  8051. // bucket.
  8052. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  8053. // Allows grantee to list the objects in the bucket.
  8054. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  8055. // Allows grantee to read the bucket ACL.
  8056. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  8057. // Allows grantee to create, overwrite, and delete any object in the bucket.
  8058. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  8059. // Allows grantee to write the ACL for the applicable bucket.
  8060. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  8061. // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
  8062. ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
  8063. }
  8064. // String returns the string representation
  8065. func (s CreateBucketInput) String() string {
  8066. return awsutil.Prettify(s)
  8067. }
  8068. // GoString returns the string representation
  8069. func (s CreateBucketInput) GoString() string {
  8070. return s.String()
  8071. }
  8072. // Validate inspects the fields of the type to determine if they are valid.
  8073. func (s *CreateBucketInput) Validate() error {
  8074. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  8075. if s.Bucket == nil {
  8076. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8077. }
  8078. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8079. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8080. }
  8081. if invalidParams.Len() > 0 {
  8082. return invalidParams
  8083. }
  8084. return nil
  8085. }
  8086. // SetACL sets the ACL field's value.
  8087. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  8088. s.ACL = &v
  8089. return s
  8090. }
  8091. // SetBucket sets the Bucket field's value.
  8092. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  8093. s.Bucket = &v
  8094. return s
  8095. }
  8096. func (s *CreateBucketInput) getBucket() (v string) {
  8097. if s.Bucket == nil {
  8098. return v
  8099. }
  8100. return *s.Bucket
  8101. }
  8102. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  8103. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  8104. s.CreateBucketConfiguration = v
  8105. return s
  8106. }
  8107. // SetGrantFullControl sets the GrantFullControl field's value.
  8108. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  8109. s.GrantFullControl = &v
  8110. return s
  8111. }
  8112. // SetGrantRead sets the GrantRead field's value.
  8113. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  8114. s.GrantRead = &v
  8115. return s
  8116. }
  8117. // SetGrantReadACP sets the GrantReadACP field's value.
  8118. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  8119. s.GrantReadACP = &v
  8120. return s
  8121. }
  8122. // SetGrantWrite sets the GrantWrite field's value.
  8123. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  8124. s.GrantWrite = &v
  8125. return s
  8126. }
  8127. // SetGrantWriteACP sets the GrantWriteACP field's value.
  8128. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  8129. s.GrantWriteACP = &v
  8130. return s
  8131. }
  8132. // SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.
  8133. func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
  8134. s.ObjectLockEnabledForBucket = &v
  8135. return s
  8136. }
  8137. type CreateBucketOutput struct {
  8138. _ struct{} `type:"structure"`
  8139. Location *string `location:"header" locationName:"Location" type:"string"`
  8140. }
  8141. // String returns the string representation
  8142. func (s CreateBucketOutput) String() string {
  8143. return awsutil.Prettify(s)
  8144. }
  8145. // GoString returns the string representation
  8146. func (s CreateBucketOutput) GoString() string {
  8147. return s.String()
  8148. }
  8149. // SetLocation sets the Location field's value.
  8150. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  8151. s.Location = &v
  8152. return s
  8153. }
  8154. type CreateMultipartUploadInput struct {
  8155. _ struct{} `type:"structure"`
  8156. // The canned ACL to apply to the object.
  8157. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  8158. // Bucket is a required field
  8159. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8160. // Specifies caching behavior along the request/reply chain.
  8161. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  8162. // Specifies presentational information for the object.
  8163. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  8164. // Specifies what content encodings have been applied to the object and thus
  8165. // what decoding mechanisms must be applied to obtain the media-type referenced
  8166. // by the Content-Type header field.
  8167. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  8168. // The language the content is in.
  8169. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  8170. // A standard MIME type describing the format of the object data.
  8171. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  8172. // The date and time at which the object is no longer cacheable.
  8173. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  8174. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  8175. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  8176. // Allows grantee to read the object data and its metadata.
  8177. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  8178. // Allows grantee to read the object ACL.
  8179. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  8180. // Allows grantee to write the ACL for the applicable object.
  8181. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  8182. // Key is a required field
  8183. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8184. // A map of metadata to store with the object in S3.
  8185. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  8186. // Specifies whether you want to apply a Legal Hold to the uploaded object.
  8187. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  8188. // Specifies the Object Lock mode that you want to apply to the uploaded object.
  8189. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  8190. // Specifies the date and time when you want the Object Lock to expire.
  8191. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  8192. // Confirms that the requester knows that she or he will be charged for the
  8193. // request. Bucket owners need not specify this parameter in their requests.
  8194. // Documentation on downloading objects from requester pays buckets can be found
  8195. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8196. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8197. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  8198. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8199. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  8200. // data. This value is used to store the object and then it is discarded; Amazon
  8201. // does not store the encryption key. The key must be appropriate for use with
  8202. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  8203. // header.
  8204. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  8205. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  8206. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  8207. // key was transmitted without error.
  8208. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8209. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  8210. // requests for an object protected by AWS KMS will fail if not made via SSL
  8211. // or using SigV4. Documentation on configuring any of the officially supported
  8212. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  8213. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  8214. // The Server-side encryption algorithm used when storing this object in S3
  8215. // (e.g., AES256, aws:kms).
  8216. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8217. // The type of storage to use for the object. Defaults to 'STANDARD'.
  8218. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  8219. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  8220. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  8221. // If the bucket is configured as a website, redirects requests for this object
  8222. // to another object in the same bucket or to an external URL. Amazon S3 stores
  8223. // the value of this header in the object metadata.
  8224. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  8225. }
  8226. // String returns the string representation
  8227. func (s CreateMultipartUploadInput) String() string {
  8228. return awsutil.Prettify(s)
  8229. }
  8230. // GoString returns the string representation
  8231. func (s CreateMultipartUploadInput) GoString() string {
  8232. return s.String()
  8233. }
  8234. // Validate inspects the fields of the type to determine if they are valid.
  8235. func (s *CreateMultipartUploadInput) Validate() error {
  8236. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  8237. if s.Bucket == nil {
  8238. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8239. }
  8240. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8241. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8242. }
  8243. if s.Key == nil {
  8244. invalidParams.Add(request.NewErrParamRequired("Key"))
  8245. }
  8246. if s.Key != nil && len(*s.Key) < 1 {
  8247. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8248. }
  8249. if invalidParams.Len() > 0 {
  8250. return invalidParams
  8251. }
  8252. return nil
  8253. }
  8254. // SetACL sets the ACL field's value.
  8255. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  8256. s.ACL = &v
  8257. return s
  8258. }
  8259. // SetBucket sets the Bucket field's value.
  8260. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  8261. s.Bucket = &v
  8262. return s
  8263. }
  8264. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  8265. if s.Bucket == nil {
  8266. return v
  8267. }
  8268. return *s.Bucket
  8269. }
  8270. // SetCacheControl sets the CacheControl field's value.
  8271. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  8272. s.CacheControl = &v
  8273. return s
  8274. }
  8275. // SetContentDisposition sets the ContentDisposition field's value.
  8276. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  8277. s.ContentDisposition = &v
  8278. return s
  8279. }
  8280. // SetContentEncoding sets the ContentEncoding field's value.
  8281. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  8282. s.ContentEncoding = &v
  8283. return s
  8284. }
  8285. // SetContentLanguage sets the ContentLanguage field's value.
  8286. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  8287. s.ContentLanguage = &v
  8288. return s
  8289. }
  8290. // SetContentType sets the ContentType field's value.
  8291. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  8292. s.ContentType = &v
  8293. return s
  8294. }
  8295. // SetExpires sets the Expires field's value.
  8296. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  8297. s.Expires = &v
  8298. return s
  8299. }
  8300. // SetGrantFullControl sets the GrantFullControl field's value.
  8301. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  8302. s.GrantFullControl = &v
  8303. return s
  8304. }
  8305. // SetGrantRead sets the GrantRead field's value.
  8306. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  8307. s.GrantRead = &v
  8308. return s
  8309. }
  8310. // SetGrantReadACP sets the GrantReadACP field's value.
  8311. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  8312. s.GrantReadACP = &v
  8313. return s
  8314. }
  8315. // SetGrantWriteACP sets the GrantWriteACP field's value.
  8316. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  8317. s.GrantWriteACP = &v
  8318. return s
  8319. }
  8320. // SetKey sets the Key field's value.
  8321. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  8322. s.Key = &v
  8323. return s
  8324. }
  8325. // SetMetadata sets the Metadata field's value.
  8326. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  8327. s.Metadata = v
  8328. return s
  8329. }
  8330. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  8331. func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput {
  8332. s.ObjectLockLegalHoldStatus = &v
  8333. return s
  8334. }
  8335. // SetObjectLockMode sets the ObjectLockMode field's value.
  8336. func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput {
  8337. s.ObjectLockMode = &v
  8338. return s
  8339. }
  8340. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  8341. func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput {
  8342. s.ObjectLockRetainUntilDate = &v
  8343. return s
  8344. }
  8345. // SetRequestPayer sets the RequestPayer field's value.
  8346. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  8347. s.RequestPayer = &v
  8348. return s
  8349. }
  8350. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  8351. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  8352. s.SSECustomerAlgorithm = &v
  8353. return s
  8354. }
  8355. // SetSSECustomerKey sets the SSECustomerKey field's value.
  8356. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  8357. s.SSECustomerKey = &v
  8358. return s
  8359. }
  8360. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  8361. if s.SSECustomerKey == nil {
  8362. return v
  8363. }
  8364. return *s.SSECustomerKey
  8365. }
  8366. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  8367. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  8368. s.SSECustomerKeyMD5 = &v
  8369. return s
  8370. }
  8371. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  8372. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  8373. s.SSEKMSKeyId = &v
  8374. return s
  8375. }
  8376. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  8377. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  8378. s.ServerSideEncryption = &v
  8379. return s
  8380. }
  8381. // SetStorageClass sets the StorageClass field's value.
  8382. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  8383. s.StorageClass = &v
  8384. return s
  8385. }
  8386. // SetTagging sets the Tagging field's value.
  8387. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  8388. s.Tagging = &v
  8389. return s
  8390. }
  8391. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  8392. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  8393. s.WebsiteRedirectLocation = &v
  8394. return s
  8395. }
  8396. type CreateMultipartUploadOutput struct {
  8397. _ struct{} `type:"structure"`
  8398. // Date when multipart upload will become eligible for abort operation by lifecycle.
  8399. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  8400. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  8401. // operation.
  8402. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  8403. // Name of the bucket to which the multipart upload was initiated.
  8404. Bucket *string `locationName:"Bucket" type:"string"`
  8405. // Object key for which the multipart upload was initiated.
  8406. Key *string `min:"1" type:"string"`
  8407. // If present, indicates that the requester was successfully charged for the
  8408. // request.
  8409. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8410. // If server-side encryption with a customer-provided encryption key was requested,
  8411. // the response will include this header confirming the encryption algorithm
  8412. // used.
  8413. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  8414. // If server-side encryption with a customer-provided encryption key was requested,
  8415. // the response will include this header to provide round trip message integrity
  8416. // verification of the customer-provided encryption key.
  8417. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  8418. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  8419. // encryption key that was used for the object.
  8420. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  8421. // The Server-side encryption algorithm used when storing this object in S3
  8422. // (e.g., AES256, aws:kms).
  8423. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  8424. // ID for the initiated multipart upload.
  8425. UploadId *string `type:"string"`
  8426. }
  8427. // String returns the string representation
  8428. func (s CreateMultipartUploadOutput) String() string {
  8429. return awsutil.Prettify(s)
  8430. }
  8431. // GoString returns the string representation
  8432. func (s CreateMultipartUploadOutput) GoString() string {
  8433. return s.String()
  8434. }
  8435. // SetAbortDate sets the AbortDate field's value.
  8436. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  8437. s.AbortDate = &v
  8438. return s
  8439. }
  8440. // SetAbortRuleId sets the AbortRuleId field's value.
  8441. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  8442. s.AbortRuleId = &v
  8443. return s
  8444. }
  8445. // SetBucket sets the Bucket field's value.
  8446. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  8447. s.Bucket = &v
  8448. return s
  8449. }
  8450. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  8451. if s.Bucket == nil {
  8452. return v
  8453. }
  8454. return *s.Bucket
  8455. }
  8456. // SetKey sets the Key field's value.
  8457. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  8458. s.Key = &v
  8459. return s
  8460. }
  8461. // SetRequestCharged sets the RequestCharged field's value.
  8462. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  8463. s.RequestCharged = &v
  8464. return s
  8465. }
  8466. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  8467. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  8468. s.SSECustomerAlgorithm = &v
  8469. return s
  8470. }
  8471. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  8472. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  8473. s.SSECustomerKeyMD5 = &v
  8474. return s
  8475. }
  8476. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  8477. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  8478. s.SSEKMSKeyId = &v
  8479. return s
  8480. }
  8481. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  8482. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  8483. s.ServerSideEncryption = &v
  8484. return s
  8485. }
  8486. // SetUploadId sets the UploadId field's value.
  8487. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  8488. s.UploadId = &v
  8489. return s
  8490. }
  8491. // The container element for specifying the default Object Lock retention settings
  8492. // for new objects placed in the specified bucket.
  8493. type DefaultRetention struct {
  8494. _ struct{} `type:"structure"`
  8495. // The number of days that you want to specify for the default retention period.
  8496. Days *int64 `type:"integer"`
  8497. // The default Object Lock retention mode you want to apply to new objects placed
  8498. // in the specified bucket.
  8499. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  8500. // The number of years that you want to specify for the default retention period.
  8501. Years *int64 `type:"integer"`
  8502. }
  8503. // String returns the string representation
  8504. func (s DefaultRetention) String() string {
  8505. return awsutil.Prettify(s)
  8506. }
  8507. // GoString returns the string representation
  8508. func (s DefaultRetention) GoString() string {
  8509. return s.String()
  8510. }
  8511. // SetDays sets the Days field's value.
  8512. func (s *DefaultRetention) SetDays(v int64) *DefaultRetention {
  8513. s.Days = &v
  8514. return s
  8515. }
  8516. // SetMode sets the Mode field's value.
  8517. func (s *DefaultRetention) SetMode(v string) *DefaultRetention {
  8518. s.Mode = &v
  8519. return s
  8520. }
  8521. // SetYears sets the Years field's value.
  8522. func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
  8523. s.Years = &v
  8524. return s
  8525. }
  8526. type Delete struct {
  8527. _ struct{} `type:"structure"`
  8528. // Objects is a required field
  8529. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  8530. // Element to enable quiet mode for the request. When you add this element,
  8531. // you must set its value to true.
  8532. Quiet *bool `type:"boolean"`
  8533. }
  8534. // String returns the string representation
  8535. func (s Delete) String() string {
  8536. return awsutil.Prettify(s)
  8537. }
  8538. // GoString returns the string representation
  8539. func (s Delete) GoString() string {
  8540. return s.String()
  8541. }
  8542. // Validate inspects the fields of the type to determine if they are valid.
  8543. func (s *Delete) Validate() error {
  8544. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  8545. if s.Objects == nil {
  8546. invalidParams.Add(request.NewErrParamRequired("Objects"))
  8547. }
  8548. if s.Objects != nil {
  8549. for i, v := range s.Objects {
  8550. if v == nil {
  8551. continue
  8552. }
  8553. if err := v.Validate(); err != nil {
  8554. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  8555. }
  8556. }
  8557. }
  8558. if invalidParams.Len() > 0 {
  8559. return invalidParams
  8560. }
  8561. return nil
  8562. }
  8563. // SetObjects sets the Objects field's value.
  8564. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  8565. s.Objects = v
  8566. return s
  8567. }
  8568. // SetQuiet sets the Quiet field's value.
  8569. func (s *Delete) SetQuiet(v bool) *Delete {
  8570. s.Quiet = &v
  8571. return s
  8572. }
  8573. type DeleteBucketAnalyticsConfigurationInput struct {
  8574. _ struct{} `type:"structure"`
  8575. // The name of the bucket from which an analytics configuration is deleted.
  8576. //
  8577. // Bucket is a required field
  8578. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8579. // The identifier used to represent an analytics configuration.
  8580. //
  8581. // Id is a required field
  8582. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8583. }
  8584. // String returns the string representation
  8585. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  8586. return awsutil.Prettify(s)
  8587. }
  8588. // GoString returns the string representation
  8589. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  8590. return s.String()
  8591. }
  8592. // Validate inspects the fields of the type to determine if they are valid.
  8593. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  8594. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  8595. if s.Bucket == nil {
  8596. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8597. }
  8598. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8599. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8600. }
  8601. if s.Id == nil {
  8602. invalidParams.Add(request.NewErrParamRequired("Id"))
  8603. }
  8604. if invalidParams.Len() > 0 {
  8605. return invalidParams
  8606. }
  8607. return nil
  8608. }
  8609. // SetBucket sets the Bucket field's value.
  8610. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  8611. s.Bucket = &v
  8612. return s
  8613. }
  8614. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  8615. if s.Bucket == nil {
  8616. return v
  8617. }
  8618. return *s.Bucket
  8619. }
  8620. // SetId sets the Id field's value.
  8621. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  8622. s.Id = &v
  8623. return s
  8624. }
  8625. type DeleteBucketAnalyticsConfigurationOutput struct {
  8626. _ struct{} `type:"structure"`
  8627. }
  8628. // String returns the string representation
  8629. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  8630. return awsutil.Prettify(s)
  8631. }
  8632. // GoString returns the string representation
  8633. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  8634. return s.String()
  8635. }
  8636. type DeleteBucketCorsInput struct {
  8637. _ struct{} `type:"structure"`
  8638. // Bucket is a required field
  8639. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8640. }
  8641. // String returns the string representation
  8642. func (s DeleteBucketCorsInput) String() string {
  8643. return awsutil.Prettify(s)
  8644. }
  8645. // GoString returns the string representation
  8646. func (s DeleteBucketCorsInput) GoString() string {
  8647. return s.String()
  8648. }
  8649. // Validate inspects the fields of the type to determine if they are valid.
  8650. func (s *DeleteBucketCorsInput) Validate() error {
  8651. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  8652. if s.Bucket == nil {
  8653. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8654. }
  8655. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8656. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8657. }
  8658. if invalidParams.Len() > 0 {
  8659. return invalidParams
  8660. }
  8661. return nil
  8662. }
  8663. // SetBucket sets the Bucket field's value.
  8664. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  8665. s.Bucket = &v
  8666. return s
  8667. }
  8668. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  8669. if s.Bucket == nil {
  8670. return v
  8671. }
  8672. return *s.Bucket
  8673. }
  8674. type DeleteBucketCorsOutput struct {
  8675. _ struct{} `type:"structure"`
  8676. }
  8677. // String returns the string representation
  8678. func (s DeleteBucketCorsOutput) String() string {
  8679. return awsutil.Prettify(s)
  8680. }
  8681. // GoString returns the string representation
  8682. func (s DeleteBucketCorsOutput) GoString() string {
  8683. return s.String()
  8684. }
  8685. type DeleteBucketEncryptionInput struct {
  8686. _ struct{} `type:"structure"`
  8687. // The name of the bucket containing the server-side encryption configuration
  8688. // to delete.
  8689. //
  8690. // Bucket is a required field
  8691. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8692. }
  8693. // String returns the string representation
  8694. func (s DeleteBucketEncryptionInput) String() string {
  8695. return awsutil.Prettify(s)
  8696. }
  8697. // GoString returns the string representation
  8698. func (s DeleteBucketEncryptionInput) GoString() string {
  8699. return s.String()
  8700. }
  8701. // Validate inspects the fields of the type to determine if they are valid.
  8702. func (s *DeleteBucketEncryptionInput) Validate() error {
  8703. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  8704. if s.Bucket == nil {
  8705. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8706. }
  8707. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8708. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8709. }
  8710. if invalidParams.Len() > 0 {
  8711. return invalidParams
  8712. }
  8713. return nil
  8714. }
  8715. // SetBucket sets the Bucket field's value.
  8716. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  8717. s.Bucket = &v
  8718. return s
  8719. }
  8720. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  8721. if s.Bucket == nil {
  8722. return v
  8723. }
  8724. return *s.Bucket
  8725. }
  8726. type DeleteBucketEncryptionOutput struct {
  8727. _ struct{} `type:"structure"`
  8728. }
  8729. // String returns the string representation
  8730. func (s DeleteBucketEncryptionOutput) String() string {
  8731. return awsutil.Prettify(s)
  8732. }
  8733. // GoString returns the string representation
  8734. func (s DeleteBucketEncryptionOutput) GoString() string {
  8735. return s.String()
  8736. }
  8737. type DeleteBucketInput struct {
  8738. _ struct{} `type:"structure"`
  8739. // Bucket is a required field
  8740. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8741. }
  8742. // String returns the string representation
  8743. func (s DeleteBucketInput) String() string {
  8744. return awsutil.Prettify(s)
  8745. }
  8746. // GoString returns the string representation
  8747. func (s DeleteBucketInput) GoString() string {
  8748. return s.String()
  8749. }
  8750. // Validate inspects the fields of the type to determine if they are valid.
  8751. func (s *DeleteBucketInput) Validate() error {
  8752. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  8753. if s.Bucket == nil {
  8754. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8755. }
  8756. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8757. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8758. }
  8759. if invalidParams.Len() > 0 {
  8760. return invalidParams
  8761. }
  8762. return nil
  8763. }
  8764. // SetBucket sets the Bucket field's value.
  8765. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  8766. s.Bucket = &v
  8767. return s
  8768. }
  8769. func (s *DeleteBucketInput) getBucket() (v string) {
  8770. if s.Bucket == nil {
  8771. return v
  8772. }
  8773. return *s.Bucket
  8774. }
  8775. type DeleteBucketInventoryConfigurationInput struct {
  8776. _ struct{} `type:"structure"`
  8777. // The name of the bucket containing the inventory configuration to delete.
  8778. //
  8779. // Bucket is a required field
  8780. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8781. // The ID used to identify the inventory configuration.
  8782. //
  8783. // Id is a required field
  8784. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8785. }
  8786. // String returns the string representation
  8787. func (s DeleteBucketInventoryConfigurationInput) String() string {
  8788. return awsutil.Prettify(s)
  8789. }
  8790. // GoString returns the string representation
  8791. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  8792. return s.String()
  8793. }
  8794. // Validate inspects the fields of the type to determine if they are valid.
  8795. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  8796. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  8797. if s.Bucket == nil {
  8798. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8799. }
  8800. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8801. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8802. }
  8803. if s.Id == nil {
  8804. invalidParams.Add(request.NewErrParamRequired("Id"))
  8805. }
  8806. if invalidParams.Len() > 0 {
  8807. return invalidParams
  8808. }
  8809. return nil
  8810. }
  8811. // SetBucket sets the Bucket field's value.
  8812. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  8813. s.Bucket = &v
  8814. return s
  8815. }
  8816. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  8817. if s.Bucket == nil {
  8818. return v
  8819. }
  8820. return *s.Bucket
  8821. }
  8822. // SetId sets the Id field's value.
  8823. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  8824. s.Id = &v
  8825. return s
  8826. }
  8827. type DeleteBucketInventoryConfigurationOutput struct {
  8828. _ struct{} `type:"structure"`
  8829. }
  8830. // String returns the string representation
  8831. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  8832. return awsutil.Prettify(s)
  8833. }
  8834. // GoString returns the string representation
  8835. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  8836. return s.String()
  8837. }
  8838. type DeleteBucketLifecycleInput struct {
  8839. _ struct{} `type:"structure"`
  8840. // Bucket is a required field
  8841. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8842. }
  8843. // String returns the string representation
  8844. func (s DeleteBucketLifecycleInput) String() string {
  8845. return awsutil.Prettify(s)
  8846. }
  8847. // GoString returns the string representation
  8848. func (s DeleteBucketLifecycleInput) GoString() string {
  8849. return s.String()
  8850. }
  8851. // Validate inspects the fields of the type to determine if they are valid.
  8852. func (s *DeleteBucketLifecycleInput) Validate() error {
  8853. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  8854. if s.Bucket == nil {
  8855. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8856. }
  8857. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8858. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8859. }
  8860. if invalidParams.Len() > 0 {
  8861. return invalidParams
  8862. }
  8863. return nil
  8864. }
  8865. // SetBucket sets the Bucket field's value.
  8866. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  8867. s.Bucket = &v
  8868. return s
  8869. }
  8870. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  8871. if s.Bucket == nil {
  8872. return v
  8873. }
  8874. return *s.Bucket
  8875. }
  8876. type DeleteBucketLifecycleOutput struct {
  8877. _ struct{} `type:"structure"`
  8878. }
  8879. // String returns the string representation
  8880. func (s DeleteBucketLifecycleOutput) String() string {
  8881. return awsutil.Prettify(s)
  8882. }
  8883. // GoString returns the string representation
  8884. func (s DeleteBucketLifecycleOutput) GoString() string {
  8885. return s.String()
  8886. }
  8887. type DeleteBucketMetricsConfigurationInput struct {
  8888. _ struct{} `type:"structure"`
  8889. // The name of the bucket containing the metrics configuration to delete.
  8890. //
  8891. // Bucket is a required field
  8892. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8893. // The ID used to identify the metrics configuration.
  8894. //
  8895. // Id is a required field
  8896. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8897. }
  8898. // String returns the string representation
  8899. func (s DeleteBucketMetricsConfigurationInput) String() string {
  8900. return awsutil.Prettify(s)
  8901. }
  8902. // GoString returns the string representation
  8903. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  8904. return s.String()
  8905. }
  8906. // Validate inspects the fields of the type to determine if they are valid.
  8907. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  8908. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  8909. if s.Bucket == nil {
  8910. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8911. }
  8912. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8913. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8914. }
  8915. if s.Id == nil {
  8916. invalidParams.Add(request.NewErrParamRequired("Id"))
  8917. }
  8918. if invalidParams.Len() > 0 {
  8919. return invalidParams
  8920. }
  8921. return nil
  8922. }
  8923. // SetBucket sets the Bucket field's value.
  8924. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  8925. s.Bucket = &v
  8926. return s
  8927. }
  8928. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  8929. if s.Bucket == nil {
  8930. return v
  8931. }
  8932. return *s.Bucket
  8933. }
  8934. // SetId sets the Id field's value.
  8935. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  8936. s.Id = &v
  8937. return s
  8938. }
  8939. type DeleteBucketMetricsConfigurationOutput struct {
  8940. _ struct{} `type:"structure"`
  8941. }
  8942. // String returns the string representation
  8943. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  8944. return awsutil.Prettify(s)
  8945. }
  8946. // GoString returns the string representation
  8947. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  8948. return s.String()
  8949. }
  8950. type DeleteBucketOutput struct {
  8951. _ struct{} `type:"structure"`
  8952. }
  8953. // String returns the string representation
  8954. func (s DeleteBucketOutput) String() string {
  8955. return awsutil.Prettify(s)
  8956. }
  8957. // GoString returns the string representation
  8958. func (s DeleteBucketOutput) GoString() string {
  8959. return s.String()
  8960. }
  8961. type DeleteBucketPolicyInput struct {
  8962. _ struct{} `type:"structure"`
  8963. // Bucket is a required field
  8964. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8965. }
  8966. // String returns the string representation
  8967. func (s DeleteBucketPolicyInput) String() string {
  8968. return awsutil.Prettify(s)
  8969. }
  8970. // GoString returns the string representation
  8971. func (s DeleteBucketPolicyInput) GoString() string {
  8972. return s.String()
  8973. }
  8974. // Validate inspects the fields of the type to determine if they are valid.
  8975. func (s *DeleteBucketPolicyInput) Validate() error {
  8976. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  8977. if s.Bucket == nil {
  8978. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8979. }
  8980. if s.Bucket != nil && len(*s.Bucket) < 1 {
  8981. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  8982. }
  8983. if invalidParams.Len() > 0 {
  8984. return invalidParams
  8985. }
  8986. return nil
  8987. }
  8988. // SetBucket sets the Bucket field's value.
  8989. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  8990. s.Bucket = &v
  8991. return s
  8992. }
  8993. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  8994. if s.Bucket == nil {
  8995. return v
  8996. }
  8997. return *s.Bucket
  8998. }
  8999. type DeleteBucketPolicyOutput struct {
  9000. _ struct{} `type:"structure"`
  9001. }
  9002. // String returns the string representation
  9003. func (s DeleteBucketPolicyOutput) String() string {
  9004. return awsutil.Prettify(s)
  9005. }
  9006. // GoString returns the string representation
  9007. func (s DeleteBucketPolicyOutput) GoString() string {
  9008. return s.String()
  9009. }
  9010. type DeleteBucketReplicationInput struct {
  9011. _ struct{} `type:"structure"`
  9012. // The bucket name.
  9013. //
  9014. // It can take a while to propagate the deletion of a replication configuration
  9015. // to all Amazon S3 systems.
  9016. //
  9017. // Bucket is a required field
  9018. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9019. }
  9020. // String returns the string representation
  9021. func (s DeleteBucketReplicationInput) String() string {
  9022. return awsutil.Prettify(s)
  9023. }
  9024. // GoString returns the string representation
  9025. func (s DeleteBucketReplicationInput) GoString() string {
  9026. return s.String()
  9027. }
  9028. // Validate inspects the fields of the type to determine if they are valid.
  9029. func (s *DeleteBucketReplicationInput) Validate() error {
  9030. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  9031. if s.Bucket == nil {
  9032. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9033. }
  9034. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9035. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9036. }
  9037. if invalidParams.Len() > 0 {
  9038. return invalidParams
  9039. }
  9040. return nil
  9041. }
  9042. // SetBucket sets the Bucket field's value.
  9043. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  9044. s.Bucket = &v
  9045. return s
  9046. }
  9047. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  9048. if s.Bucket == nil {
  9049. return v
  9050. }
  9051. return *s.Bucket
  9052. }
  9053. type DeleteBucketReplicationOutput struct {
  9054. _ struct{} `type:"structure"`
  9055. }
  9056. // String returns the string representation
  9057. func (s DeleteBucketReplicationOutput) String() string {
  9058. return awsutil.Prettify(s)
  9059. }
  9060. // GoString returns the string representation
  9061. func (s DeleteBucketReplicationOutput) GoString() string {
  9062. return s.String()
  9063. }
  9064. type DeleteBucketTaggingInput struct {
  9065. _ struct{} `type:"structure"`
  9066. // Bucket is a required field
  9067. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9068. }
  9069. // String returns the string representation
  9070. func (s DeleteBucketTaggingInput) String() string {
  9071. return awsutil.Prettify(s)
  9072. }
  9073. // GoString returns the string representation
  9074. func (s DeleteBucketTaggingInput) GoString() string {
  9075. return s.String()
  9076. }
  9077. // Validate inspects the fields of the type to determine if they are valid.
  9078. func (s *DeleteBucketTaggingInput) Validate() error {
  9079. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  9080. if s.Bucket == nil {
  9081. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9082. }
  9083. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9084. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9085. }
  9086. if invalidParams.Len() > 0 {
  9087. return invalidParams
  9088. }
  9089. return nil
  9090. }
  9091. // SetBucket sets the Bucket field's value.
  9092. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  9093. s.Bucket = &v
  9094. return s
  9095. }
  9096. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  9097. if s.Bucket == nil {
  9098. return v
  9099. }
  9100. return *s.Bucket
  9101. }
  9102. type DeleteBucketTaggingOutput struct {
  9103. _ struct{} `type:"structure"`
  9104. }
  9105. // String returns the string representation
  9106. func (s DeleteBucketTaggingOutput) String() string {
  9107. return awsutil.Prettify(s)
  9108. }
  9109. // GoString returns the string representation
  9110. func (s DeleteBucketTaggingOutput) GoString() string {
  9111. return s.String()
  9112. }
  9113. type DeleteBucketWebsiteInput struct {
  9114. _ struct{} `type:"structure"`
  9115. // Bucket is a required field
  9116. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9117. }
  9118. // String returns the string representation
  9119. func (s DeleteBucketWebsiteInput) String() string {
  9120. return awsutil.Prettify(s)
  9121. }
  9122. // GoString returns the string representation
  9123. func (s DeleteBucketWebsiteInput) GoString() string {
  9124. return s.String()
  9125. }
  9126. // Validate inspects the fields of the type to determine if they are valid.
  9127. func (s *DeleteBucketWebsiteInput) Validate() error {
  9128. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  9129. if s.Bucket == nil {
  9130. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9131. }
  9132. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9133. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9134. }
  9135. if invalidParams.Len() > 0 {
  9136. return invalidParams
  9137. }
  9138. return nil
  9139. }
  9140. // SetBucket sets the Bucket field's value.
  9141. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  9142. s.Bucket = &v
  9143. return s
  9144. }
  9145. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  9146. if s.Bucket == nil {
  9147. return v
  9148. }
  9149. return *s.Bucket
  9150. }
  9151. type DeleteBucketWebsiteOutput struct {
  9152. _ struct{} `type:"structure"`
  9153. }
  9154. // String returns the string representation
  9155. func (s DeleteBucketWebsiteOutput) String() string {
  9156. return awsutil.Prettify(s)
  9157. }
  9158. // GoString returns the string representation
  9159. func (s DeleteBucketWebsiteOutput) GoString() string {
  9160. return s.String()
  9161. }
  9162. type DeleteMarkerEntry struct {
  9163. _ struct{} `type:"structure"`
  9164. // Specifies whether the object is (true) or is not (false) the latest version
  9165. // of an object.
  9166. IsLatest *bool `type:"boolean"`
  9167. // The object key.
  9168. Key *string `min:"1" type:"string"`
  9169. // Date and time the object was last modified.
  9170. LastModified *time.Time `type:"timestamp"`
  9171. Owner *Owner `type:"structure"`
  9172. // Version ID of an object.
  9173. VersionId *string `type:"string"`
  9174. }
  9175. // String returns the string representation
  9176. func (s DeleteMarkerEntry) String() string {
  9177. return awsutil.Prettify(s)
  9178. }
  9179. // GoString returns the string representation
  9180. func (s DeleteMarkerEntry) GoString() string {
  9181. return s.String()
  9182. }
  9183. // SetIsLatest sets the IsLatest field's value.
  9184. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  9185. s.IsLatest = &v
  9186. return s
  9187. }
  9188. // SetKey sets the Key field's value.
  9189. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  9190. s.Key = &v
  9191. return s
  9192. }
  9193. // SetLastModified sets the LastModified field's value.
  9194. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  9195. s.LastModified = &v
  9196. return s
  9197. }
  9198. // SetOwner sets the Owner field's value.
  9199. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  9200. s.Owner = v
  9201. return s
  9202. }
  9203. // SetVersionId sets the VersionId field's value.
  9204. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  9205. s.VersionId = &v
  9206. return s
  9207. }
  9208. // Specifies whether Amazon S3 should replicate delete makers.
  9209. type DeleteMarkerReplication struct {
  9210. _ struct{} `type:"structure"`
  9211. // The status of the delete marker replication.
  9212. //
  9213. // In the current implementation, Amazon S3 doesn't replicate the delete markers.
  9214. // The status must be Disabled.
  9215. Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
  9216. }
  9217. // String returns the string representation
  9218. func (s DeleteMarkerReplication) String() string {
  9219. return awsutil.Prettify(s)
  9220. }
  9221. // GoString returns the string representation
  9222. func (s DeleteMarkerReplication) GoString() string {
  9223. return s.String()
  9224. }
  9225. // SetStatus sets the Status field's value.
  9226. func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
  9227. s.Status = &v
  9228. return s
  9229. }
  9230. type DeleteObjectInput struct {
  9231. _ struct{} `type:"structure"`
  9232. // Bucket is a required field
  9233. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9234. // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
  9235. // to process this operation.
  9236. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  9237. // Key is a required field
  9238. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9239. // The concatenation of the authentication device's serial number, a space,
  9240. // and the value that is displayed on your authentication device.
  9241. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9242. // Confirms that the requester knows that she or he will be charged for the
  9243. // request. Bucket owners need not specify this parameter in their requests.
  9244. // Documentation on downloading objects from requester pays buckets can be found
  9245. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9246. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9247. // VersionId used to reference a specific version of the object.
  9248. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9249. }
  9250. // String returns the string representation
  9251. func (s DeleteObjectInput) String() string {
  9252. return awsutil.Prettify(s)
  9253. }
  9254. // GoString returns the string representation
  9255. func (s DeleteObjectInput) GoString() string {
  9256. return s.String()
  9257. }
  9258. // Validate inspects the fields of the type to determine if they are valid.
  9259. func (s *DeleteObjectInput) Validate() error {
  9260. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  9261. if s.Bucket == nil {
  9262. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9263. }
  9264. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9265. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9266. }
  9267. if s.Key == nil {
  9268. invalidParams.Add(request.NewErrParamRequired("Key"))
  9269. }
  9270. if s.Key != nil && len(*s.Key) < 1 {
  9271. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9272. }
  9273. if invalidParams.Len() > 0 {
  9274. return invalidParams
  9275. }
  9276. return nil
  9277. }
  9278. // SetBucket sets the Bucket field's value.
  9279. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  9280. s.Bucket = &v
  9281. return s
  9282. }
  9283. func (s *DeleteObjectInput) getBucket() (v string) {
  9284. if s.Bucket == nil {
  9285. return v
  9286. }
  9287. return *s.Bucket
  9288. }
  9289. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  9290. func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput {
  9291. s.BypassGovernanceRetention = &v
  9292. return s
  9293. }
  9294. // SetKey sets the Key field's value.
  9295. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  9296. s.Key = &v
  9297. return s
  9298. }
  9299. // SetMFA sets the MFA field's value.
  9300. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  9301. s.MFA = &v
  9302. return s
  9303. }
  9304. // SetRequestPayer sets the RequestPayer field's value.
  9305. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  9306. s.RequestPayer = &v
  9307. return s
  9308. }
  9309. // SetVersionId sets the VersionId field's value.
  9310. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  9311. s.VersionId = &v
  9312. return s
  9313. }
  9314. type DeleteObjectOutput struct {
  9315. _ struct{} `type:"structure"`
  9316. // Specifies whether the versioned object that was permanently deleted was (true)
  9317. // or was not (false) a delete marker.
  9318. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  9319. // If present, indicates that the requester was successfully charged for the
  9320. // request.
  9321. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9322. // Returns the version ID of the delete marker created as a result of the DELETE
  9323. // operation.
  9324. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9325. }
  9326. // String returns the string representation
  9327. func (s DeleteObjectOutput) String() string {
  9328. return awsutil.Prettify(s)
  9329. }
  9330. // GoString returns the string representation
  9331. func (s DeleteObjectOutput) GoString() string {
  9332. return s.String()
  9333. }
  9334. // SetDeleteMarker sets the DeleteMarker field's value.
  9335. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  9336. s.DeleteMarker = &v
  9337. return s
  9338. }
  9339. // SetRequestCharged sets the RequestCharged field's value.
  9340. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  9341. s.RequestCharged = &v
  9342. return s
  9343. }
  9344. // SetVersionId sets the VersionId field's value.
  9345. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  9346. s.VersionId = &v
  9347. return s
  9348. }
  9349. type DeleteObjectTaggingInput struct {
  9350. _ struct{} `type:"structure"`
  9351. // Bucket is a required field
  9352. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9353. // Key is a required field
  9354. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9355. // The versionId of the object that the tag-set will be removed from.
  9356. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9357. }
  9358. // String returns the string representation
  9359. func (s DeleteObjectTaggingInput) String() string {
  9360. return awsutil.Prettify(s)
  9361. }
  9362. // GoString returns the string representation
  9363. func (s DeleteObjectTaggingInput) GoString() string {
  9364. return s.String()
  9365. }
  9366. // Validate inspects the fields of the type to determine if they are valid.
  9367. func (s *DeleteObjectTaggingInput) Validate() error {
  9368. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  9369. if s.Bucket == nil {
  9370. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9371. }
  9372. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9373. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9374. }
  9375. if s.Key == nil {
  9376. invalidParams.Add(request.NewErrParamRequired("Key"))
  9377. }
  9378. if s.Key != nil && len(*s.Key) < 1 {
  9379. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9380. }
  9381. if invalidParams.Len() > 0 {
  9382. return invalidParams
  9383. }
  9384. return nil
  9385. }
  9386. // SetBucket sets the Bucket field's value.
  9387. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  9388. s.Bucket = &v
  9389. return s
  9390. }
  9391. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  9392. if s.Bucket == nil {
  9393. return v
  9394. }
  9395. return *s.Bucket
  9396. }
  9397. // SetKey sets the Key field's value.
  9398. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  9399. s.Key = &v
  9400. return s
  9401. }
  9402. // SetVersionId sets the VersionId field's value.
  9403. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  9404. s.VersionId = &v
  9405. return s
  9406. }
  9407. type DeleteObjectTaggingOutput struct {
  9408. _ struct{} `type:"structure"`
  9409. // The versionId of the object the tag-set was removed from.
  9410. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9411. }
  9412. // String returns the string representation
  9413. func (s DeleteObjectTaggingOutput) String() string {
  9414. return awsutil.Prettify(s)
  9415. }
  9416. // GoString returns the string representation
  9417. func (s DeleteObjectTaggingOutput) GoString() string {
  9418. return s.String()
  9419. }
  9420. // SetVersionId sets the VersionId field's value.
  9421. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  9422. s.VersionId = &v
  9423. return s
  9424. }
  9425. type DeleteObjectsInput struct {
  9426. _ struct{} `type:"structure" payload:"Delete"`
  9427. // Bucket is a required field
  9428. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9429. // Specifies whether you want to delete this object even if it has a Governance-type
  9430. // Object Lock in place. You must have sufficient permissions to perform this
  9431. // operation.
  9432. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  9433. // Delete is a required field
  9434. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  9435. // The concatenation of the authentication device's serial number, a space,
  9436. // and the value that is displayed on your authentication device.
  9437. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  9438. // Confirms that the requester knows that she or he will be charged for the
  9439. // request. Bucket owners need not specify this parameter in their requests.
  9440. // Documentation on downloading objects from requester pays buckets can be found
  9441. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9442. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9443. }
  9444. // String returns the string representation
  9445. func (s DeleteObjectsInput) String() string {
  9446. return awsutil.Prettify(s)
  9447. }
  9448. // GoString returns the string representation
  9449. func (s DeleteObjectsInput) GoString() string {
  9450. return s.String()
  9451. }
  9452. // Validate inspects the fields of the type to determine if they are valid.
  9453. func (s *DeleteObjectsInput) Validate() error {
  9454. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  9455. if s.Bucket == nil {
  9456. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9457. }
  9458. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9459. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9460. }
  9461. if s.Delete == nil {
  9462. invalidParams.Add(request.NewErrParamRequired("Delete"))
  9463. }
  9464. if s.Delete != nil {
  9465. if err := s.Delete.Validate(); err != nil {
  9466. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  9467. }
  9468. }
  9469. if invalidParams.Len() > 0 {
  9470. return invalidParams
  9471. }
  9472. return nil
  9473. }
  9474. // SetBucket sets the Bucket field's value.
  9475. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  9476. s.Bucket = &v
  9477. return s
  9478. }
  9479. func (s *DeleteObjectsInput) getBucket() (v string) {
  9480. if s.Bucket == nil {
  9481. return v
  9482. }
  9483. return *s.Bucket
  9484. }
  9485. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  9486. func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput {
  9487. s.BypassGovernanceRetention = &v
  9488. return s
  9489. }
  9490. // SetDelete sets the Delete field's value.
  9491. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  9492. s.Delete = v
  9493. return s
  9494. }
  9495. // SetMFA sets the MFA field's value.
  9496. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  9497. s.MFA = &v
  9498. return s
  9499. }
  9500. // SetRequestPayer sets the RequestPayer field's value.
  9501. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  9502. s.RequestPayer = &v
  9503. return s
  9504. }
  9505. type DeleteObjectsOutput struct {
  9506. _ struct{} `type:"structure"`
  9507. Deleted []*DeletedObject `type:"list" flattened:"true"`
  9508. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  9509. // If present, indicates that the requester was successfully charged for the
  9510. // request.
  9511. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9512. }
  9513. // String returns the string representation
  9514. func (s DeleteObjectsOutput) String() string {
  9515. return awsutil.Prettify(s)
  9516. }
  9517. // GoString returns the string representation
  9518. func (s DeleteObjectsOutput) GoString() string {
  9519. return s.String()
  9520. }
  9521. // SetDeleted sets the Deleted field's value.
  9522. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  9523. s.Deleted = v
  9524. return s
  9525. }
  9526. // SetErrors sets the Errors field's value.
  9527. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  9528. s.Errors = v
  9529. return s
  9530. }
  9531. // SetRequestCharged sets the RequestCharged field's value.
  9532. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  9533. s.RequestCharged = &v
  9534. return s
  9535. }
  9536. type DeletePublicAccessBlockInput struct {
  9537. _ struct{} `type:"structure"`
  9538. // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
  9539. //
  9540. // Bucket is a required field
  9541. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9542. }
  9543. // String returns the string representation
  9544. func (s DeletePublicAccessBlockInput) String() string {
  9545. return awsutil.Prettify(s)
  9546. }
  9547. // GoString returns the string representation
  9548. func (s DeletePublicAccessBlockInput) GoString() string {
  9549. return s.String()
  9550. }
  9551. // Validate inspects the fields of the type to determine if they are valid.
  9552. func (s *DeletePublicAccessBlockInput) Validate() error {
  9553. invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"}
  9554. if s.Bucket == nil {
  9555. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9556. }
  9557. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9558. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9559. }
  9560. if invalidParams.Len() > 0 {
  9561. return invalidParams
  9562. }
  9563. return nil
  9564. }
  9565. // SetBucket sets the Bucket field's value.
  9566. func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
  9567. s.Bucket = &v
  9568. return s
  9569. }
  9570. func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
  9571. if s.Bucket == nil {
  9572. return v
  9573. }
  9574. return *s.Bucket
  9575. }
  9576. type DeletePublicAccessBlockOutput struct {
  9577. _ struct{} `type:"structure"`
  9578. }
  9579. // String returns the string representation
  9580. func (s DeletePublicAccessBlockOutput) String() string {
  9581. return awsutil.Prettify(s)
  9582. }
  9583. // GoString returns the string representation
  9584. func (s DeletePublicAccessBlockOutput) GoString() string {
  9585. return s.String()
  9586. }
  9587. type DeletedObject struct {
  9588. _ struct{} `type:"structure"`
  9589. DeleteMarker *bool `type:"boolean"`
  9590. DeleteMarkerVersionId *string `type:"string"`
  9591. Key *string `min:"1" type:"string"`
  9592. VersionId *string `type:"string"`
  9593. }
  9594. // String returns the string representation
  9595. func (s DeletedObject) String() string {
  9596. return awsutil.Prettify(s)
  9597. }
  9598. // GoString returns the string representation
  9599. func (s DeletedObject) GoString() string {
  9600. return s.String()
  9601. }
  9602. // SetDeleteMarker sets the DeleteMarker field's value.
  9603. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  9604. s.DeleteMarker = &v
  9605. return s
  9606. }
  9607. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  9608. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  9609. s.DeleteMarkerVersionId = &v
  9610. return s
  9611. }
  9612. // SetKey sets the Key field's value.
  9613. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  9614. s.Key = &v
  9615. return s
  9616. }
  9617. // SetVersionId sets the VersionId field's value.
  9618. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  9619. s.VersionId = &v
  9620. return s
  9621. }
  9622. // A container for information about the replication destination.
  9623. type Destination struct {
  9624. _ struct{} `type:"structure"`
  9625. // A container for information about access control for replicas.
  9626. //
  9627. // Use this element only in a cross-account scenario where source and destination
  9628. // bucket owners are not the same to change replica ownership to the AWS account
  9629. // that owns the destination bucket. If you don't add this element to the replication
  9630. // configuration, the replicas are owned by same AWS account that owns the source
  9631. // object.
  9632. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  9633. // The account ID of the destination bucket. Currently, Amazon S3 verifies this
  9634. // value only if Access Control Translation is enabled.
  9635. //
  9636. // In a cross-account scenario, if you change replica ownership to the AWS account
  9637. // that owns the destination bucket by adding the AccessControlTranslation element,
  9638. // this is the account ID of the owner of the destination bucket.
  9639. Account *string `type:"string"`
  9640. // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
  9641. // store replicas of the object identified by the rule.
  9642. //
  9643. // If there are multiple rules in your replication configuration, all rules
  9644. // must specify the same bucket as the destination. A replication configuration
  9645. // can replicate objects to only one destination bucket.
  9646. //
  9647. // Bucket is a required field
  9648. Bucket *string `type:"string" required:"true"`
  9649. // A container that provides information about encryption. If SourceSelectionCriteria
  9650. // is specified, you must specify this element.
  9651. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  9652. // The class of storage used to store the object. By default Amazon S3 uses
  9653. // storage class of the source object when creating a replica.
  9654. StorageClass *string `type:"string" enum:"StorageClass"`
  9655. }
  9656. // String returns the string representation
  9657. func (s Destination) String() string {
  9658. return awsutil.Prettify(s)
  9659. }
  9660. // GoString returns the string representation
  9661. func (s Destination) GoString() string {
  9662. return s.String()
  9663. }
  9664. // Validate inspects the fields of the type to determine if they are valid.
  9665. func (s *Destination) Validate() error {
  9666. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  9667. if s.Bucket == nil {
  9668. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9669. }
  9670. if s.AccessControlTranslation != nil {
  9671. if err := s.AccessControlTranslation.Validate(); err != nil {
  9672. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  9673. }
  9674. }
  9675. if invalidParams.Len() > 0 {
  9676. return invalidParams
  9677. }
  9678. return nil
  9679. }
  9680. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  9681. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  9682. s.AccessControlTranslation = v
  9683. return s
  9684. }
  9685. // SetAccount sets the Account field's value.
  9686. func (s *Destination) SetAccount(v string) *Destination {
  9687. s.Account = &v
  9688. return s
  9689. }
  9690. // SetBucket sets the Bucket field's value.
  9691. func (s *Destination) SetBucket(v string) *Destination {
  9692. s.Bucket = &v
  9693. return s
  9694. }
  9695. func (s *Destination) getBucket() (v string) {
  9696. if s.Bucket == nil {
  9697. return v
  9698. }
  9699. return *s.Bucket
  9700. }
  9701. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  9702. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  9703. s.EncryptionConfiguration = v
  9704. return s
  9705. }
  9706. // SetStorageClass sets the StorageClass field's value.
  9707. func (s *Destination) SetStorageClass(v string) *Destination {
  9708. s.StorageClass = &v
  9709. return s
  9710. }
  9711. // Describes the server-side encryption that will be applied to the restore
  9712. // results.
  9713. type Encryption struct {
  9714. _ struct{} `type:"structure"`
  9715. // The server-side encryption algorithm used when storing job results in Amazon
  9716. // S3 (e.g., AES256, aws:kms).
  9717. //
  9718. // EncryptionType is a required field
  9719. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  9720. // If the encryption type is aws:kms, this optional value can be used to specify
  9721. // the encryption context for the restore results.
  9722. KMSContext *string `type:"string"`
  9723. // If the encryption type is aws:kms, this optional value specifies the AWS
  9724. // KMS key ID to use for encryption of job results.
  9725. KMSKeyId *string `type:"string" sensitive:"true"`
  9726. }
  9727. // String returns the string representation
  9728. func (s Encryption) String() string {
  9729. return awsutil.Prettify(s)
  9730. }
  9731. // GoString returns the string representation
  9732. func (s Encryption) GoString() string {
  9733. return s.String()
  9734. }
  9735. // Validate inspects the fields of the type to determine if they are valid.
  9736. func (s *Encryption) Validate() error {
  9737. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  9738. if s.EncryptionType == nil {
  9739. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  9740. }
  9741. if invalidParams.Len() > 0 {
  9742. return invalidParams
  9743. }
  9744. return nil
  9745. }
  9746. // SetEncryptionType sets the EncryptionType field's value.
  9747. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  9748. s.EncryptionType = &v
  9749. return s
  9750. }
  9751. // SetKMSContext sets the KMSContext field's value.
  9752. func (s *Encryption) SetKMSContext(v string) *Encryption {
  9753. s.KMSContext = &v
  9754. return s
  9755. }
  9756. // SetKMSKeyId sets the KMSKeyId field's value.
  9757. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  9758. s.KMSKeyId = &v
  9759. return s
  9760. }
  9761. // A container for information about the encryption-based configuration for
  9762. // replicas.
  9763. type EncryptionConfiguration struct {
  9764. _ struct{} `type:"structure"`
  9765. // The ID of the AWS KMS key for the AWS Region where the destination bucket
  9766. // resides. Amazon S3 uses this key to encrypt the replica object.
  9767. ReplicaKmsKeyID *string `type:"string"`
  9768. }
  9769. // String returns the string representation
  9770. func (s EncryptionConfiguration) String() string {
  9771. return awsutil.Prettify(s)
  9772. }
  9773. // GoString returns the string representation
  9774. func (s EncryptionConfiguration) GoString() string {
  9775. return s.String()
  9776. }
  9777. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  9778. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  9779. s.ReplicaKmsKeyID = &v
  9780. return s
  9781. }
  9782. type EndEvent struct {
  9783. _ struct{} `locationName:"EndEvent" type:"structure"`
  9784. }
  9785. // String returns the string representation
  9786. func (s EndEvent) String() string {
  9787. return awsutil.Prettify(s)
  9788. }
  9789. // GoString returns the string representation
  9790. func (s EndEvent) GoString() string {
  9791. return s.String()
  9792. }
  9793. // The EndEvent is and event in the SelectObjectContentEventStream group of events.
  9794. func (s *EndEvent) eventSelectObjectContentEventStream() {}
  9795. // UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
  9796. // This method is only used internally within the SDK's EventStream handling.
  9797. func (s *EndEvent) UnmarshalEvent(
  9798. payloadUnmarshaler protocol.PayloadUnmarshaler,
  9799. msg eventstream.Message,
  9800. ) error {
  9801. return nil
  9802. }
  9803. type Error struct {
  9804. _ struct{} `type:"structure"`
  9805. Code *string `type:"string"`
  9806. Key *string `min:"1" type:"string"`
  9807. Message *string `type:"string"`
  9808. VersionId *string `type:"string"`
  9809. }
  9810. // String returns the string representation
  9811. func (s Error) String() string {
  9812. return awsutil.Prettify(s)
  9813. }
  9814. // GoString returns the string representation
  9815. func (s Error) GoString() string {
  9816. return s.String()
  9817. }
  9818. // SetCode sets the Code field's value.
  9819. func (s *Error) SetCode(v string) *Error {
  9820. s.Code = &v
  9821. return s
  9822. }
  9823. // SetKey sets the Key field's value.
  9824. func (s *Error) SetKey(v string) *Error {
  9825. s.Key = &v
  9826. return s
  9827. }
  9828. // SetMessage sets the Message field's value.
  9829. func (s *Error) SetMessage(v string) *Error {
  9830. s.Message = &v
  9831. return s
  9832. }
  9833. // SetVersionId sets the VersionId field's value.
  9834. func (s *Error) SetVersionId(v string) *Error {
  9835. s.VersionId = &v
  9836. return s
  9837. }
  9838. type ErrorDocument struct {
  9839. _ struct{} `type:"structure"`
  9840. // The object key name to use when a 4XX class error occurs.
  9841. //
  9842. // Key is a required field
  9843. Key *string `min:"1" type:"string" required:"true"`
  9844. }
  9845. // String returns the string representation
  9846. func (s ErrorDocument) String() string {
  9847. return awsutil.Prettify(s)
  9848. }
  9849. // GoString returns the string representation
  9850. func (s ErrorDocument) GoString() string {
  9851. return s.String()
  9852. }
  9853. // Validate inspects the fields of the type to determine if they are valid.
  9854. func (s *ErrorDocument) Validate() error {
  9855. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  9856. if s.Key == nil {
  9857. invalidParams.Add(request.NewErrParamRequired("Key"))
  9858. }
  9859. if s.Key != nil && len(*s.Key) < 1 {
  9860. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9861. }
  9862. if invalidParams.Len() > 0 {
  9863. return invalidParams
  9864. }
  9865. return nil
  9866. }
  9867. // SetKey sets the Key field's value.
  9868. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  9869. s.Key = &v
  9870. return s
  9871. }
  9872. // A container for a key value pair that defines the criteria for the filter
  9873. // rule.
  9874. type FilterRule struct {
  9875. _ struct{} `type:"structure"`
  9876. // The object key name prefix or suffix identifying one or more objects to which
  9877. // the filtering rule applies. The maximum prefix length is 1,024 characters.
  9878. // Overlapping prefixes and suffixes are not supported. For more information,
  9879. // see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  9880. // in the Amazon Simple Storage Service Developer Guide.
  9881. Name *string `type:"string" enum:"FilterRuleName"`
  9882. Value *string `type:"string"`
  9883. }
  9884. // String returns the string representation
  9885. func (s FilterRule) String() string {
  9886. return awsutil.Prettify(s)
  9887. }
  9888. // GoString returns the string representation
  9889. func (s FilterRule) GoString() string {
  9890. return s.String()
  9891. }
  9892. // SetName sets the Name field's value.
  9893. func (s *FilterRule) SetName(v string) *FilterRule {
  9894. s.Name = &v
  9895. return s
  9896. }
  9897. // SetValue sets the Value field's value.
  9898. func (s *FilterRule) SetValue(v string) *FilterRule {
  9899. s.Value = &v
  9900. return s
  9901. }
  9902. type GetBucketAccelerateConfigurationInput struct {
  9903. _ struct{} `type:"structure"`
  9904. // Name of the bucket for which the accelerate configuration is retrieved.
  9905. //
  9906. // Bucket is a required field
  9907. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9908. }
  9909. // String returns the string representation
  9910. func (s GetBucketAccelerateConfigurationInput) String() string {
  9911. return awsutil.Prettify(s)
  9912. }
  9913. // GoString returns the string representation
  9914. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  9915. return s.String()
  9916. }
  9917. // Validate inspects the fields of the type to determine if they are valid.
  9918. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  9919. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  9920. if s.Bucket == nil {
  9921. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9922. }
  9923. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9924. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9925. }
  9926. if invalidParams.Len() > 0 {
  9927. return invalidParams
  9928. }
  9929. return nil
  9930. }
  9931. // SetBucket sets the Bucket field's value.
  9932. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  9933. s.Bucket = &v
  9934. return s
  9935. }
  9936. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  9937. if s.Bucket == nil {
  9938. return v
  9939. }
  9940. return *s.Bucket
  9941. }
  9942. type GetBucketAccelerateConfigurationOutput struct {
  9943. _ struct{} `type:"structure"`
  9944. // The accelerate configuration of the bucket.
  9945. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  9946. }
  9947. // String returns the string representation
  9948. func (s GetBucketAccelerateConfigurationOutput) String() string {
  9949. return awsutil.Prettify(s)
  9950. }
  9951. // GoString returns the string representation
  9952. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  9953. return s.String()
  9954. }
  9955. // SetStatus sets the Status field's value.
  9956. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  9957. s.Status = &v
  9958. return s
  9959. }
  9960. type GetBucketAclInput struct {
  9961. _ struct{} `type:"structure"`
  9962. // Bucket is a required field
  9963. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9964. }
  9965. // String returns the string representation
  9966. func (s GetBucketAclInput) String() string {
  9967. return awsutil.Prettify(s)
  9968. }
  9969. // GoString returns the string representation
  9970. func (s GetBucketAclInput) GoString() string {
  9971. return s.String()
  9972. }
  9973. // Validate inspects the fields of the type to determine if they are valid.
  9974. func (s *GetBucketAclInput) Validate() error {
  9975. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  9976. if s.Bucket == nil {
  9977. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9978. }
  9979. if s.Bucket != nil && len(*s.Bucket) < 1 {
  9980. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  9981. }
  9982. if invalidParams.Len() > 0 {
  9983. return invalidParams
  9984. }
  9985. return nil
  9986. }
  9987. // SetBucket sets the Bucket field's value.
  9988. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  9989. s.Bucket = &v
  9990. return s
  9991. }
  9992. func (s *GetBucketAclInput) getBucket() (v string) {
  9993. if s.Bucket == nil {
  9994. return v
  9995. }
  9996. return *s.Bucket
  9997. }
  9998. type GetBucketAclOutput struct {
  9999. _ struct{} `type:"structure"`
  10000. // A list of grants.
  10001. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  10002. Owner *Owner `type:"structure"`
  10003. }
  10004. // String returns the string representation
  10005. func (s GetBucketAclOutput) String() string {
  10006. return awsutil.Prettify(s)
  10007. }
  10008. // GoString returns the string representation
  10009. func (s GetBucketAclOutput) GoString() string {
  10010. return s.String()
  10011. }
  10012. // SetGrants sets the Grants field's value.
  10013. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  10014. s.Grants = v
  10015. return s
  10016. }
  10017. // SetOwner sets the Owner field's value.
  10018. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  10019. s.Owner = v
  10020. return s
  10021. }
  10022. type GetBucketAnalyticsConfigurationInput struct {
  10023. _ struct{} `type:"structure"`
  10024. // The name of the bucket from which an analytics configuration is retrieved.
  10025. //
  10026. // Bucket is a required field
  10027. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10028. // The identifier used to represent an analytics configuration.
  10029. //
  10030. // Id is a required field
  10031. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10032. }
  10033. // String returns the string representation
  10034. func (s GetBucketAnalyticsConfigurationInput) String() string {
  10035. return awsutil.Prettify(s)
  10036. }
  10037. // GoString returns the string representation
  10038. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  10039. return s.String()
  10040. }
  10041. // Validate inspects the fields of the type to determine if they are valid.
  10042. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  10043. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  10044. if s.Bucket == nil {
  10045. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10046. }
  10047. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10048. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10049. }
  10050. if s.Id == nil {
  10051. invalidParams.Add(request.NewErrParamRequired("Id"))
  10052. }
  10053. if invalidParams.Len() > 0 {
  10054. return invalidParams
  10055. }
  10056. return nil
  10057. }
  10058. // SetBucket sets the Bucket field's value.
  10059. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  10060. s.Bucket = &v
  10061. return s
  10062. }
  10063. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  10064. if s.Bucket == nil {
  10065. return v
  10066. }
  10067. return *s.Bucket
  10068. }
  10069. // SetId sets the Id field's value.
  10070. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  10071. s.Id = &v
  10072. return s
  10073. }
  10074. type GetBucketAnalyticsConfigurationOutput struct {
  10075. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  10076. // The configuration and any analyses for the analytics filter.
  10077. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  10078. }
  10079. // String returns the string representation
  10080. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  10081. return awsutil.Prettify(s)
  10082. }
  10083. // GoString returns the string representation
  10084. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  10085. return s.String()
  10086. }
  10087. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  10088. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  10089. s.AnalyticsConfiguration = v
  10090. return s
  10091. }
  10092. type GetBucketCorsInput struct {
  10093. _ struct{} `type:"structure"`
  10094. // Bucket is a required field
  10095. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10096. }
  10097. // String returns the string representation
  10098. func (s GetBucketCorsInput) String() string {
  10099. return awsutil.Prettify(s)
  10100. }
  10101. // GoString returns the string representation
  10102. func (s GetBucketCorsInput) GoString() string {
  10103. return s.String()
  10104. }
  10105. // Validate inspects the fields of the type to determine if they are valid.
  10106. func (s *GetBucketCorsInput) Validate() error {
  10107. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  10108. if s.Bucket == nil {
  10109. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10110. }
  10111. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10112. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10113. }
  10114. if invalidParams.Len() > 0 {
  10115. return invalidParams
  10116. }
  10117. return nil
  10118. }
  10119. // SetBucket sets the Bucket field's value.
  10120. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  10121. s.Bucket = &v
  10122. return s
  10123. }
  10124. func (s *GetBucketCorsInput) getBucket() (v string) {
  10125. if s.Bucket == nil {
  10126. return v
  10127. }
  10128. return *s.Bucket
  10129. }
  10130. type GetBucketCorsOutput struct {
  10131. _ struct{} `type:"structure"`
  10132. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  10133. }
  10134. // String returns the string representation
  10135. func (s GetBucketCorsOutput) String() string {
  10136. return awsutil.Prettify(s)
  10137. }
  10138. // GoString returns the string representation
  10139. func (s GetBucketCorsOutput) GoString() string {
  10140. return s.String()
  10141. }
  10142. // SetCORSRules sets the CORSRules field's value.
  10143. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  10144. s.CORSRules = v
  10145. return s
  10146. }
  10147. type GetBucketEncryptionInput struct {
  10148. _ struct{} `type:"structure"`
  10149. // The name of the bucket from which the server-side encryption configuration
  10150. // is retrieved.
  10151. //
  10152. // Bucket is a required field
  10153. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10154. }
  10155. // String returns the string representation
  10156. func (s GetBucketEncryptionInput) String() string {
  10157. return awsutil.Prettify(s)
  10158. }
  10159. // GoString returns the string representation
  10160. func (s GetBucketEncryptionInput) GoString() string {
  10161. return s.String()
  10162. }
  10163. // Validate inspects the fields of the type to determine if they are valid.
  10164. func (s *GetBucketEncryptionInput) Validate() error {
  10165. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  10166. if s.Bucket == nil {
  10167. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10168. }
  10169. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10170. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10171. }
  10172. if invalidParams.Len() > 0 {
  10173. return invalidParams
  10174. }
  10175. return nil
  10176. }
  10177. // SetBucket sets the Bucket field's value.
  10178. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  10179. s.Bucket = &v
  10180. return s
  10181. }
  10182. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  10183. if s.Bucket == nil {
  10184. return v
  10185. }
  10186. return *s.Bucket
  10187. }
  10188. type GetBucketEncryptionOutput struct {
  10189. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  10190. // Container for server-side encryption configuration rules. Currently S3 supports
  10191. // one rule only.
  10192. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  10193. }
  10194. // String returns the string representation
  10195. func (s GetBucketEncryptionOutput) String() string {
  10196. return awsutil.Prettify(s)
  10197. }
  10198. // GoString returns the string representation
  10199. func (s GetBucketEncryptionOutput) GoString() string {
  10200. return s.String()
  10201. }
  10202. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  10203. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  10204. s.ServerSideEncryptionConfiguration = v
  10205. return s
  10206. }
  10207. type GetBucketInventoryConfigurationInput struct {
  10208. _ struct{} `type:"structure"`
  10209. // The name of the bucket containing the inventory configuration to retrieve.
  10210. //
  10211. // Bucket is a required field
  10212. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10213. // The ID used to identify the inventory configuration.
  10214. //
  10215. // Id is a required field
  10216. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10217. }
  10218. // String returns the string representation
  10219. func (s GetBucketInventoryConfigurationInput) String() string {
  10220. return awsutil.Prettify(s)
  10221. }
  10222. // GoString returns the string representation
  10223. func (s GetBucketInventoryConfigurationInput) GoString() string {
  10224. return s.String()
  10225. }
  10226. // Validate inspects the fields of the type to determine if they are valid.
  10227. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  10228. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  10229. if s.Bucket == nil {
  10230. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10231. }
  10232. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10233. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10234. }
  10235. if s.Id == nil {
  10236. invalidParams.Add(request.NewErrParamRequired("Id"))
  10237. }
  10238. if invalidParams.Len() > 0 {
  10239. return invalidParams
  10240. }
  10241. return nil
  10242. }
  10243. // SetBucket sets the Bucket field's value.
  10244. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  10245. s.Bucket = &v
  10246. return s
  10247. }
  10248. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  10249. if s.Bucket == nil {
  10250. return v
  10251. }
  10252. return *s.Bucket
  10253. }
  10254. // SetId sets the Id field's value.
  10255. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  10256. s.Id = &v
  10257. return s
  10258. }
  10259. type GetBucketInventoryConfigurationOutput struct {
  10260. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  10261. // Specifies the inventory configuration.
  10262. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  10263. }
  10264. // String returns the string representation
  10265. func (s GetBucketInventoryConfigurationOutput) String() string {
  10266. return awsutil.Prettify(s)
  10267. }
  10268. // GoString returns the string representation
  10269. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  10270. return s.String()
  10271. }
  10272. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  10273. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  10274. s.InventoryConfiguration = v
  10275. return s
  10276. }
  10277. type GetBucketLifecycleConfigurationInput struct {
  10278. _ struct{} `type:"structure"`
  10279. // Bucket is a required field
  10280. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10281. }
  10282. // String returns the string representation
  10283. func (s GetBucketLifecycleConfigurationInput) String() string {
  10284. return awsutil.Prettify(s)
  10285. }
  10286. // GoString returns the string representation
  10287. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  10288. return s.String()
  10289. }
  10290. // Validate inspects the fields of the type to determine if they are valid.
  10291. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  10292. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  10293. if s.Bucket == nil {
  10294. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10295. }
  10296. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10297. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10298. }
  10299. if invalidParams.Len() > 0 {
  10300. return invalidParams
  10301. }
  10302. return nil
  10303. }
  10304. // SetBucket sets the Bucket field's value.
  10305. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  10306. s.Bucket = &v
  10307. return s
  10308. }
  10309. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  10310. if s.Bucket == nil {
  10311. return v
  10312. }
  10313. return *s.Bucket
  10314. }
  10315. type GetBucketLifecycleConfigurationOutput struct {
  10316. _ struct{} `type:"structure"`
  10317. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  10318. }
  10319. // String returns the string representation
  10320. func (s GetBucketLifecycleConfigurationOutput) String() string {
  10321. return awsutil.Prettify(s)
  10322. }
  10323. // GoString returns the string representation
  10324. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  10325. return s.String()
  10326. }
  10327. // SetRules sets the Rules field's value.
  10328. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  10329. s.Rules = v
  10330. return s
  10331. }
  10332. type GetBucketLifecycleInput struct {
  10333. _ struct{} `type:"structure"`
  10334. // Bucket is a required field
  10335. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10336. }
  10337. // String returns the string representation
  10338. func (s GetBucketLifecycleInput) String() string {
  10339. return awsutil.Prettify(s)
  10340. }
  10341. // GoString returns the string representation
  10342. func (s GetBucketLifecycleInput) GoString() string {
  10343. return s.String()
  10344. }
  10345. // Validate inspects the fields of the type to determine if they are valid.
  10346. func (s *GetBucketLifecycleInput) Validate() error {
  10347. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  10348. if s.Bucket == nil {
  10349. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10350. }
  10351. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10352. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10353. }
  10354. if invalidParams.Len() > 0 {
  10355. return invalidParams
  10356. }
  10357. return nil
  10358. }
  10359. // SetBucket sets the Bucket field's value.
  10360. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  10361. s.Bucket = &v
  10362. return s
  10363. }
  10364. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  10365. if s.Bucket == nil {
  10366. return v
  10367. }
  10368. return *s.Bucket
  10369. }
  10370. type GetBucketLifecycleOutput struct {
  10371. _ struct{} `type:"structure"`
  10372. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  10373. }
  10374. // String returns the string representation
  10375. func (s GetBucketLifecycleOutput) String() string {
  10376. return awsutil.Prettify(s)
  10377. }
  10378. // GoString returns the string representation
  10379. func (s GetBucketLifecycleOutput) GoString() string {
  10380. return s.String()
  10381. }
  10382. // SetRules sets the Rules field's value.
  10383. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  10384. s.Rules = v
  10385. return s
  10386. }
  10387. type GetBucketLocationInput struct {
  10388. _ struct{} `type:"structure"`
  10389. // Bucket is a required field
  10390. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10391. }
  10392. // String returns the string representation
  10393. func (s GetBucketLocationInput) String() string {
  10394. return awsutil.Prettify(s)
  10395. }
  10396. // GoString returns the string representation
  10397. func (s GetBucketLocationInput) GoString() string {
  10398. return s.String()
  10399. }
  10400. // Validate inspects the fields of the type to determine if they are valid.
  10401. func (s *GetBucketLocationInput) Validate() error {
  10402. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  10403. if s.Bucket == nil {
  10404. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10405. }
  10406. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10407. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10408. }
  10409. if invalidParams.Len() > 0 {
  10410. return invalidParams
  10411. }
  10412. return nil
  10413. }
  10414. // SetBucket sets the Bucket field's value.
  10415. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  10416. s.Bucket = &v
  10417. return s
  10418. }
  10419. func (s *GetBucketLocationInput) getBucket() (v string) {
  10420. if s.Bucket == nil {
  10421. return v
  10422. }
  10423. return *s.Bucket
  10424. }
  10425. type GetBucketLocationOutput struct {
  10426. _ struct{} `type:"structure"`
  10427. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  10428. }
  10429. // String returns the string representation
  10430. func (s GetBucketLocationOutput) String() string {
  10431. return awsutil.Prettify(s)
  10432. }
  10433. // GoString returns the string representation
  10434. func (s GetBucketLocationOutput) GoString() string {
  10435. return s.String()
  10436. }
  10437. // SetLocationConstraint sets the LocationConstraint field's value.
  10438. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  10439. s.LocationConstraint = &v
  10440. return s
  10441. }
  10442. type GetBucketLoggingInput struct {
  10443. _ struct{} `type:"structure"`
  10444. // Bucket is a required field
  10445. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10446. }
  10447. // String returns the string representation
  10448. func (s GetBucketLoggingInput) String() string {
  10449. return awsutil.Prettify(s)
  10450. }
  10451. // GoString returns the string representation
  10452. func (s GetBucketLoggingInput) GoString() string {
  10453. return s.String()
  10454. }
  10455. // Validate inspects the fields of the type to determine if they are valid.
  10456. func (s *GetBucketLoggingInput) Validate() error {
  10457. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  10458. if s.Bucket == nil {
  10459. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10460. }
  10461. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10462. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10463. }
  10464. if invalidParams.Len() > 0 {
  10465. return invalidParams
  10466. }
  10467. return nil
  10468. }
  10469. // SetBucket sets the Bucket field's value.
  10470. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  10471. s.Bucket = &v
  10472. return s
  10473. }
  10474. func (s *GetBucketLoggingInput) getBucket() (v string) {
  10475. if s.Bucket == nil {
  10476. return v
  10477. }
  10478. return *s.Bucket
  10479. }
  10480. type GetBucketLoggingOutput struct {
  10481. _ struct{} `type:"structure"`
  10482. // Container for logging information. Presence of this element indicates that
  10483. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  10484. // in this case.
  10485. LoggingEnabled *LoggingEnabled `type:"structure"`
  10486. }
  10487. // String returns the string representation
  10488. func (s GetBucketLoggingOutput) String() string {
  10489. return awsutil.Prettify(s)
  10490. }
  10491. // GoString returns the string representation
  10492. func (s GetBucketLoggingOutput) GoString() string {
  10493. return s.String()
  10494. }
  10495. // SetLoggingEnabled sets the LoggingEnabled field's value.
  10496. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  10497. s.LoggingEnabled = v
  10498. return s
  10499. }
  10500. type GetBucketMetricsConfigurationInput struct {
  10501. _ struct{} `type:"structure"`
  10502. // The name of the bucket containing the metrics configuration to retrieve.
  10503. //
  10504. // Bucket is a required field
  10505. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10506. // The ID used to identify the metrics configuration.
  10507. //
  10508. // Id is a required field
  10509. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  10510. }
  10511. // String returns the string representation
  10512. func (s GetBucketMetricsConfigurationInput) String() string {
  10513. return awsutil.Prettify(s)
  10514. }
  10515. // GoString returns the string representation
  10516. func (s GetBucketMetricsConfigurationInput) GoString() string {
  10517. return s.String()
  10518. }
  10519. // Validate inspects the fields of the type to determine if they are valid.
  10520. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  10521. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  10522. if s.Bucket == nil {
  10523. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10524. }
  10525. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10526. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10527. }
  10528. if s.Id == nil {
  10529. invalidParams.Add(request.NewErrParamRequired("Id"))
  10530. }
  10531. if invalidParams.Len() > 0 {
  10532. return invalidParams
  10533. }
  10534. return nil
  10535. }
  10536. // SetBucket sets the Bucket field's value.
  10537. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  10538. s.Bucket = &v
  10539. return s
  10540. }
  10541. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  10542. if s.Bucket == nil {
  10543. return v
  10544. }
  10545. return *s.Bucket
  10546. }
  10547. // SetId sets the Id field's value.
  10548. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  10549. s.Id = &v
  10550. return s
  10551. }
  10552. type GetBucketMetricsConfigurationOutput struct {
  10553. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  10554. // Specifies the metrics configuration.
  10555. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  10556. }
  10557. // String returns the string representation
  10558. func (s GetBucketMetricsConfigurationOutput) String() string {
  10559. return awsutil.Prettify(s)
  10560. }
  10561. // GoString returns the string representation
  10562. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  10563. return s.String()
  10564. }
  10565. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  10566. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  10567. s.MetricsConfiguration = v
  10568. return s
  10569. }
  10570. type GetBucketNotificationConfigurationRequest struct {
  10571. _ struct{} `type:"structure"`
  10572. // Name of the bucket to get the notification configuration for.
  10573. //
  10574. // Bucket is a required field
  10575. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10576. }
  10577. // String returns the string representation
  10578. func (s GetBucketNotificationConfigurationRequest) String() string {
  10579. return awsutil.Prettify(s)
  10580. }
  10581. // GoString returns the string representation
  10582. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  10583. return s.String()
  10584. }
  10585. // Validate inspects the fields of the type to determine if they are valid.
  10586. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  10587. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  10588. if s.Bucket == nil {
  10589. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10590. }
  10591. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10592. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10593. }
  10594. if invalidParams.Len() > 0 {
  10595. return invalidParams
  10596. }
  10597. return nil
  10598. }
  10599. // SetBucket sets the Bucket field's value.
  10600. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  10601. s.Bucket = &v
  10602. return s
  10603. }
  10604. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  10605. if s.Bucket == nil {
  10606. return v
  10607. }
  10608. return *s.Bucket
  10609. }
  10610. type GetBucketPolicyInput struct {
  10611. _ struct{} `type:"structure"`
  10612. // Bucket is a required field
  10613. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10614. }
  10615. // String returns the string representation
  10616. func (s GetBucketPolicyInput) String() string {
  10617. return awsutil.Prettify(s)
  10618. }
  10619. // GoString returns the string representation
  10620. func (s GetBucketPolicyInput) GoString() string {
  10621. return s.String()
  10622. }
  10623. // Validate inspects the fields of the type to determine if they are valid.
  10624. func (s *GetBucketPolicyInput) Validate() error {
  10625. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  10626. if s.Bucket == nil {
  10627. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10628. }
  10629. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10630. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10631. }
  10632. if invalidParams.Len() > 0 {
  10633. return invalidParams
  10634. }
  10635. return nil
  10636. }
  10637. // SetBucket sets the Bucket field's value.
  10638. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  10639. s.Bucket = &v
  10640. return s
  10641. }
  10642. func (s *GetBucketPolicyInput) getBucket() (v string) {
  10643. if s.Bucket == nil {
  10644. return v
  10645. }
  10646. return *s.Bucket
  10647. }
  10648. type GetBucketPolicyOutput struct {
  10649. _ struct{} `type:"structure" payload:"Policy"`
  10650. // The bucket policy as a JSON document.
  10651. Policy *string `type:"string"`
  10652. }
  10653. // String returns the string representation
  10654. func (s GetBucketPolicyOutput) String() string {
  10655. return awsutil.Prettify(s)
  10656. }
  10657. // GoString returns the string representation
  10658. func (s GetBucketPolicyOutput) GoString() string {
  10659. return s.String()
  10660. }
  10661. // SetPolicy sets the Policy field's value.
  10662. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  10663. s.Policy = &v
  10664. return s
  10665. }
  10666. type GetBucketPolicyStatusInput struct {
  10667. _ struct{} `type:"structure"`
  10668. // The name of the Amazon S3 bucket whose policy status you want to retrieve.
  10669. //
  10670. // Bucket is a required field
  10671. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10672. }
  10673. // String returns the string representation
  10674. func (s GetBucketPolicyStatusInput) String() string {
  10675. return awsutil.Prettify(s)
  10676. }
  10677. // GoString returns the string representation
  10678. func (s GetBucketPolicyStatusInput) GoString() string {
  10679. return s.String()
  10680. }
  10681. // Validate inspects the fields of the type to determine if they are valid.
  10682. func (s *GetBucketPolicyStatusInput) Validate() error {
  10683. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"}
  10684. if s.Bucket == nil {
  10685. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10686. }
  10687. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10688. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10689. }
  10690. if invalidParams.Len() > 0 {
  10691. return invalidParams
  10692. }
  10693. return nil
  10694. }
  10695. // SetBucket sets the Bucket field's value.
  10696. func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput {
  10697. s.Bucket = &v
  10698. return s
  10699. }
  10700. func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
  10701. if s.Bucket == nil {
  10702. return v
  10703. }
  10704. return *s.Bucket
  10705. }
  10706. type GetBucketPolicyStatusOutput struct {
  10707. _ struct{} `type:"structure" payload:"PolicyStatus"`
  10708. // The policy status for the specified bucket.
  10709. PolicyStatus *PolicyStatus `type:"structure"`
  10710. }
  10711. // String returns the string representation
  10712. func (s GetBucketPolicyStatusOutput) String() string {
  10713. return awsutil.Prettify(s)
  10714. }
  10715. // GoString returns the string representation
  10716. func (s GetBucketPolicyStatusOutput) GoString() string {
  10717. return s.String()
  10718. }
  10719. // SetPolicyStatus sets the PolicyStatus field's value.
  10720. func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput {
  10721. s.PolicyStatus = v
  10722. return s
  10723. }
  10724. type GetBucketReplicationInput struct {
  10725. _ struct{} `type:"structure"`
  10726. // Bucket is a required field
  10727. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10728. }
  10729. // String returns the string representation
  10730. func (s GetBucketReplicationInput) String() string {
  10731. return awsutil.Prettify(s)
  10732. }
  10733. // GoString returns the string representation
  10734. func (s GetBucketReplicationInput) GoString() string {
  10735. return s.String()
  10736. }
  10737. // Validate inspects the fields of the type to determine if they are valid.
  10738. func (s *GetBucketReplicationInput) Validate() error {
  10739. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  10740. if s.Bucket == nil {
  10741. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10742. }
  10743. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10744. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10745. }
  10746. if invalidParams.Len() > 0 {
  10747. return invalidParams
  10748. }
  10749. return nil
  10750. }
  10751. // SetBucket sets the Bucket field's value.
  10752. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  10753. s.Bucket = &v
  10754. return s
  10755. }
  10756. func (s *GetBucketReplicationInput) getBucket() (v string) {
  10757. if s.Bucket == nil {
  10758. return v
  10759. }
  10760. return *s.Bucket
  10761. }
  10762. type GetBucketReplicationOutput struct {
  10763. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  10764. // A container for replication rules. You can add up to 1,000 rules. The maximum
  10765. // size of a replication configuration is 2 MB.
  10766. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  10767. }
  10768. // String returns the string representation
  10769. func (s GetBucketReplicationOutput) String() string {
  10770. return awsutil.Prettify(s)
  10771. }
  10772. // GoString returns the string representation
  10773. func (s GetBucketReplicationOutput) GoString() string {
  10774. return s.String()
  10775. }
  10776. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  10777. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  10778. s.ReplicationConfiguration = v
  10779. return s
  10780. }
  10781. type GetBucketRequestPaymentInput struct {
  10782. _ struct{} `type:"structure"`
  10783. // Bucket is a required field
  10784. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10785. }
  10786. // String returns the string representation
  10787. func (s GetBucketRequestPaymentInput) String() string {
  10788. return awsutil.Prettify(s)
  10789. }
  10790. // GoString returns the string representation
  10791. func (s GetBucketRequestPaymentInput) GoString() string {
  10792. return s.String()
  10793. }
  10794. // Validate inspects the fields of the type to determine if they are valid.
  10795. func (s *GetBucketRequestPaymentInput) Validate() error {
  10796. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  10797. if s.Bucket == nil {
  10798. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10799. }
  10800. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10801. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10802. }
  10803. if invalidParams.Len() > 0 {
  10804. return invalidParams
  10805. }
  10806. return nil
  10807. }
  10808. // SetBucket sets the Bucket field's value.
  10809. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  10810. s.Bucket = &v
  10811. return s
  10812. }
  10813. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  10814. if s.Bucket == nil {
  10815. return v
  10816. }
  10817. return *s.Bucket
  10818. }
  10819. type GetBucketRequestPaymentOutput struct {
  10820. _ struct{} `type:"structure"`
  10821. // Specifies who pays for the download and request fees.
  10822. Payer *string `type:"string" enum:"Payer"`
  10823. }
  10824. // String returns the string representation
  10825. func (s GetBucketRequestPaymentOutput) String() string {
  10826. return awsutil.Prettify(s)
  10827. }
  10828. // GoString returns the string representation
  10829. func (s GetBucketRequestPaymentOutput) GoString() string {
  10830. return s.String()
  10831. }
  10832. // SetPayer sets the Payer field's value.
  10833. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  10834. s.Payer = &v
  10835. return s
  10836. }
  10837. type GetBucketTaggingInput struct {
  10838. _ struct{} `type:"structure"`
  10839. // Bucket is a required field
  10840. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10841. }
  10842. // String returns the string representation
  10843. func (s GetBucketTaggingInput) String() string {
  10844. return awsutil.Prettify(s)
  10845. }
  10846. // GoString returns the string representation
  10847. func (s GetBucketTaggingInput) GoString() string {
  10848. return s.String()
  10849. }
  10850. // Validate inspects the fields of the type to determine if they are valid.
  10851. func (s *GetBucketTaggingInput) Validate() error {
  10852. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  10853. if s.Bucket == nil {
  10854. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10855. }
  10856. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10857. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10858. }
  10859. if invalidParams.Len() > 0 {
  10860. return invalidParams
  10861. }
  10862. return nil
  10863. }
  10864. // SetBucket sets the Bucket field's value.
  10865. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  10866. s.Bucket = &v
  10867. return s
  10868. }
  10869. func (s *GetBucketTaggingInput) getBucket() (v string) {
  10870. if s.Bucket == nil {
  10871. return v
  10872. }
  10873. return *s.Bucket
  10874. }
  10875. type GetBucketTaggingOutput struct {
  10876. _ struct{} `type:"structure"`
  10877. // TagSet is a required field
  10878. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10879. }
  10880. // String returns the string representation
  10881. func (s GetBucketTaggingOutput) String() string {
  10882. return awsutil.Prettify(s)
  10883. }
  10884. // GoString returns the string representation
  10885. func (s GetBucketTaggingOutput) GoString() string {
  10886. return s.String()
  10887. }
  10888. // SetTagSet sets the TagSet field's value.
  10889. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  10890. s.TagSet = v
  10891. return s
  10892. }
  10893. type GetBucketVersioningInput struct {
  10894. _ struct{} `type:"structure"`
  10895. // Bucket is a required field
  10896. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10897. }
  10898. // String returns the string representation
  10899. func (s GetBucketVersioningInput) String() string {
  10900. return awsutil.Prettify(s)
  10901. }
  10902. // GoString returns the string representation
  10903. func (s GetBucketVersioningInput) GoString() string {
  10904. return s.String()
  10905. }
  10906. // Validate inspects the fields of the type to determine if they are valid.
  10907. func (s *GetBucketVersioningInput) Validate() error {
  10908. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  10909. if s.Bucket == nil {
  10910. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10911. }
  10912. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10913. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10914. }
  10915. if invalidParams.Len() > 0 {
  10916. return invalidParams
  10917. }
  10918. return nil
  10919. }
  10920. // SetBucket sets the Bucket field's value.
  10921. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  10922. s.Bucket = &v
  10923. return s
  10924. }
  10925. func (s *GetBucketVersioningInput) getBucket() (v string) {
  10926. if s.Bucket == nil {
  10927. return v
  10928. }
  10929. return *s.Bucket
  10930. }
  10931. type GetBucketVersioningOutput struct {
  10932. _ struct{} `type:"structure"`
  10933. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  10934. // This element is only returned if the bucket has been configured with MFA
  10935. // delete. If the bucket has never been so configured, this element is not returned.
  10936. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  10937. // The versioning state of the bucket.
  10938. Status *string `type:"string" enum:"BucketVersioningStatus"`
  10939. }
  10940. // String returns the string representation
  10941. func (s GetBucketVersioningOutput) String() string {
  10942. return awsutil.Prettify(s)
  10943. }
  10944. // GoString returns the string representation
  10945. func (s GetBucketVersioningOutput) GoString() string {
  10946. return s.String()
  10947. }
  10948. // SetMFADelete sets the MFADelete field's value.
  10949. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  10950. s.MFADelete = &v
  10951. return s
  10952. }
  10953. // SetStatus sets the Status field's value.
  10954. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  10955. s.Status = &v
  10956. return s
  10957. }
  10958. type GetBucketWebsiteInput struct {
  10959. _ struct{} `type:"structure"`
  10960. // Bucket is a required field
  10961. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10962. }
  10963. // String returns the string representation
  10964. func (s GetBucketWebsiteInput) String() string {
  10965. return awsutil.Prettify(s)
  10966. }
  10967. // GoString returns the string representation
  10968. func (s GetBucketWebsiteInput) GoString() string {
  10969. return s.String()
  10970. }
  10971. // Validate inspects the fields of the type to determine if they are valid.
  10972. func (s *GetBucketWebsiteInput) Validate() error {
  10973. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  10974. if s.Bucket == nil {
  10975. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10976. }
  10977. if s.Bucket != nil && len(*s.Bucket) < 1 {
  10978. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  10979. }
  10980. if invalidParams.Len() > 0 {
  10981. return invalidParams
  10982. }
  10983. return nil
  10984. }
  10985. // SetBucket sets the Bucket field's value.
  10986. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  10987. s.Bucket = &v
  10988. return s
  10989. }
  10990. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  10991. if s.Bucket == nil {
  10992. return v
  10993. }
  10994. return *s.Bucket
  10995. }
  10996. type GetBucketWebsiteOutput struct {
  10997. _ struct{} `type:"structure"`
  10998. ErrorDocument *ErrorDocument `type:"structure"`
  10999. IndexDocument *IndexDocument `type:"structure"`
  11000. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  11001. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  11002. }
  11003. // String returns the string representation
  11004. func (s GetBucketWebsiteOutput) String() string {
  11005. return awsutil.Prettify(s)
  11006. }
  11007. // GoString returns the string representation
  11008. func (s GetBucketWebsiteOutput) GoString() string {
  11009. return s.String()
  11010. }
  11011. // SetErrorDocument sets the ErrorDocument field's value.
  11012. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  11013. s.ErrorDocument = v
  11014. return s
  11015. }
  11016. // SetIndexDocument sets the IndexDocument field's value.
  11017. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  11018. s.IndexDocument = v
  11019. return s
  11020. }
  11021. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  11022. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  11023. s.RedirectAllRequestsTo = v
  11024. return s
  11025. }
  11026. // SetRoutingRules sets the RoutingRules field's value.
  11027. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  11028. s.RoutingRules = v
  11029. return s
  11030. }
  11031. type GetObjectAclInput struct {
  11032. _ struct{} `type:"structure"`
  11033. // Bucket is a required field
  11034. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11035. // Key is a required field
  11036. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11037. // Confirms that the requester knows that she or he will be charged for the
  11038. // request. Bucket owners need not specify this parameter in their requests.
  11039. // Documentation on downloading objects from requester pays buckets can be found
  11040. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11041. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11042. // VersionId used to reference a specific version of the object.
  11043. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11044. }
  11045. // String returns the string representation
  11046. func (s GetObjectAclInput) String() string {
  11047. return awsutil.Prettify(s)
  11048. }
  11049. // GoString returns the string representation
  11050. func (s GetObjectAclInput) GoString() string {
  11051. return s.String()
  11052. }
  11053. // Validate inspects the fields of the type to determine if they are valid.
  11054. func (s *GetObjectAclInput) Validate() error {
  11055. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  11056. if s.Bucket == nil {
  11057. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11058. }
  11059. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11060. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11061. }
  11062. if s.Key == nil {
  11063. invalidParams.Add(request.NewErrParamRequired("Key"))
  11064. }
  11065. if s.Key != nil && len(*s.Key) < 1 {
  11066. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11067. }
  11068. if invalidParams.Len() > 0 {
  11069. return invalidParams
  11070. }
  11071. return nil
  11072. }
  11073. // SetBucket sets the Bucket field's value.
  11074. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  11075. s.Bucket = &v
  11076. return s
  11077. }
  11078. func (s *GetObjectAclInput) getBucket() (v string) {
  11079. if s.Bucket == nil {
  11080. return v
  11081. }
  11082. return *s.Bucket
  11083. }
  11084. // SetKey sets the Key field's value.
  11085. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  11086. s.Key = &v
  11087. return s
  11088. }
  11089. // SetRequestPayer sets the RequestPayer field's value.
  11090. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  11091. s.RequestPayer = &v
  11092. return s
  11093. }
  11094. // SetVersionId sets the VersionId field's value.
  11095. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  11096. s.VersionId = &v
  11097. return s
  11098. }
  11099. type GetObjectAclOutput struct {
  11100. _ struct{} `type:"structure"`
  11101. // A list of grants.
  11102. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  11103. Owner *Owner `type:"structure"`
  11104. // If present, indicates that the requester was successfully charged for the
  11105. // request.
  11106. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11107. }
  11108. // String returns the string representation
  11109. func (s GetObjectAclOutput) String() string {
  11110. return awsutil.Prettify(s)
  11111. }
  11112. // GoString returns the string representation
  11113. func (s GetObjectAclOutput) GoString() string {
  11114. return s.String()
  11115. }
  11116. // SetGrants sets the Grants field's value.
  11117. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  11118. s.Grants = v
  11119. return s
  11120. }
  11121. // SetOwner sets the Owner field's value.
  11122. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  11123. s.Owner = v
  11124. return s
  11125. }
  11126. // SetRequestCharged sets the RequestCharged field's value.
  11127. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  11128. s.RequestCharged = &v
  11129. return s
  11130. }
  11131. type GetObjectInput struct {
  11132. _ struct{} `type:"structure"`
  11133. // Bucket is a required field
  11134. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11135. // Return the object only if its entity tag (ETag) is the same as the one specified,
  11136. // otherwise return a 412 (precondition failed).
  11137. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  11138. // Return the object only if it has been modified since the specified time,
  11139. // otherwise return a 304 (not modified).
  11140. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  11141. // Return the object only if its entity tag (ETag) is different from the one
  11142. // specified, otherwise return a 304 (not modified).
  11143. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  11144. // Return the object only if it has not been modified since the specified time,
  11145. // otherwise return a 412 (precondition failed).
  11146. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  11147. // Key is a required field
  11148. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11149. // Part number of the object being read. This is a positive integer between
  11150. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  11151. // Useful for downloading just a part of an object.
  11152. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  11153. // Downloads the specified range bytes of an object. For more information about
  11154. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  11155. Range *string `location:"header" locationName:"Range" type:"string"`
  11156. // Confirms that the requester knows that she or he will be charged for the
  11157. // request. Bucket owners need not specify this parameter in their requests.
  11158. // Documentation on downloading objects from requester pays buckets can be found
  11159. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11160. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11161. // Sets the Cache-Control header of the response.
  11162. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  11163. // Sets the Content-Disposition header of the response
  11164. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  11165. // Sets the Content-Encoding header of the response.
  11166. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  11167. // Sets the Content-Language header of the response.
  11168. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  11169. // Sets the Content-Type header of the response.
  11170. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  11171. // Sets the Expires header of the response.
  11172. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp"`
  11173. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  11174. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11175. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  11176. // data. This value is used to store the object and then it is discarded; Amazon
  11177. // does not store the encryption key. The key must be appropriate for use with
  11178. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  11179. // header.
  11180. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  11181. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  11182. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  11183. // key was transmitted without error.
  11184. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11185. // VersionId used to reference a specific version of the object.
  11186. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11187. }
  11188. // String returns the string representation
  11189. func (s GetObjectInput) String() string {
  11190. return awsutil.Prettify(s)
  11191. }
  11192. // GoString returns the string representation
  11193. func (s GetObjectInput) GoString() string {
  11194. return s.String()
  11195. }
  11196. // Validate inspects the fields of the type to determine if they are valid.
  11197. func (s *GetObjectInput) Validate() error {
  11198. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  11199. if s.Bucket == nil {
  11200. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11201. }
  11202. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11203. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11204. }
  11205. if s.Key == nil {
  11206. invalidParams.Add(request.NewErrParamRequired("Key"))
  11207. }
  11208. if s.Key != nil && len(*s.Key) < 1 {
  11209. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11210. }
  11211. if invalidParams.Len() > 0 {
  11212. return invalidParams
  11213. }
  11214. return nil
  11215. }
  11216. // SetBucket sets the Bucket field's value.
  11217. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  11218. s.Bucket = &v
  11219. return s
  11220. }
  11221. func (s *GetObjectInput) getBucket() (v string) {
  11222. if s.Bucket == nil {
  11223. return v
  11224. }
  11225. return *s.Bucket
  11226. }
  11227. // SetIfMatch sets the IfMatch field's value.
  11228. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  11229. s.IfMatch = &v
  11230. return s
  11231. }
  11232. // SetIfModifiedSince sets the IfModifiedSince field's value.
  11233. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  11234. s.IfModifiedSince = &v
  11235. return s
  11236. }
  11237. // SetIfNoneMatch sets the IfNoneMatch field's value.
  11238. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  11239. s.IfNoneMatch = &v
  11240. return s
  11241. }
  11242. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  11243. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  11244. s.IfUnmodifiedSince = &v
  11245. return s
  11246. }
  11247. // SetKey sets the Key field's value.
  11248. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  11249. s.Key = &v
  11250. return s
  11251. }
  11252. // SetPartNumber sets the PartNumber field's value.
  11253. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  11254. s.PartNumber = &v
  11255. return s
  11256. }
  11257. // SetRange sets the Range field's value.
  11258. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  11259. s.Range = &v
  11260. return s
  11261. }
  11262. // SetRequestPayer sets the RequestPayer field's value.
  11263. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  11264. s.RequestPayer = &v
  11265. return s
  11266. }
  11267. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  11268. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  11269. s.ResponseCacheControl = &v
  11270. return s
  11271. }
  11272. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  11273. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  11274. s.ResponseContentDisposition = &v
  11275. return s
  11276. }
  11277. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  11278. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  11279. s.ResponseContentEncoding = &v
  11280. return s
  11281. }
  11282. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  11283. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  11284. s.ResponseContentLanguage = &v
  11285. return s
  11286. }
  11287. // SetResponseContentType sets the ResponseContentType field's value.
  11288. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  11289. s.ResponseContentType = &v
  11290. return s
  11291. }
  11292. // SetResponseExpires sets the ResponseExpires field's value.
  11293. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  11294. s.ResponseExpires = &v
  11295. return s
  11296. }
  11297. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11298. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  11299. s.SSECustomerAlgorithm = &v
  11300. return s
  11301. }
  11302. // SetSSECustomerKey sets the SSECustomerKey field's value.
  11303. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  11304. s.SSECustomerKey = &v
  11305. return s
  11306. }
  11307. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  11308. if s.SSECustomerKey == nil {
  11309. return v
  11310. }
  11311. return *s.SSECustomerKey
  11312. }
  11313. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11314. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  11315. s.SSECustomerKeyMD5 = &v
  11316. return s
  11317. }
  11318. // SetVersionId sets the VersionId field's value.
  11319. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  11320. s.VersionId = &v
  11321. return s
  11322. }
  11323. type GetObjectLegalHoldInput struct {
  11324. _ struct{} `type:"structure"`
  11325. // The bucket containing the object whose Legal Hold status you want to retrieve.
  11326. //
  11327. // Bucket is a required field
  11328. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11329. // The key name for the object whose Legal Hold status you want to retrieve.
  11330. //
  11331. // Key is a required field
  11332. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11333. // Confirms that the requester knows that she or he will be charged for the
  11334. // request. Bucket owners need not specify this parameter in their requests.
  11335. // Documentation on downloading objects from requester pays buckets can be found
  11336. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11337. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11338. // The version ID of the object whose Legal Hold status you want to retrieve.
  11339. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11340. }
  11341. // String returns the string representation
  11342. func (s GetObjectLegalHoldInput) String() string {
  11343. return awsutil.Prettify(s)
  11344. }
  11345. // GoString returns the string representation
  11346. func (s GetObjectLegalHoldInput) GoString() string {
  11347. return s.String()
  11348. }
  11349. // Validate inspects the fields of the type to determine if they are valid.
  11350. func (s *GetObjectLegalHoldInput) Validate() error {
  11351. invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"}
  11352. if s.Bucket == nil {
  11353. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11354. }
  11355. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11356. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11357. }
  11358. if s.Key == nil {
  11359. invalidParams.Add(request.NewErrParamRequired("Key"))
  11360. }
  11361. if s.Key != nil && len(*s.Key) < 1 {
  11362. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11363. }
  11364. if invalidParams.Len() > 0 {
  11365. return invalidParams
  11366. }
  11367. return nil
  11368. }
  11369. // SetBucket sets the Bucket field's value.
  11370. func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput {
  11371. s.Bucket = &v
  11372. return s
  11373. }
  11374. func (s *GetObjectLegalHoldInput) getBucket() (v string) {
  11375. if s.Bucket == nil {
  11376. return v
  11377. }
  11378. return *s.Bucket
  11379. }
  11380. // SetKey sets the Key field's value.
  11381. func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput {
  11382. s.Key = &v
  11383. return s
  11384. }
  11385. // SetRequestPayer sets the RequestPayer field's value.
  11386. func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput {
  11387. s.RequestPayer = &v
  11388. return s
  11389. }
  11390. // SetVersionId sets the VersionId field's value.
  11391. func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput {
  11392. s.VersionId = &v
  11393. return s
  11394. }
  11395. type GetObjectLegalHoldOutput struct {
  11396. _ struct{} `type:"structure" payload:"LegalHold"`
  11397. // The current Legal Hold status for the specified object.
  11398. LegalHold *ObjectLockLegalHold `type:"structure"`
  11399. }
  11400. // String returns the string representation
  11401. func (s GetObjectLegalHoldOutput) String() string {
  11402. return awsutil.Prettify(s)
  11403. }
  11404. // GoString returns the string representation
  11405. func (s GetObjectLegalHoldOutput) GoString() string {
  11406. return s.String()
  11407. }
  11408. // SetLegalHold sets the LegalHold field's value.
  11409. func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput {
  11410. s.LegalHold = v
  11411. return s
  11412. }
  11413. type GetObjectLockConfigurationInput struct {
  11414. _ struct{} `type:"structure"`
  11415. // The bucket whose Object Lock configuration you want to retrieve.
  11416. //
  11417. // Bucket is a required field
  11418. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11419. }
  11420. // String returns the string representation
  11421. func (s GetObjectLockConfigurationInput) String() string {
  11422. return awsutil.Prettify(s)
  11423. }
  11424. // GoString returns the string representation
  11425. func (s GetObjectLockConfigurationInput) GoString() string {
  11426. return s.String()
  11427. }
  11428. // Validate inspects the fields of the type to determine if they are valid.
  11429. func (s *GetObjectLockConfigurationInput) Validate() error {
  11430. invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"}
  11431. if s.Bucket == nil {
  11432. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11433. }
  11434. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11435. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11436. }
  11437. if invalidParams.Len() > 0 {
  11438. return invalidParams
  11439. }
  11440. return nil
  11441. }
  11442. // SetBucket sets the Bucket field's value.
  11443. func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput {
  11444. s.Bucket = &v
  11445. return s
  11446. }
  11447. func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
  11448. if s.Bucket == nil {
  11449. return v
  11450. }
  11451. return *s.Bucket
  11452. }
  11453. type GetObjectLockConfigurationOutput struct {
  11454. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  11455. // The specified bucket's Object Lock configuration.
  11456. ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
  11457. }
  11458. // String returns the string representation
  11459. func (s GetObjectLockConfigurationOutput) String() string {
  11460. return awsutil.Prettify(s)
  11461. }
  11462. // GoString returns the string representation
  11463. func (s GetObjectLockConfigurationOutput) GoString() string {
  11464. return s.String()
  11465. }
  11466. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  11467. func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput {
  11468. s.ObjectLockConfiguration = v
  11469. return s
  11470. }
  11471. type GetObjectOutput struct {
  11472. _ struct{} `type:"structure" payload:"Body"`
  11473. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  11474. // Object data.
  11475. Body io.ReadCloser `type:"blob"`
  11476. // Specifies caching behavior along the request/reply chain.
  11477. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  11478. // Specifies presentational information for the object.
  11479. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  11480. // Specifies what content encodings have been applied to the object and thus
  11481. // what decoding mechanisms must be applied to obtain the media-type referenced
  11482. // by the Content-Type header field.
  11483. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  11484. // The language the content is in.
  11485. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  11486. // Size of the body in bytes.
  11487. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  11488. // The portion of the object returned in the response.
  11489. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  11490. // A standard MIME type describing the format of the object data.
  11491. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  11492. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  11493. // Marker. If false, this response header does not appear in the response.
  11494. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  11495. // An ETag is an opaque identifier assigned by a web server to a specific version
  11496. // of a resource found at a URL
  11497. ETag *string `location:"header" locationName:"ETag" type:"string"`
  11498. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  11499. // includes this header. It includes the expiry-date and rule-id key value pairs
  11500. // providing object expiration information. The value of the rule-id is URL
  11501. // encoded.
  11502. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  11503. // The date and time at which the object is no longer cacheable.
  11504. Expires *string `location:"header" locationName:"Expires" type:"string"`
  11505. // Last modified date of the object
  11506. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  11507. // A map of metadata to store with the object in S3.
  11508. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  11509. // This is set to the number of metadata entries not returned in x-amz-meta
  11510. // headers. This can happen if you create metadata using an API like SOAP that
  11511. // supports more flexible metadata than the REST API. For example, using SOAP,
  11512. // you can create metadata whose values are not legal HTTP headers.
  11513. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  11514. // Indicates whether this object has an active legal hold. This field is only
  11515. // returned if you have permission to view an object's legal hold status.
  11516. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  11517. // The Object Lock mode currently in place for this object.
  11518. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  11519. // The date and time when this object's Object Lock will expire.
  11520. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  11521. // The count of parts this object has.
  11522. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  11523. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  11524. // If present, indicates that the requester was successfully charged for the
  11525. // request.
  11526. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11527. // Provides information about object restoration operation and expiration time
  11528. // of the restored object copy.
  11529. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  11530. // If server-side encryption with a customer-provided encryption key was requested,
  11531. // the response will include this header confirming the encryption algorithm
  11532. // used.
  11533. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  11534. // If server-side encryption with a customer-provided encryption key was requested,
  11535. // the response will include this header to provide round trip message integrity
  11536. // verification of the customer-provided encryption key.
  11537. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  11538. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  11539. // encryption key that was used for the object.
  11540. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  11541. // The Server-side encryption algorithm used when storing this object in S3
  11542. // (e.g., AES256, aws:kms).
  11543. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  11544. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  11545. // The number of tags, if any, on the object.
  11546. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  11547. // Version of the object.
  11548. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11549. // If the bucket is configured as a website, redirects requests for this object
  11550. // to another object in the same bucket or to an external URL. Amazon S3 stores
  11551. // the value of this header in the object metadata.
  11552. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  11553. }
  11554. // String returns the string representation
  11555. func (s GetObjectOutput) String() string {
  11556. return awsutil.Prettify(s)
  11557. }
  11558. // GoString returns the string representation
  11559. func (s GetObjectOutput) GoString() string {
  11560. return s.String()
  11561. }
  11562. // SetAcceptRanges sets the AcceptRanges field's value.
  11563. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  11564. s.AcceptRanges = &v
  11565. return s
  11566. }
  11567. // SetBody sets the Body field's value.
  11568. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  11569. s.Body = v
  11570. return s
  11571. }
  11572. // SetCacheControl sets the CacheControl field's value.
  11573. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  11574. s.CacheControl = &v
  11575. return s
  11576. }
  11577. // SetContentDisposition sets the ContentDisposition field's value.
  11578. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  11579. s.ContentDisposition = &v
  11580. return s
  11581. }
  11582. // SetContentEncoding sets the ContentEncoding field's value.
  11583. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  11584. s.ContentEncoding = &v
  11585. return s
  11586. }
  11587. // SetContentLanguage sets the ContentLanguage field's value.
  11588. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  11589. s.ContentLanguage = &v
  11590. return s
  11591. }
  11592. // SetContentLength sets the ContentLength field's value.
  11593. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  11594. s.ContentLength = &v
  11595. return s
  11596. }
  11597. // SetContentRange sets the ContentRange field's value.
  11598. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  11599. s.ContentRange = &v
  11600. return s
  11601. }
  11602. // SetContentType sets the ContentType field's value.
  11603. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  11604. s.ContentType = &v
  11605. return s
  11606. }
  11607. // SetDeleteMarker sets the DeleteMarker field's value.
  11608. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  11609. s.DeleteMarker = &v
  11610. return s
  11611. }
  11612. // SetETag sets the ETag field's value.
  11613. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  11614. s.ETag = &v
  11615. return s
  11616. }
  11617. // SetExpiration sets the Expiration field's value.
  11618. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  11619. s.Expiration = &v
  11620. return s
  11621. }
  11622. // SetExpires sets the Expires field's value.
  11623. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  11624. s.Expires = &v
  11625. return s
  11626. }
  11627. // SetLastModified sets the LastModified field's value.
  11628. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  11629. s.LastModified = &v
  11630. return s
  11631. }
  11632. // SetMetadata sets the Metadata field's value.
  11633. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  11634. s.Metadata = v
  11635. return s
  11636. }
  11637. // SetMissingMeta sets the MissingMeta field's value.
  11638. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  11639. s.MissingMeta = &v
  11640. return s
  11641. }
  11642. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  11643. func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput {
  11644. s.ObjectLockLegalHoldStatus = &v
  11645. return s
  11646. }
  11647. // SetObjectLockMode sets the ObjectLockMode field's value.
  11648. func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput {
  11649. s.ObjectLockMode = &v
  11650. return s
  11651. }
  11652. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  11653. func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput {
  11654. s.ObjectLockRetainUntilDate = &v
  11655. return s
  11656. }
  11657. // SetPartsCount sets the PartsCount field's value.
  11658. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  11659. s.PartsCount = &v
  11660. return s
  11661. }
  11662. // SetReplicationStatus sets the ReplicationStatus field's value.
  11663. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  11664. s.ReplicationStatus = &v
  11665. return s
  11666. }
  11667. // SetRequestCharged sets the RequestCharged field's value.
  11668. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  11669. s.RequestCharged = &v
  11670. return s
  11671. }
  11672. // SetRestore sets the Restore field's value.
  11673. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  11674. s.Restore = &v
  11675. return s
  11676. }
  11677. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  11678. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  11679. s.SSECustomerAlgorithm = &v
  11680. return s
  11681. }
  11682. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11683. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  11684. s.SSECustomerKeyMD5 = &v
  11685. return s
  11686. }
  11687. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11688. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  11689. s.SSEKMSKeyId = &v
  11690. return s
  11691. }
  11692. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11693. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  11694. s.ServerSideEncryption = &v
  11695. return s
  11696. }
  11697. // SetStorageClass sets the StorageClass field's value.
  11698. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  11699. s.StorageClass = &v
  11700. return s
  11701. }
  11702. // SetTagCount sets the TagCount field's value.
  11703. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  11704. s.TagCount = &v
  11705. return s
  11706. }
  11707. // SetVersionId sets the VersionId field's value.
  11708. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  11709. s.VersionId = &v
  11710. return s
  11711. }
  11712. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  11713. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  11714. s.WebsiteRedirectLocation = &v
  11715. return s
  11716. }
  11717. type GetObjectRetentionInput struct {
  11718. _ struct{} `type:"structure"`
  11719. // The bucket containing the object whose retention settings you want to retrieve.
  11720. //
  11721. // Bucket is a required field
  11722. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11723. // The key name for the object whose retention settings you want to retrieve.
  11724. //
  11725. // Key is a required field
  11726. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11727. // Confirms that the requester knows that she or he will be charged for the
  11728. // request. Bucket owners need not specify this parameter in their requests.
  11729. // Documentation on downloading objects from requester pays buckets can be found
  11730. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11731. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11732. // The version ID for the object whose retention settings you want to retrieve.
  11733. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11734. }
  11735. // String returns the string representation
  11736. func (s GetObjectRetentionInput) String() string {
  11737. return awsutil.Prettify(s)
  11738. }
  11739. // GoString returns the string representation
  11740. func (s GetObjectRetentionInput) GoString() string {
  11741. return s.String()
  11742. }
  11743. // Validate inspects the fields of the type to determine if they are valid.
  11744. func (s *GetObjectRetentionInput) Validate() error {
  11745. invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"}
  11746. if s.Bucket == nil {
  11747. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11748. }
  11749. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11750. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11751. }
  11752. if s.Key == nil {
  11753. invalidParams.Add(request.NewErrParamRequired("Key"))
  11754. }
  11755. if s.Key != nil && len(*s.Key) < 1 {
  11756. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11757. }
  11758. if invalidParams.Len() > 0 {
  11759. return invalidParams
  11760. }
  11761. return nil
  11762. }
  11763. // SetBucket sets the Bucket field's value.
  11764. func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput {
  11765. s.Bucket = &v
  11766. return s
  11767. }
  11768. func (s *GetObjectRetentionInput) getBucket() (v string) {
  11769. if s.Bucket == nil {
  11770. return v
  11771. }
  11772. return *s.Bucket
  11773. }
  11774. // SetKey sets the Key field's value.
  11775. func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput {
  11776. s.Key = &v
  11777. return s
  11778. }
  11779. // SetRequestPayer sets the RequestPayer field's value.
  11780. func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput {
  11781. s.RequestPayer = &v
  11782. return s
  11783. }
  11784. // SetVersionId sets the VersionId field's value.
  11785. func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
  11786. s.VersionId = &v
  11787. return s
  11788. }
  11789. type GetObjectRetentionOutput struct {
  11790. _ struct{} `type:"structure" payload:"Retention"`
  11791. // The container element for an object's retention settings.
  11792. Retention *ObjectLockRetention `type:"structure"`
  11793. }
  11794. // String returns the string representation
  11795. func (s GetObjectRetentionOutput) String() string {
  11796. return awsutil.Prettify(s)
  11797. }
  11798. // GoString returns the string representation
  11799. func (s GetObjectRetentionOutput) GoString() string {
  11800. return s.String()
  11801. }
  11802. // SetRetention sets the Retention field's value.
  11803. func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
  11804. s.Retention = v
  11805. return s
  11806. }
  11807. type GetObjectTaggingInput struct {
  11808. _ struct{} `type:"structure"`
  11809. // Bucket is a required field
  11810. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11811. // Key is a required field
  11812. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11813. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  11814. }
  11815. // String returns the string representation
  11816. func (s GetObjectTaggingInput) String() string {
  11817. return awsutil.Prettify(s)
  11818. }
  11819. // GoString returns the string representation
  11820. func (s GetObjectTaggingInput) GoString() string {
  11821. return s.String()
  11822. }
  11823. // Validate inspects the fields of the type to determine if they are valid.
  11824. func (s *GetObjectTaggingInput) Validate() error {
  11825. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  11826. if s.Bucket == nil {
  11827. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11828. }
  11829. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11830. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11831. }
  11832. if s.Key == nil {
  11833. invalidParams.Add(request.NewErrParamRequired("Key"))
  11834. }
  11835. if s.Key != nil && len(*s.Key) < 1 {
  11836. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11837. }
  11838. if invalidParams.Len() > 0 {
  11839. return invalidParams
  11840. }
  11841. return nil
  11842. }
  11843. // SetBucket sets the Bucket field's value.
  11844. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  11845. s.Bucket = &v
  11846. return s
  11847. }
  11848. func (s *GetObjectTaggingInput) getBucket() (v string) {
  11849. if s.Bucket == nil {
  11850. return v
  11851. }
  11852. return *s.Bucket
  11853. }
  11854. // SetKey sets the Key field's value.
  11855. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  11856. s.Key = &v
  11857. return s
  11858. }
  11859. // SetVersionId sets the VersionId field's value.
  11860. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  11861. s.VersionId = &v
  11862. return s
  11863. }
  11864. type GetObjectTaggingOutput struct {
  11865. _ struct{} `type:"structure"`
  11866. // TagSet is a required field
  11867. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  11868. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  11869. }
  11870. // String returns the string representation
  11871. func (s GetObjectTaggingOutput) String() string {
  11872. return awsutil.Prettify(s)
  11873. }
  11874. // GoString returns the string representation
  11875. func (s GetObjectTaggingOutput) GoString() string {
  11876. return s.String()
  11877. }
  11878. // SetTagSet sets the TagSet field's value.
  11879. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  11880. s.TagSet = v
  11881. return s
  11882. }
  11883. // SetVersionId sets the VersionId field's value.
  11884. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  11885. s.VersionId = &v
  11886. return s
  11887. }
  11888. type GetObjectTorrentInput struct {
  11889. _ struct{} `type:"structure"`
  11890. // Bucket is a required field
  11891. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11892. // Key is a required field
  11893. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  11894. // Confirms that the requester knows that she or he will be charged for the
  11895. // request. Bucket owners need not specify this parameter in their requests.
  11896. // Documentation on downloading objects from requester pays buckets can be found
  11897. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  11898. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11899. }
  11900. // String returns the string representation
  11901. func (s GetObjectTorrentInput) String() string {
  11902. return awsutil.Prettify(s)
  11903. }
  11904. // GoString returns the string representation
  11905. func (s GetObjectTorrentInput) GoString() string {
  11906. return s.String()
  11907. }
  11908. // Validate inspects the fields of the type to determine if they are valid.
  11909. func (s *GetObjectTorrentInput) Validate() error {
  11910. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  11911. if s.Bucket == nil {
  11912. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11913. }
  11914. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11915. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11916. }
  11917. if s.Key == nil {
  11918. invalidParams.Add(request.NewErrParamRequired("Key"))
  11919. }
  11920. if s.Key != nil && len(*s.Key) < 1 {
  11921. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  11922. }
  11923. if invalidParams.Len() > 0 {
  11924. return invalidParams
  11925. }
  11926. return nil
  11927. }
  11928. // SetBucket sets the Bucket field's value.
  11929. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  11930. s.Bucket = &v
  11931. return s
  11932. }
  11933. func (s *GetObjectTorrentInput) getBucket() (v string) {
  11934. if s.Bucket == nil {
  11935. return v
  11936. }
  11937. return *s.Bucket
  11938. }
  11939. // SetKey sets the Key field's value.
  11940. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  11941. s.Key = &v
  11942. return s
  11943. }
  11944. // SetRequestPayer sets the RequestPayer field's value.
  11945. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  11946. s.RequestPayer = &v
  11947. return s
  11948. }
  11949. type GetObjectTorrentOutput struct {
  11950. _ struct{} `type:"structure" payload:"Body"`
  11951. Body io.ReadCloser `type:"blob"`
  11952. // If present, indicates that the requester was successfully charged for the
  11953. // request.
  11954. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  11955. }
  11956. // String returns the string representation
  11957. func (s GetObjectTorrentOutput) String() string {
  11958. return awsutil.Prettify(s)
  11959. }
  11960. // GoString returns the string representation
  11961. func (s GetObjectTorrentOutput) GoString() string {
  11962. return s.String()
  11963. }
  11964. // SetBody sets the Body field's value.
  11965. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  11966. s.Body = v
  11967. return s
  11968. }
  11969. // SetRequestCharged sets the RequestCharged field's value.
  11970. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  11971. s.RequestCharged = &v
  11972. return s
  11973. }
  11974. type GetPublicAccessBlockInput struct {
  11975. _ struct{} `type:"structure"`
  11976. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  11977. // want to retrieve.
  11978. //
  11979. // Bucket is a required field
  11980. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11981. }
  11982. // String returns the string representation
  11983. func (s GetPublicAccessBlockInput) String() string {
  11984. return awsutil.Prettify(s)
  11985. }
  11986. // GoString returns the string representation
  11987. func (s GetPublicAccessBlockInput) GoString() string {
  11988. return s.String()
  11989. }
  11990. // Validate inspects the fields of the type to determine if they are valid.
  11991. func (s *GetPublicAccessBlockInput) Validate() error {
  11992. invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"}
  11993. if s.Bucket == nil {
  11994. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11995. }
  11996. if s.Bucket != nil && len(*s.Bucket) < 1 {
  11997. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  11998. }
  11999. if invalidParams.Len() > 0 {
  12000. return invalidParams
  12001. }
  12002. return nil
  12003. }
  12004. // SetBucket sets the Bucket field's value.
  12005. func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput {
  12006. s.Bucket = &v
  12007. return s
  12008. }
  12009. func (s *GetPublicAccessBlockInput) getBucket() (v string) {
  12010. if s.Bucket == nil {
  12011. return v
  12012. }
  12013. return *s.Bucket
  12014. }
  12015. type GetPublicAccessBlockOutput struct {
  12016. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  12017. // The PublicAccessBlock configuration currently in effect for this Amazon S3
  12018. // bucket.
  12019. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"`
  12020. }
  12021. // String returns the string representation
  12022. func (s GetPublicAccessBlockOutput) String() string {
  12023. return awsutil.Prettify(s)
  12024. }
  12025. // GoString returns the string representation
  12026. func (s GetPublicAccessBlockOutput) GoString() string {
  12027. return s.String()
  12028. }
  12029. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  12030. func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput {
  12031. s.PublicAccessBlockConfiguration = v
  12032. return s
  12033. }
  12034. type GlacierJobParameters struct {
  12035. _ struct{} `type:"structure"`
  12036. // Glacier retrieval tier at which the restore will be processed.
  12037. //
  12038. // Tier is a required field
  12039. Tier *string `type:"string" required:"true" enum:"Tier"`
  12040. }
  12041. // String returns the string representation
  12042. func (s GlacierJobParameters) String() string {
  12043. return awsutil.Prettify(s)
  12044. }
  12045. // GoString returns the string representation
  12046. func (s GlacierJobParameters) GoString() string {
  12047. return s.String()
  12048. }
  12049. // Validate inspects the fields of the type to determine if they are valid.
  12050. func (s *GlacierJobParameters) Validate() error {
  12051. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  12052. if s.Tier == nil {
  12053. invalidParams.Add(request.NewErrParamRequired("Tier"))
  12054. }
  12055. if invalidParams.Len() > 0 {
  12056. return invalidParams
  12057. }
  12058. return nil
  12059. }
  12060. // SetTier sets the Tier field's value.
  12061. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  12062. s.Tier = &v
  12063. return s
  12064. }
  12065. type Grant struct {
  12066. _ struct{} `type:"structure"`
  12067. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  12068. // Specifies the permission given to the grantee.
  12069. Permission *string `type:"string" enum:"Permission"`
  12070. }
  12071. // String returns the string representation
  12072. func (s Grant) String() string {
  12073. return awsutil.Prettify(s)
  12074. }
  12075. // GoString returns the string representation
  12076. func (s Grant) GoString() string {
  12077. return s.String()
  12078. }
  12079. // Validate inspects the fields of the type to determine if they are valid.
  12080. func (s *Grant) Validate() error {
  12081. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  12082. if s.Grantee != nil {
  12083. if err := s.Grantee.Validate(); err != nil {
  12084. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  12085. }
  12086. }
  12087. if invalidParams.Len() > 0 {
  12088. return invalidParams
  12089. }
  12090. return nil
  12091. }
  12092. // SetGrantee sets the Grantee field's value.
  12093. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  12094. s.Grantee = v
  12095. return s
  12096. }
  12097. // SetPermission sets the Permission field's value.
  12098. func (s *Grant) SetPermission(v string) *Grant {
  12099. s.Permission = &v
  12100. return s
  12101. }
  12102. type Grantee struct {
  12103. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  12104. // Screen name of the grantee.
  12105. DisplayName *string `type:"string"`
  12106. // Email address of the grantee.
  12107. EmailAddress *string `type:"string"`
  12108. // The canonical user ID of the grantee.
  12109. ID *string `type:"string"`
  12110. // Type of grantee
  12111. //
  12112. // Type is a required field
  12113. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  12114. // URI of the grantee group.
  12115. URI *string `type:"string"`
  12116. }
  12117. // String returns the string representation
  12118. func (s Grantee) String() string {
  12119. return awsutil.Prettify(s)
  12120. }
  12121. // GoString returns the string representation
  12122. func (s Grantee) GoString() string {
  12123. return s.String()
  12124. }
  12125. // Validate inspects the fields of the type to determine if they are valid.
  12126. func (s *Grantee) Validate() error {
  12127. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  12128. if s.Type == nil {
  12129. invalidParams.Add(request.NewErrParamRequired("Type"))
  12130. }
  12131. if invalidParams.Len() > 0 {
  12132. return invalidParams
  12133. }
  12134. return nil
  12135. }
  12136. // SetDisplayName sets the DisplayName field's value.
  12137. func (s *Grantee) SetDisplayName(v string) *Grantee {
  12138. s.DisplayName = &v
  12139. return s
  12140. }
  12141. // SetEmailAddress sets the EmailAddress field's value.
  12142. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  12143. s.EmailAddress = &v
  12144. return s
  12145. }
  12146. // SetID sets the ID field's value.
  12147. func (s *Grantee) SetID(v string) *Grantee {
  12148. s.ID = &v
  12149. return s
  12150. }
  12151. // SetType sets the Type field's value.
  12152. func (s *Grantee) SetType(v string) *Grantee {
  12153. s.Type = &v
  12154. return s
  12155. }
  12156. // SetURI sets the URI field's value.
  12157. func (s *Grantee) SetURI(v string) *Grantee {
  12158. s.URI = &v
  12159. return s
  12160. }
  12161. type HeadBucketInput struct {
  12162. _ struct{} `type:"structure"`
  12163. // Bucket is a required field
  12164. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12165. }
  12166. // String returns the string representation
  12167. func (s HeadBucketInput) String() string {
  12168. return awsutil.Prettify(s)
  12169. }
  12170. // GoString returns the string representation
  12171. func (s HeadBucketInput) GoString() string {
  12172. return s.String()
  12173. }
  12174. // Validate inspects the fields of the type to determine if they are valid.
  12175. func (s *HeadBucketInput) Validate() error {
  12176. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  12177. if s.Bucket == nil {
  12178. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12179. }
  12180. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12181. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12182. }
  12183. if invalidParams.Len() > 0 {
  12184. return invalidParams
  12185. }
  12186. return nil
  12187. }
  12188. // SetBucket sets the Bucket field's value.
  12189. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  12190. s.Bucket = &v
  12191. return s
  12192. }
  12193. func (s *HeadBucketInput) getBucket() (v string) {
  12194. if s.Bucket == nil {
  12195. return v
  12196. }
  12197. return *s.Bucket
  12198. }
  12199. type HeadBucketOutput struct {
  12200. _ struct{} `type:"structure"`
  12201. }
  12202. // String returns the string representation
  12203. func (s HeadBucketOutput) String() string {
  12204. return awsutil.Prettify(s)
  12205. }
  12206. // GoString returns the string representation
  12207. func (s HeadBucketOutput) GoString() string {
  12208. return s.String()
  12209. }
  12210. type HeadObjectInput struct {
  12211. _ struct{} `type:"structure"`
  12212. // Bucket is a required field
  12213. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12214. // Return the object only if its entity tag (ETag) is the same as the one specified,
  12215. // otherwise return a 412 (precondition failed).
  12216. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  12217. // Return the object only if it has been modified since the specified time,
  12218. // otherwise return a 304 (not modified).
  12219. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
  12220. // Return the object only if its entity tag (ETag) is different from the one
  12221. // specified, otherwise return a 304 (not modified).
  12222. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  12223. // Return the object only if it has not been modified since the specified time,
  12224. // otherwise return a 412 (precondition failed).
  12225. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
  12226. // Key is a required field
  12227. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12228. // Part number of the object being read. This is a positive integer between
  12229. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  12230. // Useful querying about the size of the part and the number of parts in this
  12231. // object.
  12232. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  12233. // Downloads the specified range bytes of an object. For more information about
  12234. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  12235. Range *string `location:"header" locationName:"Range" type:"string"`
  12236. // Confirms that the requester knows that she or he will be charged for the
  12237. // request. Bucket owners need not specify this parameter in their requests.
  12238. // Documentation on downloading objects from requester pays buckets can be found
  12239. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  12240. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12241. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  12242. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12243. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  12244. // data. This value is used to store the object and then it is discarded; Amazon
  12245. // does not store the encryption key. The key must be appropriate for use with
  12246. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  12247. // header.
  12248. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  12249. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  12250. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  12251. // key was transmitted without error.
  12252. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12253. // VersionId used to reference a specific version of the object.
  12254. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  12255. }
  12256. // String returns the string representation
  12257. func (s HeadObjectInput) String() string {
  12258. return awsutil.Prettify(s)
  12259. }
  12260. // GoString returns the string representation
  12261. func (s HeadObjectInput) GoString() string {
  12262. return s.String()
  12263. }
  12264. // Validate inspects the fields of the type to determine if they are valid.
  12265. func (s *HeadObjectInput) Validate() error {
  12266. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  12267. if s.Bucket == nil {
  12268. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12269. }
  12270. if s.Bucket != nil && len(*s.Bucket) < 1 {
  12271. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  12272. }
  12273. if s.Key == nil {
  12274. invalidParams.Add(request.NewErrParamRequired("Key"))
  12275. }
  12276. if s.Key != nil && len(*s.Key) < 1 {
  12277. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12278. }
  12279. if invalidParams.Len() > 0 {
  12280. return invalidParams
  12281. }
  12282. return nil
  12283. }
  12284. // SetBucket sets the Bucket field's value.
  12285. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  12286. s.Bucket = &v
  12287. return s
  12288. }
  12289. func (s *HeadObjectInput) getBucket() (v string) {
  12290. if s.Bucket == nil {
  12291. return v
  12292. }
  12293. return *s.Bucket
  12294. }
  12295. // SetIfMatch sets the IfMatch field's value.
  12296. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  12297. s.IfMatch = &v
  12298. return s
  12299. }
  12300. // SetIfModifiedSince sets the IfModifiedSince field's value.
  12301. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  12302. s.IfModifiedSince = &v
  12303. return s
  12304. }
  12305. // SetIfNoneMatch sets the IfNoneMatch field's value.
  12306. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  12307. s.IfNoneMatch = &v
  12308. return s
  12309. }
  12310. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  12311. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  12312. s.IfUnmodifiedSince = &v
  12313. return s
  12314. }
  12315. // SetKey sets the Key field's value.
  12316. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  12317. s.Key = &v
  12318. return s
  12319. }
  12320. // SetPartNumber sets the PartNumber field's value.
  12321. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  12322. s.PartNumber = &v
  12323. return s
  12324. }
  12325. // SetRange sets the Range field's value.
  12326. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  12327. s.Range = &v
  12328. return s
  12329. }
  12330. // SetRequestPayer sets the RequestPayer field's value.
  12331. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  12332. s.RequestPayer = &v
  12333. return s
  12334. }
  12335. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12336. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  12337. s.SSECustomerAlgorithm = &v
  12338. return s
  12339. }
  12340. // SetSSECustomerKey sets the SSECustomerKey field's value.
  12341. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  12342. s.SSECustomerKey = &v
  12343. return s
  12344. }
  12345. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  12346. if s.SSECustomerKey == nil {
  12347. return v
  12348. }
  12349. return *s.SSECustomerKey
  12350. }
  12351. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12352. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  12353. s.SSECustomerKeyMD5 = &v
  12354. return s
  12355. }
  12356. // SetVersionId sets the VersionId field's value.
  12357. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  12358. s.VersionId = &v
  12359. return s
  12360. }
  12361. type HeadObjectOutput struct {
  12362. _ struct{} `type:"structure"`
  12363. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  12364. // Specifies caching behavior along the request/reply chain.
  12365. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  12366. // Specifies presentational information for the object.
  12367. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  12368. // Specifies what content encodings have been applied to the object and thus
  12369. // what decoding mechanisms must be applied to obtain the media-type referenced
  12370. // by the Content-Type header field.
  12371. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  12372. // The language the content is in.
  12373. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  12374. // Size of the body in bytes.
  12375. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  12376. // A standard MIME type describing the format of the object data.
  12377. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  12378. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  12379. // Marker. If false, this response header does not appear in the response.
  12380. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  12381. // An ETag is an opaque identifier assigned by a web server to a specific version
  12382. // of a resource found at a URL
  12383. ETag *string `location:"header" locationName:"ETag" type:"string"`
  12384. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  12385. // includes this header. It includes the expiry-date and rule-id key value pairs
  12386. // providing object expiration information. The value of the rule-id is URL
  12387. // encoded.
  12388. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  12389. // The date and time at which the object is no longer cacheable.
  12390. Expires *string `location:"header" locationName:"Expires" type:"string"`
  12391. // Last modified date of the object
  12392. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
  12393. // A map of metadata to store with the object in S3.
  12394. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  12395. // This is set to the number of metadata entries not returned in x-amz-meta
  12396. // headers. This can happen if you create metadata using an API like SOAP that
  12397. // supports more flexible metadata than the REST API. For example, using SOAP,
  12398. // you can create metadata whose values are not legal HTTP headers.
  12399. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  12400. // The Legal Hold status for the specified object.
  12401. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  12402. // The Object Lock mode currently in place for this object.
  12403. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  12404. // The date and time when this object's Object Lock will expire.
  12405. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  12406. // The count of parts this object has.
  12407. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  12408. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  12409. // If present, indicates that the requester was successfully charged for the
  12410. // request.
  12411. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12412. // Provides information about object restoration operation and expiration time
  12413. // of the restored object copy.
  12414. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  12415. // If server-side encryption with a customer-provided encryption key was requested,
  12416. // the response will include this header confirming the encryption algorithm
  12417. // used.
  12418. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  12419. // If server-side encryption with a customer-provided encryption key was requested,
  12420. // the response will include this header to provide round trip message integrity
  12421. // verification of the customer-provided encryption key.
  12422. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  12423. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  12424. // encryption key that was used for the object.
  12425. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  12426. // The Server-side encryption algorithm used when storing this object in S3
  12427. // (e.g., AES256, aws:kms).
  12428. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  12429. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  12430. // Version of the object.
  12431. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  12432. // If the bucket is configured as a website, redirects requests for this object
  12433. // to another object in the same bucket or to an external URL. Amazon S3 stores
  12434. // the value of this header in the object metadata.
  12435. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  12436. }
  12437. // String returns the string representation
  12438. func (s HeadObjectOutput) String() string {
  12439. return awsutil.Prettify(s)
  12440. }
  12441. // GoString returns the string representation
  12442. func (s HeadObjectOutput) GoString() string {
  12443. return s.String()
  12444. }
  12445. // SetAcceptRanges sets the AcceptRanges field's value.
  12446. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  12447. s.AcceptRanges = &v
  12448. return s
  12449. }
  12450. // SetCacheControl sets the CacheControl field's value.
  12451. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  12452. s.CacheControl = &v
  12453. return s
  12454. }
  12455. // SetContentDisposition sets the ContentDisposition field's value.
  12456. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  12457. s.ContentDisposition = &v
  12458. return s
  12459. }
  12460. // SetContentEncoding sets the ContentEncoding field's value.
  12461. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  12462. s.ContentEncoding = &v
  12463. return s
  12464. }
  12465. // SetContentLanguage sets the ContentLanguage field's value.
  12466. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  12467. s.ContentLanguage = &v
  12468. return s
  12469. }
  12470. // SetContentLength sets the ContentLength field's value.
  12471. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  12472. s.ContentLength = &v
  12473. return s
  12474. }
  12475. // SetContentType sets the ContentType field's value.
  12476. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  12477. s.ContentType = &v
  12478. return s
  12479. }
  12480. // SetDeleteMarker sets the DeleteMarker field's value.
  12481. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  12482. s.DeleteMarker = &v
  12483. return s
  12484. }
  12485. // SetETag sets the ETag field's value.
  12486. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  12487. s.ETag = &v
  12488. return s
  12489. }
  12490. // SetExpiration sets the Expiration field's value.
  12491. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  12492. s.Expiration = &v
  12493. return s
  12494. }
  12495. // SetExpires sets the Expires field's value.
  12496. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  12497. s.Expires = &v
  12498. return s
  12499. }
  12500. // SetLastModified sets the LastModified field's value.
  12501. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  12502. s.LastModified = &v
  12503. return s
  12504. }
  12505. // SetMetadata sets the Metadata field's value.
  12506. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  12507. s.Metadata = v
  12508. return s
  12509. }
  12510. // SetMissingMeta sets the MissingMeta field's value.
  12511. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  12512. s.MissingMeta = &v
  12513. return s
  12514. }
  12515. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  12516. func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput {
  12517. s.ObjectLockLegalHoldStatus = &v
  12518. return s
  12519. }
  12520. // SetObjectLockMode sets the ObjectLockMode field's value.
  12521. func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput {
  12522. s.ObjectLockMode = &v
  12523. return s
  12524. }
  12525. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  12526. func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput {
  12527. s.ObjectLockRetainUntilDate = &v
  12528. return s
  12529. }
  12530. // SetPartsCount sets the PartsCount field's value.
  12531. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  12532. s.PartsCount = &v
  12533. return s
  12534. }
  12535. // SetReplicationStatus sets the ReplicationStatus field's value.
  12536. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  12537. s.ReplicationStatus = &v
  12538. return s
  12539. }
  12540. // SetRequestCharged sets the RequestCharged field's value.
  12541. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  12542. s.RequestCharged = &v
  12543. return s
  12544. }
  12545. // SetRestore sets the Restore field's value.
  12546. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  12547. s.Restore = &v
  12548. return s
  12549. }
  12550. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  12551. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  12552. s.SSECustomerAlgorithm = &v
  12553. return s
  12554. }
  12555. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  12556. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  12557. s.SSECustomerKeyMD5 = &v
  12558. return s
  12559. }
  12560. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  12561. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  12562. s.SSEKMSKeyId = &v
  12563. return s
  12564. }
  12565. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  12566. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  12567. s.ServerSideEncryption = &v
  12568. return s
  12569. }
  12570. // SetStorageClass sets the StorageClass field's value.
  12571. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  12572. s.StorageClass = &v
  12573. return s
  12574. }
  12575. // SetVersionId sets the VersionId field's value.
  12576. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  12577. s.VersionId = &v
  12578. return s
  12579. }
  12580. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  12581. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  12582. s.WebsiteRedirectLocation = &v
  12583. return s
  12584. }
  12585. type IndexDocument struct {
  12586. _ struct{} `type:"structure"`
  12587. // A suffix that is appended to a request that is for a directory on the website
  12588. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  12589. // the data that is returned will be for the object with the key name images/index.html)
  12590. // The suffix must not be empty and must not include a slash character.
  12591. //
  12592. // Suffix is a required field
  12593. Suffix *string `type:"string" required:"true"`
  12594. }
  12595. // String returns the string representation
  12596. func (s IndexDocument) String() string {
  12597. return awsutil.Prettify(s)
  12598. }
  12599. // GoString returns the string representation
  12600. func (s IndexDocument) GoString() string {
  12601. return s.String()
  12602. }
  12603. // Validate inspects the fields of the type to determine if they are valid.
  12604. func (s *IndexDocument) Validate() error {
  12605. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  12606. if s.Suffix == nil {
  12607. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  12608. }
  12609. if invalidParams.Len() > 0 {
  12610. return invalidParams
  12611. }
  12612. return nil
  12613. }
  12614. // SetSuffix sets the Suffix field's value.
  12615. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  12616. s.Suffix = &v
  12617. return s
  12618. }
  12619. type Initiator struct {
  12620. _ struct{} `type:"structure"`
  12621. // Name of the Principal.
  12622. DisplayName *string `type:"string"`
  12623. // If the principal is an AWS account, it provides the Canonical User ID. If
  12624. // the principal is an IAM User, it provides a user ARN value.
  12625. ID *string `type:"string"`
  12626. }
  12627. // String returns the string representation
  12628. func (s Initiator) String() string {
  12629. return awsutil.Prettify(s)
  12630. }
  12631. // GoString returns the string representation
  12632. func (s Initiator) GoString() string {
  12633. return s.String()
  12634. }
  12635. // SetDisplayName sets the DisplayName field's value.
  12636. func (s *Initiator) SetDisplayName(v string) *Initiator {
  12637. s.DisplayName = &v
  12638. return s
  12639. }
  12640. // SetID sets the ID field's value.
  12641. func (s *Initiator) SetID(v string) *Initiator {
  12642. s.ID = &v
  12643. return s
  12644. }
  12645. // Describes the serialization format of the object.
  12646. type InputSerialization struct {
  12647. _ struct{} `type:"structure"`
  12648. // Describes the serialization of a CSV-encoded object.
  12649. CSV *CSVInput `type:"structure"`
  12650. // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
  12651. // Value: NONE.
  12652. CompressionType *string `type:"string" enum:"CompressionType"`
  12653. // Specifies JSON as object's input serialization format.
  12654. JSON *JSONInput `type:"structure"`
  12655. // Specifies Parquet as object's input serialization format.
  12656. Parquet *ParquetInput `type:"structure"`
  12657. }
  12658. // String returns the string representation
  12659. func (s InputSerialization) String() string {
  12660. return awsutil.Prettify(s)
  12661. }
  12662. // GoString returns the string representation
  12663. func (s InputSerialization) GoString() string {
  12664. return s.String()
  12665. }
  12666. // SetCSV sets the CSV field's value.
  12667. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  12668. s.CSV = v
  12669. return s
  12670. }
  12671. // SetCompressionType sets the CompressionType field's value.
  12672. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  12673. s.CompressionType = &v
  12674. return s
  12675. }
  12676. // SetJSON sets the JSON field's value.
  12677. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  12678. s.JSON = v
  12679. return s
  12680. }
  12681. // SetParquet sets the Parquet field's value.
  12682. func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
  12683. s.Parquet = v
  12684. return s
  12685. }
  12686. type InventoryConfiguration struct {
  12687. _ struct{} `type:"structure"`
  12688. // Contains information about where to publish the inventory results.
  12689. //
  12690. // Destination is a required field
  12691. Destination *InventoryDestination `type:"structure" required:"true"`
  12692. // Specifies an inventory filter. The inventory only includes objects that meet
  12693. // the filter's criteria.
  12694. Filter *InventoryFilter `type:"structure"`
  12695. // The ID used to identify the inventory configuration.
  12696. //
  12697. // Id is a required field
  12698. Id *string `type:"string" required:"true"`
  12699. // Specifies which object version(s) to included in the inventory results.
  12700. //
  12701. // IncludedObjectVersions is a required field
  12702. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  12703. // Specifies whether the inventory is enabled or disabled.
  12704. //
  12705. // IsEnabled is a required field
  12706. IsEnabled *bool `type:"boolean" required:"true"`
  12707. // Contains the optional fields that are included in the inventory results.
  12708. OptionalFields []*string `locationNameList:"Field" type:"list"`
  12709. // Specifies the schedule for generating inventory results.
  12710. //
  12711. // Schedule is a required field
  12712. Schedule *InventorySchedule `type:"structure" required:"true"`
  12713. }
  12714. // String returns the string representation
  12715. func (s InventoryConfiguration) String() string {
  12716. return awsutil.Prettify(s)
  12717. }
  12718. // GoString returns the string representation
  12719. func (s InventoryConfiguration) GoString() string {
  12720. return s.String()
  12721. }
  12722. // Validate inspects the fields of the type to determine if they are valid.
  12723. func (s *InventoryConfiguration) Validate() error {
  12724. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  12725. if s.Destination == nil {
  12726. invalidParams.Add(request.NewErrParamRequired("Destination"))
  12727. }
  12728. if s.Id == nil {
  12729. invalidParams.Add(request.NewErrParamRequired("Id"))
  12730. }
  12731. if s.IncludedObjectVersions == nil {
  12732. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  12733. }
  12734. if s.IsEnabled == nil {
  12735. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  12736. }
  12737. if s.Schedule == nil {
  12738. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  12739. }
  12740. if s.Destination != nil {
  12741. if err := s.Destination.Validate(); err != nil {
  12742. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  12743. }
  12744. }
  12745. if s.Filter != nil {
  12746. if err := s.Filter.Validate(); err != nil {
  12747. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  12748. }
  12749. }
  12750. if s.Schedule != nil {
  12751. if err := s.Schedule.Validate(); err != nil {
  12752. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  12753. }
  12754. }
  12755. if invalidParams.Len() > 0 {
  12756. return invalidParams
  12757. }
  12758. return nil
  12759. }
  12760. // SetDestination sets the Destination field's value.
  12761. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  12762. s.Destination = v
  12763. return s
  12764. }
  12765. // SetFilter sets the Filter field's value.
  12766. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  12767. s.Filter = v
  12768. return s
  12769. }
  12770. // SetId sets the Id field's value.
  12771. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  12772. s.Id = &v
  12773. return s
  12774. }
  12775. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  12776. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  12777. s.IncludedObjectVersions = &v
  12778. return s
  12779. }
  12780. // SetIsEnabled sets the IsEnabled field's value.
  12781. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  12782. s.IsEnabled = &v
  12783. return s
  12784. }
  12785. // SetOptionalFields sets the OptionalFields field's value.
  12786. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  12787. s.OptionalFields = v
  12788. return s
  12789. }
  12790. // SetSchedule sets the Schedule field's value.
  12791. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  12792. s.Schedule = v
  12793. return s
  12794. }
  12795. type InventoryDestination struct {
  12796. _ struct{} `type:"structure"`
  12797. // Contains the bucket name, file format, bucket owner (optional), and prefix
  12798. // (optional) where inventory results are published.
  12799. //
  12800. // S3BucketDestination is a required field
  12801. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  12802. }
  12803. // String returns the string representation
  12804. func (s InventoryDestination) String() string {
  12805. return awsutil.Prettify(s)
  12806. }
  12807. // GoString returns the string representation
  12808. func (s InventoryDestination) GoString() string {
  12809. return s.String()
  12810. }
  12811. // Validate inspects the fields of the type to determine if they are valid.
  12812. func (s *InventoryDestination) Validate() error {
  12813. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  12814. if s.S3BucketDestination == nil {
  12815. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  12816. }
  12817. if s.S3BucketDestination != nil {
  12818. if err := s.S3BucketDestination.Validate(); err != nil {
  12819. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  12820. }
  12821. }
  12822. if invalidParams.Len() > 0 {
  12823. return invalidParams
  12824. }
  12825. return nil
  12826. }
  12827. // SetS3BucketDestination sets the S3BucketDestination field's value.
  12828. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  12829. s.S3BucketDestination = v
  12830. return s
  12831. }
  12832. // Contains the type of server-side encryption used to encrypt the inventory
  12833. // results.
  12834. type InventoryEncryption struct {
  12835. _ struct{} `type:"structure"`
  12836. // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
  12837. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  12838. // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
  12839. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  12840. }
  12841. // String returns the string representation
  12842. func (s InventoryEncryption) String() string {
  12843. return awsutil.Prettify(s)
  12844. }
  12845. // GoString returns the string representation
  12846. func (s InventoryEncryption) GoString() string {
  12847. return s.String()
  12848. }
  12849. // Validate inspects the fields of the type to determine if they are valid.
  12850. func (s *InventoryEncryption) Validate() error {
  12851. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  12852. if s.SSEKMS != nil {
  12853. if err := s.SSEKMS.Validate(); err != nil {
  12854. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  12855. }
  12856. }
  12857. if invalidParams.Len() > 0 {
  12858. return invalidParams
  12859. }
  12860. return nil
  12861. }
  12862. // SetSSEKMS sets the SSEKMS field's value.
  12863. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  12864. s.SSEKMS = v
  12865. return s
  12866. }
  12867. // SetSSES3 sets the SSES3 field's value.
  12868. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  12869. s.SSES3 = v
  12870. return s
  12871. }
  12872. type InventoryFilter struct {
  12873. _ struct{} `type:"structure"`
  12874. // The prefix that an object must have to be included in the inventory results.
  12875. //
  12876. // Prefix is a required field
  12877. Prefix *string `type:"string" required:"true"`
  12878. }
  12879. // String returns the string representation
  12880. func (s InventoryFilter) String() string {
  12881. return awsutil.Prettify(s)
  12882. }
  12883. // GoString returns the string representation
  12884. func (s InventoryFilter) GoString() string {
  12885. return s.String()
  12886. }
  12887. // Validate inspects the fields of the type to determine if they are valid.
  12888. func (s *InventoryFilter) Validate() error {
  12889. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  12890. if s.Prefix == nil {
  12891. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  12892. }
  12893. if invalidParams.Len() > 0 {
  12894. return invalidParams
  12895. }
  12896. return nil
  12897. }
  12898. // SetPrefix sets the Prefix field's value.
  12899. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  12900. s.Prefix = &v
  12901. return s
  12902. }
  12903. type InventoryS3BucketDestination struct {
  12904. _ struct{} `type:"structure"`
  12905. // The ID of the account that owns the destination bucket.
  12906. AccountId *string `type:"string"`
  12907. // The Amazon resource name (ARN) of the bucket where inventory results will
  12908. // be published.
  12909. //
  12910. // Bucket is a required field
  12911. Bucket *string `type:"string" required:"true"`
  12912. // Contains the type of server-side encryption used to encrypt the inventory
  12913. // results.
  12914. Encryption *InventoryEncryption `type:"structure"`
  12915. // Specifies the output format of the inventory results.
  12916. //
  12917. // Format is a required field
  12918. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  12919. // The prefix that is prepended to all inventory results.
  12920. Prefix *string `type:"string"`
  12921. }
  12922. // String returns the string representation
  12923. func (s InventoryS3BucketDestination) String() string {
  12924. return awsutil.Prettify(s)
  12925. }
  12926. // GoString returns the string representation
  12927. func (s InventoryS3BucketDestination) GoString() string {
  12928. return s.String()
  12929. }
  12930. // Validate inspects the fields of the type to determine if they are valid.
  12931. func (s *InventoryS3BucketDestination) Validate() error {
  12932. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  12933. if s.Bucket == nil {
  12934. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12935. }
  12936. if s.Format == nil {
  12937. invalidParams.Add(request.NewErrParamRequired("Format"))
  12938. }
  12939. if s.Encryption != nil {
  12940. if err := s.Encryption.Validate(); err != nil {
  12941. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  12942. }
  12943. }
  12944. if invalidParams.Len() > 0 {
  12945. return invalidParams
  12946. }
  12947. return nil
  12948. }
  12949. // SetAccountId sets the AccountId field's value.
  12950. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  12951. s.AccountId = &v
  12952. return s
  12953. }
  12954. // SetBucket sets the Bucket field's value.
  12955. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  12956. s.Bucket = &v
  12957. return s
  12958. }
  12959. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  12960. if s.Bucket == nil {
  12961. return v
  12962. }
  12963. return *s.Bucket
  12964. }
  12965. // SetEncryption sets the Encryption field's value.
  12966. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  12967. s.Encryption = v
  12968. return s
  12969. }
  12970. // SetFormat sets the Format field's value.
  12971. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  12972. s.Format = &v
  12973. return s
  12974. }
  12975. // SetPrefix sets the Prefix field's value.
  12976. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  12977. s.Prefix = &v
  12978. return s
  12979. }
  12980. type InventorySchedule struct {
  12981. _ struct{} `type:"structure"`
  12982. // Specifies how frequently inventory results are produced.
  12983. //
  12984. // Frequency is a required field
  12985. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  12986. }
  12987. // String returns the string representation
  12988. func (s InventorySchedule) String() string {
  12989. return awsutil.Prettify(s)
  12990. }
  12991. // GoString returns the string representation
  12992. func (s InventorySchedule) GoString() string {
  12993. return s.String()
  12994. }
  12995. // Validate inspects the fields of the type to determine if they are valid.
  12996. func (s *InventorySchedule) Validate() error {
  12997. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  12998. if s.Frequency == nil {
  12999. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  13000. }
  13001. if invalidParams.Len() > 0 {
  13002. return invalidParams
  13003. }
  13004. return nil
  13005. }
  13006. // SetFrequency sets the Frequency field's value.
  13007. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  13008. s.Frequency = &v
  13009. return s
  13010. }
  13011. type JSONInput struct {
  13012. _ struct{} `type:"structure"`
  13013. // The type of JSON. Valid values: Document, Lines.
  13014. Type *string `type:"string" enum:"JSONType"`
  13015. }
  13016. // String returns the string representation
  13017. func (s JSONInput) String() string {
  13018. return awsutil.Prettify(s)
  13019. }
  13020. // GoString returns the string representation
  13021. func (s JSONInput) GoString() string {
  13022. return s.String()
  13023. }
  13024. // SetType sets the Type field's value.
  13025. func (s *JSONInput) SetType(v string) *JSONInput {
  13026. s.Type = &v
  13027. return s
  13028. }
  13029. type JSONOutput struct {
  13030. _ struct{} `type:"structure"`
  13031. // The value used to separate individual records in the output.
  13032. RecordDelimiter *string `type:"string"`
  13033. }
  13034. // String returns the string representation
  13035. func (s JSONOutput) String() string {
  13036. return awsutil.Prettify(s)
  13037. }
  13038. // GoString returns the string representation
  13039. func (s JSONOutput) GoString() string {
  13040. return s.String()
  13041. }
  13042. // SetRecordDelimiter sets the RecordDelimiter field's value.
  13043. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  13044. s.RecordDelimiter = &v
  13045. return s
  13046. }
  13047. // A container for object key name prefix and suffix filtering rules.
  13048. type KeyFilter struct {
  13049. _ struct{} `type:"structure"`
  13050. // A list of containers for the key value pair that defines the criteria for
  13051. // the filter rule.
  13052. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  13053. }
  13054. // String returns the string representation
  13055. func (s KeyFilter) String() string {
  13056. return awsutil.Prettify(s)
  13057. }
  13058. // GoString returns the string representation
  13059. func (s KeyFilter) GoString() string {
  13060. return s.String()
  13061. }
  13062. // SetFilterRules sets the FilterRules field's value.
  13063. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  13064. s.FilterRules = v
  13065. return s
  13066. }
  13067. // A container for specifying the configuration for AWS Lambda notifications.
  13068. type LambdaFunctionConfiguration struct {
  13069. _ struct{} `type:"structure"`
  13070. // Events is a required field
  13071. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  13072. // A container for object key name filtering rules. For information about key
  13073. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13074. // in the Amazon Simple Storage Service Developer Guide.
  13075. Filter *NotificationConfigurationFilter `type:"structure"`
  13076. // An optional unique identifier for configurations in a notification configuration.
  13077. // If you don't provide one, Amazon S3 will assign an ID.
  13078. Id *string `type:"string"`
  13079. // The Amazon Resource Name (ARN) of the Lambda cloud function that Amazon S3
  13080. // can invoke when it detects events of the specified type.
  13081. //
  13082. // LambdaFunctionArn is a required field
  13083. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  13084. }
  13085. // String returns the string representation
  13086. func (s LambdaFunctionConfiguration) String() string {
  13087. return awsutil.Prettify(s)
  13088. }
  13089. // GoString returns the string representation
  13090. func (s LambdaFunctionConfiguration) GoString() string {
  13091. return s.String()
  13092. }
  13093. // Validate inspects the fields of the type to determine if they are valid.
  13094. func (s *LambdaFunctionConfiguration) Validate() error {
  13095. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  13096. if s.Events == nil {
  13097. invalidParams.Add(request.NewErrParamRequired("Events"))
  13098. }
  13099. if s.LambdaFunctionArn == nil {
  13100. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  13101. }
  13102. if invalidParams.Len() > 0 {
  13103. return invalidParams
  13104. }
  13105. return nil
  13106. }
  13107. // SetEvents sets the Events field's value.
  13108. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  13109. s.Events = v
  13110. return s
  13111. }
  13112. // SetFilter sets the Filter field's value.
  13113. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  13114. s.Filter = v
  13115. return s
  13116. }
  13117. // SetId sets the Id field's value.
  13118. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  13119. s.Id = &v
  13120. return s
  13121. }
  13122. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  13123. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  13124. s.LambdaFunctionArn = &v
  13125. return s
  13126. }
  13127. type LifecycleConfiguration struct {
  13128. _ struct{} `type:"structure"`
  13129. // Rules is a required field
  13130. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  13131. }
  13132. // String returns the string representation
  13133. func (s LifecycleConfiguration) String() string {
  13134. return awsutil.Prettify(s)
  13135. }
  13136. // GoString returns the string representation
  13137. func (s LifecycleConfiguration) GoString() string {
  13138. return s.String()
  13139. }
  13140. // Validate inspects the fields of the type to determine if they are valid.
  13141. func (s *LifecycleConfiguration) Validate() error {
  13142. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  13143. if s.Rules == nil {
  13144. invalidParams.Add(request.NewErrParamRequired("Rules"))
  13145. }
  13146. if s.Rules != nil {
  13147. for i, v := range s.Rules {
  13148. if v == nil {
  13149. continue
  13150. }
  13151. if err := v.Validate(); err != nil {
  13152. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  13153. }
  13154. }
  13155. }
  13156. if invalidParams.Len() > 0 {
  13157. return invalidParams
  13158. }
  13159. return nil
  13160. }
  13161. // SetRules sets the Rules field's value.
  13162. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  13163. s.Rules = v
  13164. return s
  13165. }
  13166. type LifecycleExpiration struct {
  13167. _ struct{} `type:"structure"`
  13168. // Indicates at what date the object is to be moved or deleted. Should be in
  13169. // GMT ISO 8601 Format.
  13170. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13171. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  13172. // The value must be a non-zero positive integer.
  13173. Days *int64 `type:"integer"`
  13174. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  13175. // versions. If set to true, the delete marker will be expired; if set to false
  13176. // the policy takes no action. This cannot be specified with Days or Date in
  13177. // a Lifecycle Expiration Policy.
  13178. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  13179. }
  13180. // String returns the string representation
  13181. func (s LifecycleExpiration) String() string {
  13182. return awsutil.Prettify(s)
  13183. }
  13184. // GoString returns the string representation
  13185. func (s LifecycleExpiration) GoString() string {
  13186. return s.String()
  13187. }
  13188. // SetDate sets the Date field's value.
  13189. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  13190. s.Date = &v
  13191. return s
  13192. }
  13193. // SetDays sets the Days field's value.
  13194. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  13195. s.Days = &v
  13196. return s
  13197. }
  13198. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  13199. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  13200. s.ExpiredObjectDeleteMarker = &v
  13201. return s
  13202. }
  13203. type LifecycleRule struct {
  13204. _ struct{} `type:"structure"`
  13205. // Specifies the days since the initiation of an Incomplete Multipart Upload
  13206. // that Lifecycle will wait before permanently removing all parts of the upload.
  13207. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  13208. Expiration *LifecycleExpiration `type:"structure"`
  13209. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  13210. // A Filter must have exactly one of Prefix, Tag, or And specified.
  13211. Filter *LifecycleRuleFilter `type:"structure"`
  13212. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  13213. ID *string `type:"string"`
  13214. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  13215. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  13216. // configuration action on a bucket that has versioning enabled (or suspended)
  13217. // to request that Amazon S3 delete noncurrent object versions at a specific
  13218. // period in the object's lifetime.
  13219. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  13220. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  13221. // Prefix identifying one or more objects to which the rule applies. This is
  13222. // deprecated; use Filter instead.
  13223. //
  13224. // Deprecated: Prefix has been deprecated
  13225. Prefix *string `deprecated:"true" type:"string"`
  13226. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  13227. // is not currently being applied.
  13228. //
  13229. // Status is a required field
  13230. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  13231. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  13232. }
  13233. // String returns the string representation
  13234. func (s LifecycleRule) String() string {
  13235. return awsutil.Prettify(s)
  13236. }
  13237. // GoString returns the string representation
  13238. func (s LifecycleRule) GoString() string {
  13239. return s.String()
  13240. }
  13241. // Validate inspects the fields of the type to determine if they are valid.
  13242. func (s *LifecycleRule) Validate() error {
  13243. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  13244. if s.Status == nil {
  13245. invalidParams.Add(request.NewErrParamRequired("Status"))
  13246. }
  13247. if s.Filter != nil {
  13248. if err := s.Filter.Validate(); err != nil {
  13249. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  13250. }
  13251. }
  13252. if invalidParams.Len() > 0 {
  13253. return invalidParams
  13254. }
  13255. return nil
  13256. }
  13257. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  13258. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  13259. s.AbortIncompleteMultipartUpload = v
  13260. return s
  13261. }
  13262. // SetExpiration sets the Expiration field's value.
  13263. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  13264. s.Expiration = v
  13265. return s
  13266. }
  13267. // SetFilter sets the Filter field's value.
  13268. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  13269. s.Filter = v
  13270. return s
  13271. }
  13272. // SetID sets the ID field's value.
  13273. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  13274. s.ID = &v
  13275. return s
  13276. }
  13277. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  13278. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  13279. s.NoncurrentVersionExpiration = v
  13280. return s
  13281. }
  13282. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  13283. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  13284. s.NoncurrentVersionTransitions = v
  13285. return s
  13286. }
  13287. // SetPrefix sets the Prefix field's value.
  13288. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  13289. s.Prefix = &v
  13290. return s
  13291. }
  13292. // SetStatus sets the Status field's value.
  13293. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  13294. s.Status = &v
  13295. return s
  13296. }
  13297. // SetTransitions sets the Transitions field's value.
  13298. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  13299. s.Transitions = v
  13300. return s
  13301. }
  13302. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  13303. // more predicates. The Lifecycle Rule will apply to any object matching all
  13304. // of the predicates configured inside the And operator.
  13305. type LifecycleRuleAndOperator struct {
  13306. _ struct{} `type:"structure"`
  13307. Prefix *string `type:"string"`
  13308. // All of these tags must exist in the object's tag set in order for the rule
  13309. // to apply.
  13310. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  13311. }
  13312. // String returns the string representation
  13313. func (s LifecycleRuleAndOperator) String() string {
  13314. return awsutil.Prettify(s)
  13315. }
  13316. // GoString returns the string representation
  13317. func (s LifecycleRuleAndOperator) GoString() string {
  13318. return s.String()
  13319. }
  13320. // Validate inspects the fields of the type to determine if they are valid.
  13321. func (s *LifecycleRuleAndOperator) Validate() error {
  13322. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  13323. if s.Tags != nil {
  13324. for i, v := range s.Tags {
  13325. if v == nil {
  13326. continue
  13327. }
  13328. if err := v.Validate(); err != nil {
  13329. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  13330. }
  13331. }
  13332. }
  13333. if invalidParams.Len() > 0 {
  13334. return invalidParams
  13335. }
  13336. return nil
  13337. }
  13338. // SetPrefix sets the Prefix field's value.
  13339. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  13340. s.Prefix = &v
  13341. return s
  13342. }
  13343. // SetTags sets the Tags field's value.
  13344. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  13345. s.Tags = v
  13346. return s
  13347. }
  13348. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  13349. // A Filter must have exactly one of Prefix, Tag, or And specified.
  13350. type LifecycleRuleFilter struct {
  13351. _ struct{} `type:"structure"`
  13352. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  13353. // more predicates. The Lifecycle Rule will apply to any object matching all
  13354. // of the predicates configured inside the And operator.
  13355. And *LifecycleRuleAndOperator `type:"structure"`
  13356. // Prefix identifying one or more objects to which the rule applies.
  13357. Prefix *string `type:"string"`
  13358. // This tag must exist in the object's tag set in order for the rule to apply.
  13359. Tag *Tag `type:"structure"`
  13360. }
  13361. // String returns the string representation
  13362. func (s LifecycleRuleFilter) String() string {
  13363. return awsutil.Prettify(s)
  13364. }
  13365. // GoString returns the string representation
  13366. func (s LifecycleRuleFilter) GoString() string {
  13367. return s.String()
  13368. }
  13369. // Validate inspects the fields of the type to determine if they are valid.
  13370. func (s *LifecycleRuleFilter) Validate() error {
  13371. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  13372. if s.And != nil {
  13373. if err := s.And.Validate(); err != nil {
  13374. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  13375. }
  13376. }
  13377. if s.Tag != nil {
  13378. if err := s.Tag.Validate(); err != nil {
  13379. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  13380. }
  13381. }
  13382. if invalidParams.Len() > 0 {
  13383. return invalidParams
  13384. }
  13385. return nil
  13386. }
  13387. // SetAnd sets the And field's value.
  13388. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  13389. s.And = v
  13390. return s
  13391. }
  13392. // SetPrefix sets the Prefix field's value.
  13393. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  13394. s.Prefix = &v
  13395. return s
  13396. }
  13397. // SetTag sets the Tag field's value.
  13398. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  13399. s.Tag = v
  13400. return s
  13401. }
  13402. type ListBucketAnalyticsConfigurationsInput struct {
  13403. _ struct{} `type:"structure"`
  13404. // The name of the bucket from which analytics configurations are retrieved.
  13405. //
  13406. // Bucket is a required field
  13407. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13408. // The ContinuationToken that represents a placeholder from where this request
  13409. // should begin.
  13410. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13411. }
  13412. // String returns the string representation
  13413. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  13414. return awsutil.Prettify(s)
  13415. }
  13416. // GoString returns the string representation
  13417. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  13418. return s.String()
  13419. }
  13420. // Validate inspects the fields of the type to determine if they are valid.
  13421. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  13422. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  13423. if s.Bucket == nil {
  13424. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13425. }
  13426. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13427. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13428. }
  13429. if invalidParams.Len() > 0 {
  13430. return invalidParams
  13431. }
  13432. return nil
  13433. }
  13434. // SetBucket sets the Bucket field's value.
  13435. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  13436. s.Bucket = &v
  13437. return s
  13438. }
  13439. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  13440. if s.Bucket == nil {
  13441. return v
  13442. }
  13443. return *s.Bucket
  13444. }
  13445. // SetContinuationToken sets the ContinuationToken field's value.
  13446. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  13447. s.ContinuationToken = &v
  13448. return s
  13449. }
  13450. type ListBucketAnalyticsConfigurationsOutput struct {
  13451. _ struct{} `type:"structure"`
  13452. // The list of analytics configurations for a bucket.
  13453. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  13454. // The ContinuationToken that represents where this request began.
  13455. ContinuationToken *string `type:"string"`
  13456. // Indicates whether the returned list of analytics configurations is complete.
  13457. // A value of true indicates that the list is not complete and the NextContinuationToken
  13458. // will be provided for a subsequent request.
  13459. IsTruncated *bool `type:"boolean"`
  13460. // NextContinuationToken is sent when isTruncated is true, which indicates that
  13461. // there are more analytics configurations to list. The next request must include
  13462. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  13463. NextContinuationToken *string `type:"string"`
  13464. }
  13465. // String returns the string representation
  13466. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  13467. return awsutil.Prettify(s)
  13468. }
  13469. // GoString returns the string representation
  13470. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  13471. return s.String()
  13472. }
  13473. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  13474. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  13475. s.AnalyticsConfigurationList = v
  13476. return s
  13477. }
  13478. // SetContinuationToken sets the ContinuationToken field's value.
  13479. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  13480. s.ContinuationToken = &v
  13481. return s
  13482. }
  13483. // SetIsTruncated sets the IsTruncated field's value.
  13484. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  13485. s.IsTruncated = &v
  13486. return s
  13487. }
  13488. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13489. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  13490. s.NextContinuationToken = &v
  13491. return s
  13492. }
  13493. type ListBucketInventoryConfigurationsInput struct {
  13494. _ struct{} `type:"structure"`
  13495. // The name of the bucket containing the inventory configurations to retrieve.
  13496. //
  13497. // Bucket is a required field
  13498. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13499. // The marker used to continue an inventory configuration listing that has been
  13500. // truncated. Use the NextContinuationToken from a previously truncated list
  13501. // response to continue the listing. The continuation token is an opaque value
  13502. // that Amazon S3 understands.
  13503. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13504. }
  13505. // String returns the string representation
  13506. func (s ListBucketInventoryConfigurationsInput) String() string {
  13507. return awsutil.Prettify(s)
  13508. }
  13509. // GoString returns the string representation
  13510. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  13511. return s.String()
  13512. }
  13513. // Validate inspects the fields of the type to determine if they are valid.
  13514. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  13515. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  13516. if s.Bucket == nil {
  13517. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13518. }
  13519. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13520. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13521. }
  13522. if invalidParams.Len() > 0 {
  13523. return invalidParams
  13524. }
  13525. return nil
  13526. }
  13527. // SetBucket sets the Bucket field's value.
  13528. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  13529. s.Bucket = &v
  13530. return s
  13531. }
  13532. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  13533. if s.Bucket == nil {
  13534. return v
  13535. }
  13536. return *s.Bucket
  13537. }
  13538. // SetContinuationToken sets the ContinuationToken field's value.
  13539. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  13540. s.ContinuationToken = &v
  13541. return s
  13542. }
  13543. type ListBucketInventoryConfigurationsOutput struct {
  13544. _ struct{} `type:"structure"`
  13545. // If sent in the request, the marker that is used as a starting point for this
  13546. // inventory configuration list response.
  13547. ContinuationToken *string `type:"string"`
  13548. // The list of inventory configurations for a bucket.
  13549. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  13550. // Indicates whether the returned list of inventory configurations is truncated
  13551. // in this response. A value of true indicates that the list is truncated.
  13552. IsTruncated *bool `type:"boolean"`
  13553. // The marker used to continue this inventory configuration listing. Use the
  13554. // NextContinuationToken from this response to continue the listing in a subsequent
  13555. // request. The continuation token is an opaque value that Amazon S3 understands.
  13556. NextContinuationToken *string `type:"string"`
  13557. }
  13558. // String returns the string representation
  13559. func (s ListBucketInventoryConfigurationsOutput) String() string {
  13560. return awsutil.Prettify(s)
  13561. }
  13562. // GoString returns the string representation
  13563. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  13564. return s.String()
  13565. }
  13566. // SetContinuationToken sets the ContinuationToken field's value.
  13567. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  13568. s.ContinuationToken = &v
  13569. return s
  13570. }
  13571. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  13572. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  13573. s.InventoryConfigurationList = v
  13574. return s
  13575. }
  13576. // SetIsTruncated sets the IsTruncated field's value.
  13577. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  13578. s.IsTruncated = &v
  13579. return s
  13580. }
  13581. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13582. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  13583. s.NextContinuationToken = &v
  13584. return s
  13585. }
  13586. type ListBucketMetricsConfigurationsInput struct {
  13587. _ struct{} `type:"structure"`
  13588. // The name of the bucket containing the metrics configurations to retrieve.
  13589. //
  13590. // Bucket is a required field
  13591. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13592. // The marker that is used to continue a metrics configuration listing that
  13593. // has been truncated. Use the NextContinuationToken from a previously truncated
  13594. // list response to continue the listing. The continuation token is an opaque
  13595. // value that Amazon S3 understands.
  13596. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  13597. }
  13598. // String returns the string representation
  13599. func (s ListBucketMetricsConfigurationsInput) String() string {
  13600. return awsutil.Prettify(s)
  13601. }
  13602. // GoString returns the string representation
  13603. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  13604. return s.String()
  13605. }
  13606. // Validate inspects the fields of the type to determine if they are valid.
  13607. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  13608. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  13609. if s.Bucket == nil {
  13610. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13611. }
  13612. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13613. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13614. }
  13615. if invalidParams.Len() > 0 {
  13616. return invalidParams
  13617. }
  13618. return nil
  13619. }
  13620. // SetBucket sets the Bucket field's value.
  13621. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  13622. s.Bucket = &v
  13623. return s
  13624. }
  13625. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  13626. if s.Bucket == nil {
  13627. return v
  13628. }
  13629. return *s.Bucket
  13630. }
  13631. // SetContinuationToken sets the ContinuationToken field's value.
  13632. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  13633. s.ContinuationToken = &v
  13634. return s
  13635. }
  13636. type ListBucketMetricsConfigurationsOutput struct {
  13637. _ struct{} `type:"structure"`
  13638. // The marker that is used as a starting point for this metrics configuration
  13639. // list response. This value is present if it was sent in the request.
  13640. ContinuationToken *string `type:"string"`
  13641. // Indicates whether the returned list of metrics configurations is complete.
  13642. // A value of true indicates that the list is not complete and the NextContinuationToken
  13643. // will be provided for a subsequent request.
  13644. IsTruncated *bool `type:"boolean"`
  13645. // The list of metrics configurations for a bucket.
  13646. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  13647. // The marker used to continue a metrics configuration listing that has been
  13648. // truncated. Use the NextContinuationToken from a previously truncated list
  13649. // response to continue the listing. The continuation token is an opaque value
  13650. // that Amazon S3 understands.
  13651. NextContinuationToken *string `type:"string"`
  13652. }
  13653. // String returns the string representation
  13654. func (s ListBucketMetricsConfigurationsOutput) String() string {
  13655. return awsutil.Prettify(s)
  13656. }
  13657. // GoString returns the string representation
  13658. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  13659. return s.String()
  13660. }
  13661. // SetContinuationToken sets the ContinuationToken field's value.
  13662. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  13663. s.ContinuationToken = &v
  13664. return s
  13665. }
  13666. // SetIsTruncated sets the IsTruncated field's value.
  13667. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  13668. s.IsTruncated = &v
  13669. return s
  13670. }
  13671. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  13672. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  13673. s.MetricsConfigurationList = v
  13674. return s
  13675. }
  13676. // SetNextContinuationToken sets the NextContinuationToken field's value.
  13677. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  13678. s.NextContinuationToken = &v
  13679. return s
  13680. }
  13681. type ListBucketsInput struct {
  13682. _ struct{} `type:"structure"`
  13683. }
  13684. // String returns the string representation
  13685. func (s ListBucketsInput) String() string {
  13686. return awsutil.Prettify(s)
  13687. }
  13688. // GoString returns the string representation
  13689. func (s ListBucketsInput) GoString() string {
  13690. return s.String()
  13691. }
  13692. type ListBucketsOutput struct {
  13693. _ struct{} `type:"structure"`
  13694. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  13695. Owner *Owner `type:"structure"`
  13696. }
  13697. // String returns the string representation
  13698. func (s ListBucketsOutput) String() string {
  13699. return awsutil.Prettify(s)
  13700. }
  13701. // GoString returns the string representation
  13702. func (s ListBucketsOutput) GoString() string {
  13703. return s.String()
  13704. }
  13705. // SetBuckets sets the Buckets field's value.
  13706. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  13707. s.Buckets = v
  13708. return s
  13709. }
  13710. // SetOwner sets the Owner field's value.
  13711. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  13712. s.Owner = v
  13713. return s
  13714. }
  13715. type ListMultipartUploadsInput struct {
  13716. _ struct{} `type:"structure"`
  13717. // Bucket is a required field
  13718. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13719. // Character you use to group keys.
  13720. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  13721. // Requests Amazon S3 to encode the object keys in the response and specifies
  13722. // the encoding method to use. An object key may contain any Unicode character;
  13723. // however, XML 1.0 parser cannot parse some characters, such as characters
  13724. // with an ASCII value from 0 to 10. For characters that are not supported in
  13725. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  13726. // keys in the response.
  13727. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  13728. // Together with upload-id-marker, this parameter specifies the multipart upload
  13729. // after which listing should begin.
  13730. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  13731. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  13732. // in the response body. 1,000 is the maximum number of uploads that can be
  13733. // returned in a response.
  13734. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  13735. // Lists in-progress uploads only for those keys that begin with the specified
  13736. // prefix.
  13737. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  13738. // Together with key-marker, specifies the multipart upload after which listing
  13739. // should begin. If key-marker is not specified, the upload-id-marker parameter
  13740. // is ignored.
  13741. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  13742. }
  13743. // String returns the string representation
  13744. func (s ListMultipartUploadsInput) String() string {
  13745. return awsutil.Prettify(s)
  13746. }
  13747. // GoString returns the string representation
  13748. func (s ListMultipartUploadsInput) GoString() string {
  13749. return s.String()
  13750. }
  13751. // Validate inspects the fields of the type to determine if they are valid.
  13752. func (s *ListMultipartUploadsInput) Validate() error {
  13753. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  13754. if s.Bucket == nil {
  13755. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13756. }
  13757. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13758. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13759. }
  13760. if invalidParams.Len() > 0 {
  13761. return invalidParams
  13762. }
  13763. return nil
  13764. }
  13765. // SetBucket sets the Bucket field's value.
  13766. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  13767. s.Bucket = &v
  13768. return s
  13769. }
  13770. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  13771. if s.Bucket == nil {
  13772. return v
  13773. }
  13774. return *s.Bucket
  13775. }
  13776. // SetDelimiter sets the Delimiter field's value.
  13777. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  13778. s.Delimiter = &v
  13779. return s
  13780. }
  13781. // SetEncodingType sets the EncodingType field's value.
  13782. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  13783. s.EncodingType = &v
  13784. return s
  13785. }
  13786. // SetKeyMarker sets the KeyMarker field's value.
  13787. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  13788. s.KeyMarker = &v
  13789. return s
  13790. }
  13791. // SetMaxUploads sets the MaxUploads field's value.
  13792. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  13793. s.MaxUploads = &v
  13794. return s
  13795. }
  13796. // SetPrefix sets the Prefix field's value.
  13797. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  13798. s.Prefix = &v
  13799. return s
  13800. }
  13801. // SetUploadIdMarker sets the UploadIdMarker field's value.
  13802. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  13803. s.UploadIdMarker = &v
  13804. return s
  13805. }
  13806. type ListMultipartUploadsOutput struct {
  13807. _ struct{} `type:"structure"`
  13808. // Name of the bucket to which the multipart upload was initiated.
  13809. Bucket *string `type:"string"`
  13810. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  13811. Delimiter *string `type:"string"`
  13812. // Encoding type used by Amazon S3 to encode object keys in the response.
  13813. EncodingType *string `type:"string" enum:"EncodingType"`
  13814. // Indicates whether the returned list of multipart uploads is truncated. A
  13815. // value of true indicates that the list was truncated. The list can be truncated
  13816. // if the number of multipart uploads exceeds the limit allowed or specified
  13817. // by max uploads.
  13818. IsTruncated *bool `type:"boolean"`
  13819. // The key at or after which the listing began.
  13820. KeyMarker *string `type:"string"`
  13821. // Maximum number of multipart uploads that could have been included in the
  13822. // response.
  13823. MaxUploads *int64 `type:"integer"`
  13824. // When a list is truncated, this element specifies the value that should be
  13825. // used for the key-marker request parameter in a subsequent request.
  13826. NextKeyMarker *string `type:"string"`
  13827. // When a list is truncated, this element specifies the value that should be
  13828. // used for the upload-id-marker request parameter in a subsequent request.
  13829. NextUploadIdMarker *string `type:"string"`
  13830. // When a prefix is provided in the request, this field contains the specified
  13831. // prefix. The result contains only keys starting with the specified prefix.
  13832. Prefix *string `type:"string"`
  13833. // Upload ID after which listing began.
  13834. UploadIdMarker *string `type:"string"`
  13835. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  13836. }
  13837. // String returns the string representation
  13838. func (s ListMultipartUploadsOutput) String() string {
  13839. return awsutil.Prettify(s)
  13840. }
  13841. // GoString returns the string representation
  13842. func (s ListMultipartUploadsOutput) GoString() string {
  13843. return s.String()
  13844. }
  13845. // SetBucket sets the Bucket field's value.
  13846. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  13847. s.Bucket = &v
  13848. return s
  13849. }
  13850. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  13851. if s.Bucket == nil {
  13852. return v
  13853. }
  13854. return *s.Bucket
  13855. }
  13856. // SetCommonPrefixes sets the CommonPrefixes field's value.
  13857. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  13858. s.CommonPrefixes = v
  13859. return s
  13860. }
  13861. // SetDelimiter sets the Delimiter field's value.
  13862. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  13863. s.Delimiter = &v
  13864. return s
  13865. }
  13866. // SetEncodingType sets the EncodingType field's value.
  13867. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  13868. s.EncodingType = &v
  13869. return s
  13870. }
  13871. // SetIsTruncated sets the IsTruncated field's value.
  13872. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  13873. s.IsTruncated = &v
  13874. return s
  13875. }
  13876. // SetKeyMarker sets the KeyMarker field's value.
  13877. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  13878. s.KeyMarker = &v
  13879. return s
  13880. }
  13881. // SetMaxUploads sets the MaxUploads field's value.
  13882. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  13883. s.MaxUploads = &v
  13884. return s
  13885. }
  13886. // SetNextKeyMarker sets the NextKeyMarker field's value.
  13887. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  13888. s.NextKeyMarker = &v
  13889. return s
  13890. }
  13891. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  13892. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  13893. s.NextUploadIdMarker = &v
  13894. return s
  13895. }
  13896. // SetPrefix sets the Prefix field's value.
  13897. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  13898. s.Prefix = &v
  13899. return s
  13900. }
  13901. // SetUploadIdMarker sets the UploadIdMarker field's value.
  13902. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  13903. s.UploadIdMarker = &v
  13904. return s
  13905. }
  13906. // SetUploads sets the Uploads field's value.
  13907. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  13908. s.Uploads = v
  13909. return s
  13910. }
  13911. type ListObjectVersionsInput struct {
  13912. _ struct{} `type:"structure"`
  13913. // Bucket is a required field
  13914. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13915. // A delimiter is a character you use to group keys.
  13916. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  13917. // Requests Amazon S3 to encode the object keys in the response and specifies
  13918. // the encoding method to use. An object key may contain any Unicode character;
  13919. // however, XML 1.0 parser cannot parse some characters, such as characters
  13920. // with an ASCII value from 0 to 10. For characters that are not supported in
  13921. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  13922. // keys in the response.
  13923. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  13924. // Specifies the key to start with when listing objects in a bucket.
  13925. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  13926. // Sets the maximum number of keys returned in the response. The response might
  13927. // contain fewer keys but will never contain more.
  13928. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  13929. // Limits the response to keys that begin with the specified prefix.
  13930. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  13931. // Specifies the object version you want to start listing from.
  13932. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  13933. }
  13934. // String returns the string representation
  13935. func (s ListObjectVersionsInput) String() string {
  13936. return awsutil.Prettify(s)
  13937. }
  13938. // GoString returns the string representation
  13939. func (s ListObjectVersionsInput) GoString() string {
  13940. return s.String()
  13941. }
  13942. // Validate inspects the fields of the type to determine if they are valid.
  13943. func (s *ListObjectVersionsInput) Validate() error {
  13944. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  13945. if s.Bucket == nil {
  13946. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13947. }
  13948. if s.Bucket != nil && len(*s.Bucket) < 1 {
  13949. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  13950. }
  13951. if invalidParams.Len() > 0 {
  13952. return invalidParams
  13953. }
  13954. return nil
  13955. }
  13956. // SetBucket sets the Bucket field's value.
  13957. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  13958. s.Bucket = &v
  13959. return s
  13960. }
  13961. func (s *ListObjectVersionsInput) getBucket() (v string) {
  13962. if s.Bucket == nil {
  13963. return v
  13964. }
  13965. return *s.Bucket
  13966. }
  13967. // SetDelimiter sets the Delimiter field's value.
  13968. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  13969. s.Delimiter = &v
  13970. return s
  13971. }
  13972. // SetEncodingType sets the EncodingType field's value.
  13973. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  13974. s.EncodingType = &v
  13975. return s
  13976. }
  13977. // SetKeyMarker sets the KeyMarker field's value.
  13978. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  13979. s.KeyMarker = &v
  13980. return s
  13981. }
  13982. // SetMaxKeys sets the MaxKeys field's value.
  13983. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  13984. s.MaxKeys = &v
  13985. return s
  13986. }
  13987. // SetPrefix sets the Prefix field's value.
  13988. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  13989. s.Prefix = &v
  13990. return s
  13991. }
  13992. // SetVersionIdMarker sets the VersionIdMarker field's value.
  13993. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  13994. s.VersionIdMarker = &v
  13995. return s
  13996. }
  13997. type ListObjectVersionsOutput struct {
  13998. _ struct{} `type:"structure"`
  13999. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14000. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  14001. Delimiter *string `type:"string"`
  14002. // Encoding type used by Amazon S3 to encode object keys in the response.
  14003. EncodingType *string `type:"string" enum:"EncodingType"`
  14004. // A flag that indicates whether or not Amazon S3 returned all of the results
  14005. // that satisfied the search criteria. If your results were truncated, you can
  14006. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  14007. // response parameters as a starting place in another request to return the
  14008. // rest of the results.
  14009. IsTruncated *bool `type:"boolean"`
  14010. // Marks the last Key returned in a truncated response.
  14011. KeyMarker *string `type:"string"`
  14012. MaxKeys *int64 `type:"integer"`
  14013. Name *string `type:"string"`
  14014. // Use this value for the key marker request parameter in a subsequent request.
  14015. NextKeyMarker *string `type:"string"`
  14016. // Use this value for the next version id marker parameter in a subsequent request.
  14017. NextVersionIdMarker *string `type:"string"`
  14018. Prefix *string `type:"string"`
  14019. VersionIdMarker *string `type:"string"`
  14020. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  14021. }
  14022. // String returns the string representation
  14023. func (s ListObjectVersionsOutput) String() string {
  14024. return awsutil.Prettify(s)
  14025. }
  14026. // GoString returns the string representation
  14027. func (s ListObjectVersionsOutput) GoString() string {
  14028. return s.String()
  14029. }
  14030. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14031. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  14032. s.CommonPrefixes = v
  14033. return s
  14034. }
  14035. // SetDeleteMarkers sets the DeleteMarkers field's value.
  14036. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  14037. s.DeleteMarkers = v
  14038. return s
  14039. }
  14040. // SetDelimiter sets the Delimiter field's value.
  14041. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  14042. s.Delimiter = &v
  14043. return s
  14044. }
  14045. // SetEncodingType sets the EncodingType field's value.
  14046. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  14047. s.EncodingType = &v
  14048. return s
  14049. }
  14050. // SetIsTruncated sets the IsTruncated field's value.
  14051. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  14052. s.IsTruncated = &v
  14053. return s
  14054. }
  14055. // SetKeyMarker sets the KeyMarker field's value.
  14056. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  14057. s.KeyMarker = &v
  14058. return s
  14059. }
  14060. // SetMaxKeys sets the MaxKeys field's value.
  14061. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  14062. s.MaxKeys = &v
  14063. return s
  14064. }
  14065. // SetName sets the Name field's value.
  14066. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  14067. s.Name = &v
  14068. return s
  14069. }
  14070. // SetNextKeyMarker sets the NextKeyMarker field's value.
  14071. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  14072. s.NextKeyMarker = &v
  14073. return s
  14074. }
  14075. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  14076. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  14077. s.NextVersionIdMarker = &v
  14078. return s
  14079. }
  14080. // SetPrefix sets the Prefix field's value.
  14081. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  14082. s.Prefix = &v
  14083. return s
  14084. }
  14085. // SetVersionIdMarker sets the VersionIdMarker field's value.
  14086. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  14087. s.VersionIdMarker = &v
  14088. return s
  14089. }
  14090. // SetVersions sets the Versions field's value.
  14091. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  14092. s.Versions = v
  14093. return s
  14094. }
  14095. type ListObjectsInput struct {
  14096. _ struct{} `type:"structure"`
  14097. // Bucket is a required field
  14098. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14099. // A delimiter is a character you use to group keys.
  14100. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  14101. // Requests Amazon S3 to encode the object keys in the response and specifies
  14102. // the encoding method to use. An object key may contain any Unicode character;
  14103. // however, XML 1.0 parser cannot parse some characters, such as characters
  14104. // with an ASCII value from 0 to 10. For characters that are not supported in
  14105. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  14106. // keys in the response.
  14107. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  14108. // Specifies the key to start with when listing objects in a bucket.
  14109. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  14110. // Sets the maximum number of keys returned in the response. The response might
  14111. // contain fewer keys but will never contain more.
  14112. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  14113. // Limits the response to keys that begin with the specified prefix.
  14114. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  14115. // Confirms that the requester knows that she or he will be charged for the
  14116. // list objects request. Bucket owners need not specify this parameter in their
  14117. // requests.
  14118. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14119. }
  14120. // String returns the string representation
  14121. func (s ListObjectsInput) String() string {
  14122. return awsutil.Prettify(s)
  14123. }
  14124. // GoString returns the string representation
  14125. func (s ListObjectsInput) GoString() string {
  14126. return s.String()
  14127. }
  14128. // Validate inspects the fields of the type to determine if they are valid.
  14129. func (s *ListObjectsInput) Validate() error {
  14130. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  14131. if s.Bucket == nil {
  14132. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14133. }
  14134. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14135. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14136. }
  14137. if invalidParams.Len() > 0 {
  14138. return invalidParams
  14139. }
  14140. return nil
  14141. }
  14142. // SetBucket sets the Bucket field's value.
  14143. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  14144. s.Bucket = &v
  14145. return s
  14146. }
  14147. func (s *ListObjectsInput) getBucket() (v string) {
  14148. if s.Bucket == nil {
  14149. return v
  14150. }
  14151. return *s.Bucket
  14152. }
  14153. // SetDelimiter sets the Delimiter field's value.
  14154. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  14155. s.Delimiter = &v
  14156. return s
  14157. }
  14158. // SetEncodingType sets the EncodingType field's value.
  14159. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  14160. s.EncodingType = &v
  14161. return s
  14162. }
  14163. // SetMarker sets the Marker field's value.
  14164. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  14165. s.Marker = &v
  14166. return s
  14167. }
  14168. // SetMaxKeys sets the MaxKeys field's value.
  14169. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  14170. s.MaxKeys = &v
  14171. return s
  14172. }
  14173. // SetPrefix sets the Prefix field's value.
  14174. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  14175. s.Prefix = &v
  14176. return s
  14177. }
  14178. // SetRequestPayer sets the RequestPayer field's value.
  14179. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  14180. s.RequestPayer = &v
  14181. return s
  14182. }
  14183. type ListObjectsOutput struct {
  14184. _ struct{} `type:"structure"`
  14185. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14186. Contents []*Object `type:"list" flattened:"true"`
  14187. Delimiter *string `type:"string"`
  14188. // Encoding type used by Amazon S3 to encode object keys in the response.
  14189. EncodingType *string `type:"string" enum:"EncodingType"`
  14190. // A flag that indicates whether or not Amazon S3 returned all of the results
  14191. // that satisfied the search criteria.
  14192. IsTruncated *bool `type:"boolean"`
  14193. Marker *string `type:"string"`
  14194. MaxKeys *int64 `type:"integer"`
  14195. Name *string `type:"string"`
  14196. // When response is truncated (the IsTruncated element value in the response
  14197. // is true), you can use the key name in this field as marker in the subsequent
  14198. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  14199. // order Note: This element is returned only if you have delimiter request parameter
  14200. // specified. If response does not include the NextMaker and it is truncated,
  14201. // you can use the value of the last Key in the response as the marker in the
  14202. // subsequent request to get the next set of object keys.
  14203. NextMarker *string `type:"string"`
  14204. Prefix *string `type:"string"`
  14205. }
  14206. // String returns the string representation
  14207. func (s ListObjectsOutput) String() string {
  14208. return awsutil.Prettify(s)
  14209. }
  14210. // GoString returns the string representation
  14211. func (s ListObjectsOutput) GoString() string {
  14212. return s.String()
  14213. }
  14214. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14215. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  14216. s.CommonPrefixes = v
  14217. return s
  14218. }
  14219. // SetContents sets the Contents field's value.
  14220. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  14221. s.Contents = v
  14222. return s
  14223. }
  14224. // SetDelimiter sets the Delimiter field's value.
  14225. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  14226. s.Delimiter = &v
  14227. return s
  14228. }
  14229. // SetEncodingType sets the EncodingType field's value.
  14230. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  14231. s.EncodingType = &v
  14232. return s
  14233. }
  14234. // SetIsTruncated sets the IsTruncated field's value.
  14235. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  14236. s.IsTruncated = &v
  14237. return s
  14238. }
  14239. // SetMarker sets the Marker field's value.
  14240. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  14241. s.Marker = &v
  14242. return s
  14243. }
  14244. // SetMaxKeys sets the MaxKeys field's value.
  14245. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  14246. s.MaxKeys = &v
  14247. return s
  14248. }
  14249. // SetName sets the Name field's value.
  14250. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  14251. s.Name = &v
  14252. return s
  14253. }
  14254. // SetNextMarker sets the NextMarker field's value.
  14255. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  14256. s.NextMarker = &v
  14257. return s
  14258. }
  14259. // SetPrefix sets the Prefix field's value.
  14260. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  14261. s.Prefix = &v
  14262. return s
  14263. }
  14264. type ListObjectsV2Input struct {
  14265. _ struct{} `type:"structure"`
  14266. // Name of the bucket to list.
  14267. //
  14268. // Bucket is a required field
  14269. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14270. // ContinuationToken indicates Amazon S3 that the list is being continued on
  14271. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  14272. // key
  14273. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  14274. // A delimiter is a character you use to group keys.
  14275. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  14276. // Encoding type used by Amazon S3 to encode object keys in the response.
  14277. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  14278. // The owner field is not present in listV2 by default, if you want to return
  14279. // owner field with each key in the result then set the fetch owner field to
  14280. // true
  14281. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  14282. // Sets the maximum number of keys returned in the response. The response might
  14283. // contain fewer keys but will never contain more.
  14284. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  14285. // Limits the response to keys that begin with the specified prefix.
  14286. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  14287. // Confirms that the requester knows that she or he will be charged for the
  14288. // list objects request in V2 style. Bucket owners need not specify this parameter
  14289. // in their requests.
  14290. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14291. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  14292. // listing after this specified key. StartAfter can be any key in the bucket
  14293. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  14294. }
  14295. // String returns the string representation
  14296. func (s ListObjectsV2Input) String() string {
  14297. return awsutil.Prettify(s)
  14298. }
  14299. // GoString returns the string representation
  14300. func (s ListObjectsV2Input) GoString() string {
  14301. return s.String()
  14302. }
  14303. // Validate inspects the fields of the type to determine if they are valid.
  14304. func (s *ListObjectsV2Input) Validate() error {
  14305. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  14306. if s.Bucket == nil {
  14307. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14308. }
  14309. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14310. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14311. }
  14312. if invalidParams.Len() > 0 {
  14313. return invalidParams
  14314. }
  14315. return nil
  14316. }
  14317. // SetBucket sets the Bucket field's value.
  14318. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  14319. s.Bucket = &v
  14320. return s
  14321. }
  14322. func (s *ListObjectsV2Input) getBucket() (v string) {
  14323. if s.Bucket == nil {
  14324. return v
  14325. }
  14326. return *s.Bucket
  14327. }
  14328. // SetContinuationToken sets the ContinuationToken field's value.
  14329. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  14330. s.ContinuationToken = &v
  14331. return s
  14332. }
  14333. // SetDelimiter sets the Delimiter field's value.
  14334. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  14335. s.Delimiter = &v
  14336. return s
  14337. }
  14338. // SetEncodingType sets the EncodingType field's value.
  14339. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  14340. s.EncodingType = &v
  14341. return s
  14342. }
  14343. // SetFetchOwner sets the FetchOwner field's value.
  14344. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  14345. s.FetchOwner = &v
  14346. return s
  14347. }
  14348. // SetMaxKeys sets the MaxKeys field's value.
  14349. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  14350. s.MaxKeys = &v
  14351. return s
  14352. }
  14353. // SetPrefix sets the Prefix field's value.
  14354. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  14355. s.Prefix = &v
  14356. return s
  14357. }
  14358. // SetRequestPayer sets the RequestPayer field's value.
  14359. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  14360. s.RequestPayer = &v
  14361. return s
  14362. }
  14363. // SetStartAfter sets the StartAfter field's value.
  14364. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  14365. s.StartAfter = &v
  14366. return s
  14367. }
  14368. type ListObjectsV2Output struct {
  14369. _ struct{} `type:"structure"`
  14370. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  14371. // next occurrence of the string specified by delimiter
  14372. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  14373. // Metadata about each object returned.
  14374. Contents []*Object `type:"list" flattened:"true"`
  14375. // ContinuationToken indicates Amazon S3 that the list is being continued on
  14376. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  14377. // key
  14378. ContinuationToken *string `type:"string"`
  14379. // A delimiter is a character you use to group keys.
  14380. Delimiter *string `type:"string"`
  14381. // Encoding type used by Amazon S3 to encode object keys in the response.
  14382. EncodingType *string `type:"string" enum:"EncodingType"`
  14383. // A flag that indicates whether or not Amazon S3 returned all of the results
  14384. // that satisfied the search criteria.
  14385. IsTruncated *bool `type:"boolean"`
  14386. // KeyCount is the number of keys returned with this request. KeyCount will
  14387. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  14388. // result will include less than equals 50 keys
  14389. KeyCount *int64 `type:"integer"`
  14390. // Sets the maximum number of keys returned in the response. The response might
  14391. // contain fewer keys but will never contain more.
  14392. MaxKeys *int64 `type:"integer"`
  14393. // Name of the bucket to list.
  14394. Name *string `type:"string"`
  14395. // NextContinuationToken is sent when isTruncated is true which means there
  14396. // are more keys in the bucket that can be listed. The next list requests to
  14397. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  14398. // is obfuscated and is not a real key
  14399. NextContinuationToken *string `type:"string"`
  14400. // Limits the response to keys that begin with the specified prefix.
  14401. Prefix *string `type:"string"`
  14402. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  14403. // listing after this specified key. StartAfter can be any key in the bucket
  14404. StartAfter *string `type:"string"`
  14405. }
  14406. // String returns the string representation
  14407. func (s ListObjectsV2Output) String() string {
  14408. return awsutil.Prettify(s)
  14409. }
  14410. // GoString returns the string representation
  14411. func (s ListObjectsV2Output) GoString() string {
  14412. return s.String()
  14413. }
  14414. // SetCommonPrefixes sets the CommonPrefixes field's value.
  14415. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  14416. s.CommonPrefixes = v
  14417. return s
  14418. }
  14419. // SetContents sets the Contents field's value.
  14420. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  14421. s.Contents = v
  14422. return s
  14423. }
  14424. // SetContinuationToken sets the ContinuationToken field's value.
  14425. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  14426. s.ContinuationToken = &v
  14427. return s
  14428. }
  14429. // SetDelimiter sets the Delimiter field's value.
  14430. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  14431. s.Delimiter = &v
  14432. return s
  14433. }
  14434. // SetEncodingType sets the EncodingType field's value.
  14435. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  14436. s.EncodingType = &v
  14437. return s
  14438. }
  14439. // SetIsTruncated sets the IsTruncated field's value.
  14440. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  14441. s.IsTruncated = &v
  14442. return s
  14443. }
  14444. // SetKeyCount sets the KeyCount field's value.
  14445. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  14446. s.KeyCount = &v
  14447. return s
  14448. }
  14449. // SetMaxKeys sets the MaxKeys field's value.
  14450. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  14451. s.MaxKeys = &v
  14452. return s
  14453. }
  14454. // SetName sets the Name field's value.
  14455. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  14456. s.Name = &v
  14457. return s
  14458. }
  14459. // SetNextContinuationToken sets the NextContinuationToken field's value.
  14460. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  14461. s.NextContinuationToken = &v
  14462. return s
  14463. }
  14464. // SetPrefix sets the Prefix field's value.
  14465. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  14466. s.Prefix = &v
  14467. return s
  14468. }
  14469. // SetStartAfter sets the StartAfter field's value.
  14470. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  14471. s.StartAfter = &v
  14472. return s
  14473. }
  14474. type ListPartsInput struct {
  14475. _ struct{} `type:"structure"`
  14476. // Bucket is a required field
  14477. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14478. // Key is a required field
  14479. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14480. // Sets the maximum number of parts to return.
  14481. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  14482. // Specifies the part after which listing should begin. Only parts with higher
  14483. // part numbers will be listed.
  14484. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  14485. // Confirms that the requester knows that she or he will be charged for the
  14486. // request. Bucket owners need not specify this parameter in their requests.
  14487. // Documentation on downloading objects from requester pays buckets can be found
  14488. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14489. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14490. // Upload ID identifying the multipart upload whose parts are being listed.
  14491. //
  14492. // UploadId is a required field
  14493. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  14494. }
  14495. // String returns the string representation
  14496. func (s ListPartsInput) String() string {
  14497. return awsutil.Prettify(s)
  14498. }
  14499. // GoString returns the string representation
  14500. func (s ListPartsInput) GoString() string {
  14501. return s.String()
  14502. }
  14503. // Validate inspects the fields of the type to determine if they are valid.
  14504. func (s *ListPartsInput) Validate() error {
  14505. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  14506. if s.Bucket == nil {
  14507. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14508. }
  14509. if s.Bucket != nil && len(*s.Bucket) < 1 {
  14510. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  14511. }
  14512. if s.Key == nil {
  14513. invalidParams.Add(request.NewErrParamRequired("Key"))
  14514. }
  14515. if s.Key != nil && len(*s.Key) < 1 {
  14516. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14517. }
  14518. if s.UploadId == nil {
  14519. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  14520. }
  14521. if invalidParams.Len() > 0 {
  14522. return invalidParams
  14523. }
  14524. return nil
  14525. }
  14526. // SetBucket sets the Bucket field's value.
  14527. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  14528. s.Bucket = &v
  14529. return s
  14530. }
  14531. func (s *ListPartsInput) getBucket() (v string) {
  14532. if s.Bucket == nil {
  14533. return v
  14534. }
  14535. return *s.Bucket
  14536. }
  14537. // SetKey sets the Key field's value.
  14538. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  14539. s.Key = &v
  14540. return s
  14541. }
  14542. // SetMaxParts sets the MaxParts field's value.
  14543. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  14544. s.MaxParts = &v
  14545. return s
  14546. }
  14547. // SetPartNumberMarker sets the PartNumberMarker field's value.
  14548. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  14549. s.PartNumberMarker = &v
  14550. return s
  14551. }
  14552. // SetRequestPayer sets the RequestPayer field's value.
  14553. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  14554. s.RequestPayer = &v
  14555. return s
  14556. }
  14557. // SetUploadId sets the UploadId field's value.
  14558. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  14559. s.UploadId = &v
  14560. return s
  14561. }
  14562. type ListPartsOutput struct {
  14563. _ struct{} `type:"structure"`
  14564. // Date when multipart upload will become eligible for abort operation by lifecycle.
  14565. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
  14566. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  14567. // operation.
  14568. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  14569. // Name of the bucket to which the multipart upload was initiated.
  14570. Bucket *string `type:"string"`
  14571. // Identifies who initiated the multipart upload.
  14572. Initiator *Initiator `type:"structure"`
  14573. // Indicates whether the returned list of parts is truncated.
  14574. IsTruncated *bool `type:"boolean"`
  14575. // Object key for which the multipart upload was initiated.
  14576. Key *string `min:"1" type:"string"`
  14577. // Maximum number of parts that were allowed in the response.
  14578. MaxParts *int64 `type:"integer"`
  14579. // When a list is truncated, this element specifies the last part in the list,
  14580. // as well as the value to use for the part-number-marker request parameter
  14581. // in a subsequent request.
  14582. NextPartNumberMarker *int64 `type:"integer"`
  14583. Owner *Owner `type:"structure"`
  14584. // Part number after which listing begins.
  14585. PartNumberMarker *int64 `type:"integer"`
  14586. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  14587. // If present, indicates that the requester was successfully charged for the
  14588. // request.
  14589. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14590. // The class of storage used to store the object.
  14591. StorageClass *string `type:"string" enum:"StorageClass"`
  14592. // Upload ID identifying the multipart upload whose parts are being listed.
  14593. UploadId *string `type:"string"`
  14594. }
  14595. // String returns the string representation
  14596. func (s ListPartsOutput) String() string {
  14597. return awsutil.Prettify(s)
  14598. }
  14599. // GoString returns the string representation
  14600. func (s ListPartsOutput) GoString() string {
  14601. return s.String()
  14602. }
  14603. // SetAbortDate sets the AbortDate field's value.
  14604. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  14605. s.AbortDate = &v
  14606. return s
  14607. }
  14608. // SetAbortRuleId sets the AbortRuleId field's value.
  14609. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  14610. s.AbortRuleId = &v
  14611. return s
  14612. }
  14613. // SetBucket sets the Bucket field's value.
  14614. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  14615. s.Bucket = &v
  14616. return s
  14617. }
  14618. func (s *ListPartsOutput) getBucket() (v string) {
  14619. if s.Bucket == nil {
  14620. return v
  14621. }
  14622. return *s.Bucket
  14623. }
  14624. // SetInitiator sets the Initiator field's value.
  14625. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  14626. s.Initiator = v
  14627. return s
  14628. }
  14629. // SetIsTruncated sets the IsTruncated field's value.
  14630. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  14631. s.IsTruncated = &v
  14632. return s
  14633. }
  14634. // SetKey sets the Key field's value.
  14635. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  14636. s.Key = &v
  14637. return s
  14638. }
  14639. // SetMaxParts sets the MaxParts field's value.
  14640. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  14641. s.MaxParts = &v
  14642. return s
  14643. }
  14644. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  14645. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  14646. s.NextPartNumberMarker = &v
  14647. return s
  14648. }
  14649. // SetOwner sets the Owner field's value.
  14650. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  14651. s.Owner = v
  14652. return s
  14653. }
  14654. // SetPartNumberMarker sets the PartNumberMarker field's value.
  14655. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  14656. s.PartNumberMarker = &v
  14657. return s
  14658. }
  14659. // SetParts sets the Parts field's value.
  14660. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  14661. s.Parts = v
  14662. return s
  14663. }
  14664. // SetRequestCharged sets the RequestCharged field's value.
  14665. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  14666. s.RequestCharged = &v
  14667. return s
  14668. }
  14669. // SetStorageClass sets the StorageClass field's value.
  14670. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  14671. s.StorageClass = &v
  14672. return s
  14673. }
  14674. // SetUploadId sets the UploadId field's value.
  14675. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  14676. s.UploadId = &v
  14677. return s
  14678. }
  14679. // Describes an S3 location that will receive the results of the restore request.
  14680. type Location struct {
  14681. _ struct{} `type:"structure"`
  14682. // A list of grants that control access to the staged results.
  14683. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  14684. // The name of the bucket where the restore results will be placed.
  14685. //
  14686. // BucketName is a required field
  14687. BucketName *string `type:"string" required:"true"`
  14688. // The canned ACL to apply to the restore results.
  14689. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  14690. // Describes the server-side encryption that will be applied to the restore
  14691. // results.
  14692. Encryption *Encryption `type:"structure"`
  14693. // The prefix that is prepended to the restore results for this request.
  14694. //
  14695. // Prefix is a required field
  14696. Prefix *string `type:"string" required:"true"`
  14697. // The class of storage used to store the restore results.
  14698. StorageClass *string `type:"string" enum:"StorageClass"`
  14699. // The tag-set that is applied to the restore results.
  14700. Tagging *Tagging `type:"structure"`
  14701. // A list of metadata to store with the restore results in S3.
  14702. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  14703. }
  14704. // String returns the string representation
  14705. func (s Location) String() string {
  14706. return awsutil.Prettify(s)
  14707. }
  14708. // GoString returns the string representation
  14709. func (s Location) GoString() string {
  14710. return s.String()
  14711. }
  14712. // Validate inspects the fields of the type to determine if they are valid.
  14713. func (s *Location) Validate() error {
  14714. invalidParams := request.ErrInvalidParams{Context: "Location"}
  14715. if s.BucketName == nil {
  14716. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  14717. }
  14718. if s.Prefix == nil {
  14719. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  14720. }
  14721. if s.AccessControlList != nil {
  14722. for i, v := range s.AccessControlList {
  14723. if v == nil {
  14724. continue
  14725. }
  14726. if err := v.Validate(); err != nil {
  14727. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  14728. }
  14729. }
  14730. }
  14731. if s.Encryption != nil {
  14732. if err := s.Encryption.Validate(); err != nil {
  14733. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  14734. }
  14735. }
  14736. if s.Tagging != nil {
  14737. if err := s.Tagging.Validate(); err != nil {
  14738. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14739. }
  14740. }
  14741. if invalidParams.Len() > 0 {
  14742. return invalidParams
  14743. }
  14744. return nil
  14745. }
  14746. // SetAccessControlList sets the AccessControlList field's value.
  14747. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  14748. s.AccessControlList = v
  14749. return s
  14750. }
  14751. // SetBucketName sets the BucketName field's value.
  14752. func (s *Location) SetBucketName(v string) *Location {
  14753. s.BucketName = &v
  14754. return s
  14755. }
  14756. // SetCannedACL sets the CannedACL field's value.
  14757. func (s *Location) SetCannedACL(v string) *Location {
  14758. s.CannedACL = &v
  14759. return s
  14760. }
  14761. // SetEncryption sets the Encryption field's value.
  14762. func (s *Location) SetEncryption(v *Encryption) *Location {
  14763. s.Encryption = v
  14764. return s
  14765. }
  14766. // SetPrefix sets the Prefix field's value.
  14767. func (s *Location) SetPrefix(v string) *Location {
  14768. s.Prefix = &v
  14769. return s
  14770. }
  14771. // SetStorageClass sets the StorageClass field's value.
  14772. func (s *Location) SetStorageClass(v string) *Location {
  14773. s.StorageClass = &v
  14774. return s
  14775. }
  14776. // SetTagging sets the Tagging field's value.
  14777. func (s *Location) SetTagging(v *Tagging) *Location {
  14778. s.Tagging = v
  14779. return s
  14780. }
  14781. // SetUserMetadata sets the UserMetadata field's value.
  14782. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  14783. s.UserMetadata = v
  14784. return s
  14785. }
  14786. // Container for logging information. Presence of this element indicates that
  14787. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  14788. // in this case.
  14789. type LoggingEnabled struct {
  14790. _ struct{} `type:"structure"`
  14791. // Specifies the bucket where you want Amazon S3 to store server access logs.
  14792. // You can have your logs delivered to any bucket that you own, including the
  14793. // same bucket that is being logged. You can also configure multiple buckets
  14794. // to deliver their logs to the same target bucket. In this case you should
  14795. // choose a different TargetPrefix for each source bucket so that the delivered
  14796. // log files can be distinguished by key.
  14797. //
  14798. // TargetBucket is a required field
  14799. TargetBucket *string `type:"string" required:"true"`
  14800. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  14801. // This element lets you specify a prefix for the keys that the log files will
  14802. // be stored under.
  14803. //
  14804. // TargetPrefix is a required field
  14805. TargetPrefix *string `type:"string" required:"true"`
  14806. }
  14807. // String returns the string representation
  14808. func (s LoggingEnabled) String() string {
  14809. return awsutil.Prettify(s)
  14810. }
  14811. // GoString returns the string representation
  14812. func (s LoggingEnabled) GoString() string {
  14813. return s.String()
  14814. }
  14815. // Validate inspects the fields of the type to determine if they are valid.
  14816. func (s *LoggingEnabled) Validate() error {
  14817. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  14818. if s.TargetBucket == nil {
  14819. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  14820. }
  14821. if s.TargetPrefix == nil {
  14822. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  14823. }
  14824. if s.TargetGrants != nil {
  14825. for i, v := range s.TargetGrants {
  14826. if v == nil {
  14827. continue
  14828. }
  14829. if err := v.Validate(); err != nil {
  14830. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  14831. }
  14832. }
  14833. }
  14834. if invalidParams.Len() > 0 {
  14835. return invalidParams
  14836. }
  14837. return nil
  14838. }
  14839. // SetTargetBucket sets the TargetBucket field's value.
  14840. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  14841. s.TargetBucket = &v
  14842. return s
  14843. }
  14844. // SetTargetGrants sets the TargetGrants field's value.
  14845. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  14846. s.TargetGrants = v
  14847. return s
  14848. }
  14849. // SetTargetPrefix sets the TargetPrefix field's value.
  14850. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  14851. s.TargetPrefix = &v
  14852. return s
  14853. }
  14854. // A metadata key-value pair to store with an object.
  14855. type MetadataEntry struct {
  14856. _ struct{} `type:"structure"`
  14857. Name *string `type:"string"`
  14858. Value *string `type:"string"`
  14859. }
  14860. // String returns the string representation
  14861. func (s MetadataEntry) String() string {
  14862. return awsutil.Prettify(s)
  14863. }
  14864. // GoString returns the string representation
  14865. func (s MetadataEntry) GoString() string {
  14866. return s.String()
  14867. }
  14868. // SetName sets the Name field's value.
  14869. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  14870. s.Name = &v
  14871. return s
  14872. }
  14873. // SetValue sets the Value field's value.
  14874. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  14875. s.Value = &v
  14876. return s
  14877. }
  14878. type MetricsAndOperator struct {
  14879. _ struct{} `type:"structure"`
  14880. // The prefix used when evaluating an AND predicate.
  14881. Prefix *string `type:"string"`
  14882. // The list of tags used when evaluating an AND predicate.
  14883. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  14884. }
  14885. // String returns the string representation
  14886. func (s MetricsAndOperator) String() string {
  14887. return awsutil.Prettify(s)
  14888. }
  14889. // GoString returns the string representation
  14890. func (s MetricsAndOperator) GoString() string {
  14891. return s.String()
  14892. }
  14893. // Validate inspects the fields of the type to determine if they are valid.
  14894. func (s *MetricsAndOperator) Validate() error {
  14895. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  14896. if s.Tags != nil {
  14897. for i, v := range s.Tags {
  14898. if v == nil {
  14899. continue
  14900. }
  14901. if err := v.Validate(); err != nil {
  14902. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  14903. }
  14904. }
  14905. }
  14906. if invalidParams.Len() > 0 {
  14907. return invalidParams
  14908. }
  14909. return nil
  14910. }
  14911. // SetPrefix sets the Prefix field's value.
  14912. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  14913. s.Prefix = &v
  14914. return s
  14915. }
  14916. // SetTags sets the Tags field's value.
  14917. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  14918. s.Tags = v
  14919. return s
  14920. }
  14921. type MetricsConfiguration struct {
  14922. _ struct{} `type:"structure"`
  14923. // Specifies a metrics configuration filter. The metrics configuration will
  14924. // only include objects that meet the filter's criteria. A filter must be a
  14925. // prefix, a tag, or a conjunction (MetricsAndOperator).
  14926. Filter *MetricsFilter `type:"structure"`
  14927. // The ID used to identify the metrics configuration.
  14928. //
  14929. // Id is a required field
  14930. Id *string `type:"string" required:"true"`
  14931. }
  14932. // String returns the string representation
  14933. func (s MetricsConfiguration) String() string {
  14934. return awsutil.Prettify(s)
  14935. }
  14936. // GoString returns the string representation
  14937. func (s MetricsConfiguration) GoString() string {
  14938. return s.String()
  14939. }
  14940. // Validate inspects the fields of the type to determine if they are valid.
  14941. func (s *MetricsConfiguration) Validate() error {
  14942. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  14943. if s.Id == nil {
  14944. invalidParams.Add(request.NewErrParamRequired("Id"))
  14945. }
  14946. if s.Filter != nil {
  14947. if err := s.Filter.Validate(); err != nil {
  14948. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  14949. }
  14950. }
  14951. if invalidParams.Len() > 0 {
  14952. return invalidParams
  14953. }
  14954. return nil
  14955. }
  14956. // SetFilter sets the Filter field's value.
  14957. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  14958. s.Filter = v
  14959. return s
  14960. }
  14961. // SetId sets the Id field's value.
  14962. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  14963. s.Id = &v
  14964. return s
  14965. }
  14966. type MetricsFilter struct {
  14967. _ struct{} `type:"structure"`
  14968. // A conjunction (logical AND) of predicates, which is used in evaluating a
  14969. // metrics filter. The operator must have at least two predicates, and an object
  14970. // must match all of the predicates in order for the filter to apply.
  14971. And *MetricsAndOperator `type:"structure"`
  14972. // The prefix used when evaluating a metrics filter.
  14973. Prefix *string `type:"string"`
  14974. // The tag used when evaluating a metrics filter.
  14975. Tag *Tag `type:"structure"`
  14976. }
  14977. // String returns the string representation
  14978. func (s MetricsFilter) String() string {
  14979. return awsutil.Prettify(s)
  14980. }
  14981. // GoString returns the string representation
  14982. func (s MetricsFilter) GoString() string {
  14983. return s.String()
  14984. }
  14985. // Validate inspects the fields of the type to determine if they are valid.
  14986. func (s *MetricsFilter) Validate() error {
  14987. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  14988. if s.And != nil {
  14989. if err := s.And.Validate(); err != nil {
  14990. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  14991. }
  14992. }
  14993. if s.Tag != nil {
  14994. if err := s.Tag.Validate(); err != nil {
  14995. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  14996. }
  14997. }
  14998. if invalidParams.Len() > 0 {
  14999. return invalidParams
  15000. }
  15001. return nil
  15002. }
  15003. // SetAnd sets the And field's value.
  15004. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  15005. s.And = v
  15006. return s
  15007. }
  15008. // SetPrefix sets the Prefix field's value.
  15009. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  15010. s.Prefix = &v
  15011. return s
  15012. }
  15013. // SetTag sets the Tag field's value.
  15014. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  15015. s.Tag = v
  15016. return s
  15017. }
  15018. type MultipartUpload struct {
  15019. _ struct{} `type:"structure"`
  15020. // Date and time at which the multipart upload was initiated.
  15021. Initiated *time.Time `type:"timestamp"`
  15022. // Identifies who initiated the multipart upload.
  15023. Initiator *Initiator `type:"structure"`
  15024. // Key of the object for which the multipart upload was initiated.
  15025. Key *string `min:"1" type:"string"`
  15026. Owner *Owner `type:"structure"`
  15027. // The class of storage used to store the object.
  15028. StorageClass *string `type:"string" enum:"StorageClass"`
  15029. // Upload ID that identifies the multipart upload.
  15030. UploadId *string `type:"string"`
  15031. }
  15032. // String returns the string representation
  15033. func (s MultipartUpload) String() string {
  15034. return awsutil.Prettify(s)
  15035. }
  15036. // GoString returns the string representation
  15037. func (s MultipartUpload) GoString() string {
  15038. return s.String()
  15039. }
  15040. // SetInitiated sets the Initiated field's value.
  15041. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  15042. s.Initiated = &v
  15043. return s
  15044. }
  15045. // SetInitiator sets the Initiator field's value.
  15046. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  15047. s.Initiator = v
  15048. return s
  15049. }
  15050. // SetKey sets the Key field's value.
  15051. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  15052. s.Key = &v
  15053. return s
  15054. }
  15055. // SetOwner sets the Owner field's value.
  15056. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  15057. s.Owner = v
  15058. return s
  15059. }
  15060. // SetStorageClass sets the StorageClass field's value.
  15061. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  15062. s.StorageClass = &v
  15063. return s
  15064. }
  15065. // SetUploadId sets the UploadId field's value.
  15066. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  15067. s.UploadId = &v
  15068. return s
  15069. }
  15070. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  15071. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  15072. // configuration action on a bucket that has versioning enabled (or suspended)
  15073. // to request that Amazon S3 delete noncurrent object versions at a specific
  15074. // period in the object's lifetime.
  15075. type NoncurrentVersionExpiration struct {
  15076. _ struct{} `type:"structure"`
  15077. // Specifies the number of days an object is noncurrent before Amazon S3 can
  15078. // perform the associated action. For information about the noncurrent days
  15079. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  15080. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in
  15081. // the Amazon Simple Storage Service Developer Guide.
  15082. NoncurrentDays *int64 `type:"integer"`
  15083. }
  15084. // String returns the string representation
  15085. func (s NoncurrentVersionExpiration) String() string {
  15086. return awsutil.Prettify(s)
  15087. }
  15088. // GoString returns the string representation
  15089. func (s NoncurrentVersionExpiration) GoString() string {
  15090. return s.String()
  15091. }
  15092. // SetNoncurrentDays sets the NoncurrentDays field's value.
  15093. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  15094. s.NoncurrentDays = &v
  15095. return s
  15096. }
  15097. // Container for the transition rule that describes when noncurrent objects
  15098. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER
  15099. // storage class. If your bucket is versioning-enabled (or versioning is suspended),
  15100. // you can set this action to request that Amazon S3 transition noncurrent object
  15101. // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage
  15102. // class at a specific period in the object's lifetime.
  15103. type NoncurrentVersionTransition struct {
  15104. _ struct{} `type:"structure"`
  15105. // Specifies the number of days an object is noncurrent before Amazon S3 can
  15106. // perform the associated action. For information about the noncurrent days
  15107. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  15108. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html) in
  15109. // the Amazon Simple Storage Service Developer Guide.
  15110. NoncurrentDays *int64 `type:"integer"`
  15111. // The class of storage used to store the object.
  15112. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  15113. }
  15114. // String returns the string representation
  15115. func (s NoncurrentVersionTransition) String() string {
  15116. return awsutil.Prettify(s)
  15117. }
  15118. // GoString returns the string representation
  15119. func (s NoncurrentVersionTransition) GoString() string {
  15120. return s.String()
  15121. }
  15122. // SetNoncurrentDays sets the NoncurrentDays field's value.
  15123. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  15124. s.NoncurrentDays = &v
  15125. return s
  15126. }
  15127. // SetStorageClass sets the StorageClass field's value.
  15128. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  15129. s.StorageClass = &v
  15130. return s
  15131. }
  15132. // A container for specifying the notification configuration of the bucket.
  15133. // If this element is empty, notifications are turned off for the bucket.
  15134. type NotificationConfiguration struct {
  15135. _ struct{} `type:"structure"`
  15136. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  15137. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  15138. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  15139. }
  15140. // String returns the string representation
  15141. func (s NotificationConfiguration) String() string {
  15142. return awsutil.Prettify(s)
  15143. }
  15144. // GoString returns the string representation
  15145. func (s NotificationConfiguration) GoString() string {
  15146. return s.String()
  15147. }
  15148. // Validate inspects the fields of the type to determine if they are valid.
  15149. func (s *NotificationConfiguration) Validate() error {
  15150. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  15151. if s.LambdaFunctionConfigurations != nil {
  15152. for i, v := range s.LambdaFunctionConfigurations {
  15153. if v == nil {
  15154. continue
  15155. }
  15156. if err := v.Validate(); err != nil {
  15157. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  15158. }
  15159. }
  15160. }
  15161. if s.QueueConfigurations != nil {
  15162. for i, v := range s.QueueConfigurations {
  15163. if v == nil {
  15164. continue
  15165. }
  15166. if err := v.Validate(); err != nil {
  15167. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  15168. }
  15169. }
  15170. }
  15171. if s.TopicConfigurations != nil {
  15172. for i, v := range s.TopicConfigurations {
  15173. if v == nil {
  15174. continue
  15175. }
  15176. if err := v.Validate(); err != nil {
  15177. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  15178. }
  15179. }
  15180. }
  15181. if invalidParams.Len() > 0 {
  15182. return invalidParams
  15183. }
  15184. return nil
  15185. }
  15186. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  15187. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  15188. s.LambdaFunctionConfigurations = v
  15189. return s
  15190. }
  15191. // SetQueueConfigurations sets the QueueConfigurations field's value.
  15192. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  15193. s.QueueConfigurations = v
  15194. return s
  15195. }
  15196. // SetTopicConfigurations sets the TopicConfigurations field's value.
  15197. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  15198. s.TopicConfigurations = v
  15199. return s
  15200. }
  15201. type NotificationConfigurationDeprecated struct {
  15202. _ struct{} `type:"structure"`
  15203. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  15204. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  15205. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  15206. }
  15207. // String returns the string representation
  15208. func (s NotificationConfigurationDeprecated) String() string {
  15209. return awsutil.Prettify(s)
  15210. }
  15211. // GoString returns the string representation
  15212. func (s NotificationConfigurationDeprecated) GoString() string {
  15213. return s.String()
  15214. }
  15215. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  15216. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  15217. s.CloudFunctionConfiguration = v
  15218. return s
  15219. }
  15220. // SetQueueConfiguration sets the QueueConfiguration field's value.
  15221. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  15222. s.QueueConfiguration = v
  15223. return s
  15224. }
  15225. // SetTopicConfiguration sets the TopicConfiguration field's value.
  15226. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  15227. s.TopicConfiguration = v
  15228. return s
  15229. }
  15230. // A container for object key name filtering rules. For information about key
  15231. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15232. // in the Amazon Simple Storage Service Developer Guide.
  15233. type NotificationConfigurationFilter struct {
  15234. _ struct{} `type:"structure"`
  15235. // A container for object key name prefix and suffix filtering rules.
  15236. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  15237. }
  15238. // String returns the string representation
  15239. func (s NotificationConfigurationFilter) String() string {
  15240. return awsutil.Prettify(s)
  15241. }
  15242. // GoString returns the string representation
  15243. func (s NotificationConfigurationFilter) GoString() string {
  15244. return s.String()
  15245. }
  15246. // SetKey sets the Key field's value.
  15247. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  15248. s.Key = v
  15249. return s
  15250. }
  15251. type Object struct {
  15252. _ struct{} `type:"structure"`
  15253. ETag *string `type:"string"`
  15254. Key *string `min:"1" type:"string"`
  15255. LastModified *time.Time `type:"timestamp"`
  15256. Owner *Owner `type:"structure"`
  15257. Size *int64 `type:"integer"`
  15258. // The class of storage used to store the object.
  15259. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  15260. }
  15261. // String returns the string representation
  15262. func (s Object) String() string {
  15263. return awsutil.Prettify(s)
  15264. }
  15265. // GoString returns the string representation
  15266. func (s Object) GoString() string {
  15267. return s.String()
  15268. }
  15269. // SetETag sets the ETag field's value.
  15270. func (s *Object) SetETag(v string) *Object {
  15271. s.ETag = &v
  15272. return s
  15273. }
  15274. // SetKey sets the Key field's value.
  15275. func (s *Object) SetKey(v string) *Object {
  15276. s.Key = &v
  15277. return s
  15278. }
  15279. // SetLastModified sets the LastModified field's value.
  15280. func (s *Object) SetLastModified(v time.Time) *Object {
  15281. s.LastModified = &v
  15282. return s
  15283. }
  15284. // SetOwner sets the Owner field's value.
  15285. func (s *Object) SetOwner(v *Owner) *Object {
  15286. s.Owner = v
  15287. return s
  15288. }
  15289. // SetSize sets the Size field's value.
  15290. func (s *Object) SetSize(v int64) *Object {
  15291. s.Size = &v
  15292. return s
  15293. }
  15294. // SetStorageClass sets the StorageClass field's value.
  15295. func (s *Object) SetStorageClass(v string) *Object {
  15296. s.StorageClass = &v
  15297. return s
  15298. }
  15299. type ObjectIdentifier struct {
  15300. _ struct{} `type:"structure"`
  15301. // Key name of the object to delete.
  15302. //
  15303. // Key is a required field
  15304. Key *string `min:"1" type:"string" required:"true"`
  15305. // VersionId for the specific version of the object to delete.
  15306. VersionId *string `type:"string"`
  15307. }
  15308. // String returns the string representation
  15309. func (s ObjectIdentifier) String() string {
  15310. return awsutil.Prettify(s)
  15311. }
  15312. // GoString returns the string representation
  15313. func (s ObjectIdentifier) GoString() string {
  15314. return s.String()
  15315. }
  15316. // Validate inspects the fields of the type to determine if they are valid.
  15317. func (s *ObjectIdentifier) Validate() error {
  15318. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  15319. if s.Key == nil {
  15320. invalidParams.Add(request.NewErrParamRequired("Key"))
  15321. }
  15322. if s.Key != nil && len(*s.Key) < 1 {
  15323. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15324. }
  15325. if invalidParams.Len() > 0 {
  15326. return invalidParams
  15327. }
  15328. return nil
  15329. }
  15330. // SetKey sets the Key field's value.
  15331. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  15332. s.Key = &v
  15333. return s
  15334. }
  15335. // SetVersionId sets the VersionId field's value.
  15336. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  15337. s.VersionId = &v
  15338. return s
  15339. }
  15340. // The container element for Object Lock configuration parameters.
  15341. type ObjectLockConfiguration struct {
  15342. _ struct{} `type:"structure"`
  15343. // Indicates whether this bucket has an Object Lock configuration enabled.
  15344. ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
  15345. // The Object Lock rule in place for the specified object.
  15346. Rule *ObjectLockRule `type:"structure"`
  15347. }
  15348. // String returns the string representation
  15349. func (s ObjectLockConfiguration) String() string {
  15350. return awsutil.Prettify(s)
  15351. }
  15352. // GoString returns the string representation
  15353. func (s ObjectLockConfiguration) GoString() string {
  15354. return s.String()
  15355. }
  15356. // SetObjectLockEnabled sets the ObjectLockEnabled field's value.
  15357. func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration {
  15358. s.ObjectLockEnabled = &v
  15359. return s
  15360. }
  15361. // SetRule sets the Rule field's value.
  15362. func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration {
  15363. s.Rule = v
  15364. return s
  15365. }
  15366. // A Legal Hold configuration for an object.
  15367. type ObjectLockLegalHold struct {
  15368. _ struct{} `type:"structure"`
  15369. // Indicates whether the specified object has a Legal Hold in place.
  15370. Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"`
  15371. }
  15372. // String returns the string representation
  15373. func (s ObjectLockLegalHold) String() string {
  15374. return awsutil.Prettify(s)
  15375. }
  15376. // GoString returns the string representation
  15377. func (s ObjectLockLegalHold) GoString() string {
  15378. return s.String()
  15379. }
  15380. // SetStatus sets the Status field's value.
  15381. func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold {
  15382. s.Status = &v
  15383. return s
  15384. }
  15385. // A Retention configuration for an object.
  15386. type ObjectLockRetention struct {
  15387. _ struct{} `type:"structure"`
  15388. // Indicates the Retention mode for the specified object.
  15389. Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
  15390. // The date on which this Object Lock Retention will expire.
  15391. RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  15392. }
  15393. // String returns the string representation
  15394. func (s ObjectLockRetention) String() string {
  15395. return awsutil.Prettify(s)
  15396. }
  15397. // GoString returns the string representation
  15398. func (s ObjectLockRetention) GoString() string {
  15399. return s.String()
  15400. }
  15401. // SetMode sets the Mode field's value.
  15402. func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention {
  15403. s.Mode = &v
  15404. return s
  15405. }
  15406. // SetRetainUntilDate sets the RetainUntilDate field's value.
  15407. func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention {
  15408. s.RetainUntilDate = &v
  15409. return s
  15410. }
  15411. // The container element for an Object Lock rule.
  15412. type ObjectLockRule struct {
  15413. _ struct{} `type:"structure"`
  15414. // The default retention period that you want to apply to new objects placed
  15415. // in the specified bucket.
  15416. DefaultRetention *DefaultRetention `type:"structure"`
  15417. }
  15418. // String returns the string representation
  15419. func (s ObjectLockRule) String() string {
  15420. return awsutil.Prettify(s)
  15421. }
  15422. // GoString returns the string representation
  15423. func (s ObjectLockRule) GoString() string {
  15424. return s.String()
  15425. }
  15426. // SetDefaultRetention sets the DefaultRetention field's value.
  15427. func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule {
  15428. s.DefaultRetention = v
  15429. return s
  15430. }
  15431. type ObjectVersion struct {
  15432. _ struct{} `type:"structure"`
  15433. ETag *string `type:"string"`
  15434. // Specifies whether the object is (true) or is not (false) the latest version
  15435. // of an object.
  15436. IsLatest *bool `type:"boolean"`
  15437. // The object key.
  15438. Key *string `min:"1" type:"string"`
  15439. // Date and time the object was last modified.
  15440. LastModified *time.Time `type:"timestamp"`
  15441. Owner *Owner `type:"structure"`
  15442. // Size in bytes of the object.
  15443. Size *int64 `type:"integer"`
  15444. // The class of storage used to store the object.
  15445. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  15446. // Version ID of an object.
  15447. VersionId *string `type:"string"`
  15448. }
  15449. // String returns the string representation
  15450. func (s ObjectVersion) String() string {
  15451. return awsutil.Prettify(s)
  15452. }
  15453. // GoString returns the string representation
  15454. func (s ObjectVersion) GoString() string {
  15455. return s.String()
  15456. }
  15457. // SetETag sets the ETag field's value.
  15458. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  15459. s.ETag = &v
  15460. return s
  15461. }
  15462. // SetIsLatest sets the IsLatest field's value.
  15463. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  15464. s.IsLatest = &v
  15465. return s
  15466. }
  15467. // SetKey sets the Key field's value.
  15468. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  15469. s.Key = &v
  15470. return s
  15471. }
  15472. // SetLastModified sets the LastModified field's value.
  15473. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  15474. s.LastModified = &v
  15475. return s
  15476. }
  15477. // SetOwner sets the Owner field's value.
  15478. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  15479. s.Owner = v
  15480. return s
  15481. }
  15482. // SetSize sets the Size field's value.
  15483. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  15484. s.Size = &v
  15485. return s
  15486. }
  15487. // SetStorageClass sets the StorageClass field's value.
  15488. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  15489. s.StorageClass = &v
  15490. return s
  15491. }
  15492. // SetVersionId sets the VersionId field's value.
  15493. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  15494. s.VersionId = &v
  15495. return s
  15496. }
  15497. // Describes the location where the restore job's output is stored.
  15498. type OutputLocation struct {
  15499. _ struct{} `type:"structure"`
  15500. // Describes an S3 location that will receive the results of the restore request.
  15501. S3 *Location `type:"structure"`
  15502. }
  15503. // String returns the string representation
  15504. func (s OutputLocation) String() string {
  15505. return awsutil.Prettify(s)
  15506. }
  15507. // GoString returns the string representation
  15508. func (s OutputLocation) GoString() string {
  15509. return s.String()
  15510. }
  15511. // Validate inspects the fields of the type to determine if they are valid.
  15512. func (s *OutputLocation) Validate() error {
  15513. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  15514. if s.S3 != nil {
  15515. if err := s.S3.Validate(); err != nil {
  15516. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  15517. }
  15518. }
  15519. if invalidParams.Len() > 0 {
  15520. return invalidParams
  15521. }
  15522. return nil
  15523. }
  15524. // SetS3 sets the S3 field's value.
  15525. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  15526. s.S3 = v
  15527. return s
  15528. }
  15529. // Describes how results of the Select job are serialized.
  15530. type OutputSerialization struct {
  15531. _ struct{} `type:"structure"`
  15532. // Describes the serialization of CSV-encoded Select results.
  15533. CSV *CSVOutput `type:"structure"`
  15534. // Specifies JSON as request's output serialization format.
  15535. JSON *JSONOutput `type:"structure"`
  15536. }
  15537. // String returns the string representation
  15538. func (s OutputSerialization) String() string {
  15539. return awsutil.Prettify(s)
  15540. }
  15541. // GoString returns the string representation
  15542. func (s OutputSerialization) GoString() string {
  15543. return s.String()
  15544. }
  15545. // SetCSV sets the CSV field's value.
  15546. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  15547. s.CSV = v
  15548. return s
  15549. }
  15550. // SetJSON sets the JSON field's value.
  15551. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  15552. s.JSON = v
  15553. return s
  15554. }
  15555. type Owner struct {
  15556. _ struct{} `type:"structure"`
  15557. DisplayName *string `type:"string"`
  15558. ID *string `type:"string"`
  15559. }
  15560. // String returns the string representation
  15561. func (s Owner) String() string {
  15562. return awsutil.Prettify(s)
  15563. }
  15564. // GoString returns the string representation
  15565. func (s Owner) GoString() string {
  15566. return s.String()
  15567. }
  15568. // SetDisplayName sets the DisplayName field's value.
  15569. func (s *Owner) SetDisplayName(v string) *Owner {
  15570. s.DisplayName = &v
  15571. return s
  15572. }
  15573. // SetID sets the ID field's value.
  15574. func (s *Owner) SetID(v string) *Owner {
  15575. s.ID = &v
  15576. return s
  15577. }
  15578. type ParquetInput struct {
  15579. _ struct{} `type:"structure"`
  15580. }
  15581. // String returns the string representation
  15582. func (s ParquetInput) String() string {
  15583. return awsutil.Prettify(s)
  15584. }
  15585. // GoString returns the string representation
  15586. func (s ParquetInput) GoString() string {
  15587. return s.String()
  15588. }
  15589. type Part struct {
  15590. _ struct{} `type:"structure"`
  15591. // Entity tag returned when the part was uploaded.
  15592. ETag *string `type:"string"`
  15593. // Date and time at which the part was uploaded.
  15594. LastModified *time.Time `type:"timestamp"`
  15595. // Part number identifying the part. This is a positive integer between 1 and
  15596. // 10,000.
  15597. PartNumber *int64 `type:"integer"`
  15598. // Size in bytes of the uploaded part data.
  15599. Size *int64 `type:"integer"`
  15600. }
  15601. // String returns the string representation
  15602. func (s Part) String() string {
  15603. return awsutil.Prettify(s)
  15604. }
  15605. // GoString returns the string representation
  15606. func (s Part) GoString() string {
  15607. return s.String()
  15608. }
  15609. // SetETag sets the ETag field's value.
  15610. func (s *Part) SetETag(v string) *Part {
  15611. s.ETag = &v
  15612. return s
  15613. }
  15614. // SetLastModified sets the LastModified field's value.
  15615. func (s *Part) SetLastModified(v time.Time) *Part {
  15616. s.LastModified = &v
  15617. return s
  15618. }
  15619. // SetPartNumber sets the PartNumber field's value.
  15620. func (s *Part) SetPartNumber(v int64) *Part {
  15621. s.PartNumber = &v
  15622. return s
  15623. }
  15624. // SetSize sets the Size field's value.
  15625. func (s *Part) SetSize(v int64) *Part {
  15626. s.Size = &v
  15627. return s
  15628. }
  15629. // The container element for a bucket's policy status.
  15630. type PolicyStatus struct {
  15631. _ struct{} `type:"structure"`
  15632. // The policy status for this bucket. TRUE indicates that this bucket is public.
  15633. // FALSE indicates that the bucket is not public.
  15634. IsPublic *bool `locationName:"IsPublic" type:"boolean"`
  15635. }
  15636. // String returns the string representation
  15637. func (s PolicyStatus) String() string {
  15638. return awsutil.Prettify(s)
  15639. }
  15640. // GoString returns the string representation
  15641. func (s PolicyStatus) GoString() string {
  15642. return s.String()
  15643. }
  15644. // SetIsPublic sets the IsPublic field's value.
  15645. func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
  15646. s.IsPublic = &v
  15647. return s
  15648. }
  15649. type Progress struct {
  15650. _ struct{} `type:"structure"`
  15651. // The current number of uncompressed object bytes processed.
  15652. BytesProcessed *int64 `type:"long"`
  15653. // The current number of bytes of records payload data returned.
  15654. BytesReturned *int64 `type:"long"`
  15655. // The current number of object bytes scanned.
  15656. BytesScanned *int64 `type:"long"`
  15657. }
  15658. // String returns the string representation
  15659. func (s Progress) String() string {
  15660. return awsutil.Prettify(s)
  15661. }
  15662. // GoString returns the string representation
  15663. func (s Progress) GoString() string {
  15664. return s.String()
  15665. }
  15666. // SetBytesProcessed sets the BytesProcessed field's value.
  15667. func (s *Progress) SetBytesProcessed(v int64) *Progress {
  15668. s.BytesProcessed = &v
  15669. return s
  15670. }
  15671. // SetBytesReturned sets the BytesReturned field's value.
  15672. func (s *Progress) SetBytesReturned(v int64) *Progress {
  15673. s.BytesReturned = &v
  15674. return s
  15675. }
  15676. // SetBytesScanned sets the BytesScanned field's value.
  15677. func (s *Progress) SetBytesScanned(v int64) *Progress {
  15678. s.BytesScanned = &v
  15679. return s
  15680. }
  15681. type ProgressEvent struct {
  15682. _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
  15683. // The Progress event details.
  15684. Details *Progress `locationName:"Details" type:"structure"`
  15685. }
  15686. // String returns the string representation
  15687. func (s ProgressEvent) String() string {
  15688. return awsutil.Prettify(s)
  15689. }
  15690. // GoString returns the string representation
  15691. func (s ProgressEvent) GoString() string {
  15692. return s.String()
  15693. }
  15694. // SetDetails sets the Details field's value.
  15695. func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
  15696. s.Details = v
  15697. return s
  15698. }
  15699. // The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
  15700. func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
  15701. // UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
  15702. // This method is only used internally within the SDK's EventStream handling.
  15703. func (s *ProgressEvent) UnmarshalEvent(
  15704. payloadUnmarshaler protocol.PayloadUnmarshaler,
  15705. msg eventstream.Message,
  15706. ) error {
  15707. if err := payloadUnmarshaler.UnmarshalPayload(
  15708. bytes.NewReader(msg.Payload), s,
  15709. ); err != nil {
  15710. return err
  15711. }
  15712. return nil
  15713. }
  15714. type PublicAccessBlockConfiguration struct {
  15715. _ struct{} `type:"structure"`
  15716. // Specifies whether Amazon S3 should block public access control lists (ACLs)
  15717. // for this bucket and objects in this bucket. Setting this element to TRUE
  15718. // causes the following behavior:
  15719. //
  15720. // * PUT Bucket acl and PUT Object acl calls fail if the specified ACL is
  15721. // public.
  15722. //
  15723. // * PUT Object calls fail if the request includes a public ACL.
  15724. //
  15725. // Enabling this setting doesn't affect existing policies or ACLs.
  15726. BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"`
  15727. // Specifies whether Amazon S3 should block public bucket policies for this
  15728. // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to
  15729. // PUT Bucket policy if the specified bucket policy allows public access.
  15730. //
  15731. // Enabling this setting doesn't affect existing bucket policies.
  15732. BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"`
  15733. // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
  15734. // objects in this bucket. Setting this element to TRUE causes Amazon S3 to
  15735. // ignore all public ACLs on this bucket and objects in this bucket.
  15736. //
  15737. // Enabling this setting doesn't affect the persistence of any existing ACLs
  15738. // and doesn't prevent new public ACLs from being set.
  15739. IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"`
  15740. // Specifies whether Amazon S3 should restrict public bucket policies for this
  15741. // bucket. Setting this element to TRUE restricts access to this bucket to only
  15742. // AWS services and authorized users within this account if the bucket has a
  15743. // public policy.
  15744. //
  15745. // Enabling this setting doesn't affect previously stored bucket policies, except
  15746. // that public and cross-account access within any public bucket policy, including
  15747. // non-public delegation to specific accounts, is blocked.
  15748. RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"`
  15749. }
  15750. // String returns the string representation
  15751. func (s PublicAccessBlockConfiguration) String() string {
  15752. return awsutil.Prettify(s)
  15753. }
  15754. // GoString returns the string representation
  15755. func (s PublicAccessBlockConfiguration) GoString() string {
  15756. return s.String()
  15757. }
  15758. // SetBlockPublicAcls sets the BlockPublicAcls field's value.
  15759. func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration {
  15760. s.BlockPublicAcls = &v
  15761. return s
  15762. }
  15763. // SetBlockPublicPolicy sets the BlockPublicPolicy field's value.
  15764. func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration {
  15765. s.BlockPublicPolicy = &v
  15766. return s
  15767. }
  15768. // SetIgnorePublicAcls sets the IgnorePublicAcls field's value.
  15769. func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration {
  15770. s.IgnorePublicAcls = &v
  15771. return s
  15772. }
  15773. // SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value.
  15774. func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration {
  15775. s.RestrictPublicBuckets = &v
  15776. return s
  15777. }
  15778. type PutBucketAccelerateConfigurationInput struct {
  15779. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  15780. // Specifies the Accelerate Configuration you want to set for the bucket.
  15781. //
  15782. // AccelerateConfiguration is a required field
  15783. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15784. // Name of the bucket for which the accelerate configuration is set.
  15785. //
  15786. // Bucket is a required field
  15787. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15788. }
  15789. // String returns the string representation
  15790. func (s PutBucketAccelerateConfigurationInput) String() string {
  15791. return awsutil.Prettify(s)
  15792. }
  15793. // GoString returns the string representation
  15794. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  15795. return s.String()
  15796. }
  15797. // Validate inspects the fields of the type to determine if they are valid.
  15798. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  15799. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  15800. if s.AccelerateConfiguration == nil {
  15801. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  15802. }
  15803. if s.Bucket == nil {
  15804. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15805. }
  15806. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15807. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15808. }
  15809. if invalidParams.Len() > 0 {
  15810. return invalidParams
  15811. }
  15812. return nil
  15813. }
  15814. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  15815. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  15816. s.AccelerateConfiguration = v
  15817. return s
  15818. }
  15819. // SetBucket sets the Bucket field's value.
  15820. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  15821. s.Bucket = &v
  15822. return s
  15823. }
  15824. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  15825. if s.Bucket == nil {
  15826. return v
  15827. }
  15828. return *s.Bucket
  15829. }
  15830. type PutBucketAccelerateConfigurationOutput struct {
  15831. _ struct{} `type:"structure"`
  15832. }
  15833. // String returns the string representation
  15834. func (s PutBucketAccelerateConfigurationOutput) String() string {
  15835. return awsutil.Prettify(s)
  15836. }
  15837. // GoString returns the string representation
  15838. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  15839. return s.String()
  15840. }
  15841. type PutBucketAclInput struct {
  15842. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  15843. // The canned ACL to apply to the bucket.
  15844. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  15845. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15846. // Bucket is a required field
  15847. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15848. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  15849. // bucket.
  15850. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15851. // Allows grantee to list the objects in the bucket.
  15852. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15853. // Allows grantee to read the bucket ACL.
  15854. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15855. // Allows grantee to create, overwrite, and delete any object in the bucket.
  15856. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  15857. // Allows grantee to write the ACL for the applicable bucket.
  15858. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15859. }
  15860. // String returns the string representation
  15861. func (s PutBucketAclInput) String() string {
  15862. return awsutil.Prettify(s)
  15863. }
  15864. // GoString returns the string representation
  15865. func (s PutBucketAclInput) GoString() string {
  15866. return s.String()
  15867. }
  15868. // Validate inspects the fields of the type to determine if they are valid.
  15869. func (s *PutBucketAclInput) Validate() error {
  15870. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  15871. if s.Bucket == nil {
  15872. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15873. }
  15874. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15875. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15876. }
  15877. if s.AccessControlPolicy != nil {
  15878. if err := s.AccessControlPolicy.Validate(); err != nil {
  15879. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  15880. }
  15881. }
  15882. if invalidParams.Len() > 0 {
  15883. return invalidParams
  15884. }
  15885. return nil
  15886. }
  15887. // SetACL sets the ACL field's value.
  15888. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  15889. s.ACL = &v
  15890. return s
  15891. }
  15892. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  15893. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  15894. s.AccessControlPolicy = v
  15895. return s
  15896. }
  15897. // SetBucket sets the Bucket field's value.
  15898. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  15899. s.Bucket = &v
  15900. return s
  15901. }
  15902. func (s *PutBucketAclInput) getBucket() (v string) {
  15903. if s.Bucket == nil {
  15904. return v
  15905. }
  15906. return *s.Bucket
  15907. }
  15908. // SetGrantFullControl sets the GrantFullControl field's value.
  15909. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  15910. s.GrantFullControl = &v
  15911. return s
  15912. }
  15913. // SetGrantRead sets the GrantRead field's value.
  15914. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  15915. s.GrantRead = &v
  15916. return s
  15917. }
  15918. // SetGrantReadACP sets the GrantReadACP field's value.
  15919. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  15920. s.GrantReadACP = &v
  15921. return s
  15922. }
  15923. // SetGrantWrite sets the GrantWrite field's value.
  15924. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  15925. s.GrantWrite = &v
  15926. return s
  15927. }
  15928. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15929. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  15930. s.GrantWriteACP = &v
  15931. return s
  15932. }
  15933. type PutBucketAclOutput struct {
  15934. _ struct{} `type:"structure"`
  15935. }
  15936. // String returns the string representation
  15937. func (s PutBucketAclOutput) String() string {
  15938. return awsutil.Prettify(s)
  15939. }
  15940. // GoString returns the string representation
  15941. func (s PutBucketAclOutput) GoString() string {
  15942. return s.String()
  15943. }
  15944. type PutBucketAnalyticsConfigurationInput struct {
  15945. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  15946. // The configuration and any analyses for the analytics filter.
  15947. //
  15948. // AnalyticsConfiguration is a required field
  15949. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15950. // The name of the bucket to which an analytics configuration is stored.
  15951. //
  15952. // Bucket is a required field
  15953. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15954. // The identifier used to represent an analytics configuration.
  15955. //
  15956. // Id is a required field
  15957. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  15958. }
  15959. // String returns the string representation
  15960. func (s PutBucketAnalyticsConfigurationInput) String() string {
  15961. return awsutil.Prettify(s)
  15962. }
  15963. // GoString returns the string representation
  15964. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  15965. return s.String()
  15966. }
  15967. // Validate inspects the fields of the type to determine if they are valid.
  15968. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  15969. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  15970. if s.AnalyticsConfiguration == nil {
  15971. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  15972. }
  15973. if s.Bucket == nil {
  15974. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15975. }
  15976. if s.Bucket != nil && len(*s.Bucket) < 1 {
  15977. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  15978. }
  15979. if s.Id == nil {
  15980. invalidParams.Add(request.NewErrParamRequired("Id"))
  15981. }
  15982. if s.AnalyticsConfiguration != nil {
  15983. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  15984. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  15985. }
  15986. }
  15987. if invalidParams.Len() > 0 {
  15988. return invalidParams
  15989. }
  15990. return nil
  15991. }
  15992. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  15993. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  15994. s.AnalyticsConfiguration = v
  15995. return s
  15996. }
  15997. // SetBucket sets the Bucket field's value.
  15998. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  15999. s.Bucket = &v
  16000. return s
  16001. }
  16002. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  16003. if s.Bucket == nil {
  16004. return v
  16005. }
  16006. return *s.Bucket
  16007. }
  16008. // SetId sets the Id field's value.
  16009. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  16010. s.Id = &v
  16011. return s
  16012. }
  16013. type PutBucketAnalyticsConfigurationOutput struct {
  16014. _ struct{} `type:"structure"`
  16015. }
  16016. // String returns the string representation
  16017. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  16018. return awsutil.Prettify(s)
  16019. }
  16020. // GoString returns the string representation
  16021. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  16022. return s.String()
  16023. }
  16024. type PutBucketCorsInput struct {
  16025. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  16026. // Bucket is a required field
  16027. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16028. // CORSConfiguration is a required field
  16029. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16030. }
  16031. // String returns the string representation
  16032. func (s PutBucketCorsInput) String() string {
  16033. return awsutil.Prettify(s)
  16034. }
  16035. // GoString returns the string representation
  16036. func (s PutBucketCorsInput) GoString() string {
  16037. return s.String()
  16038. }
  16039. // Validate inspects the fields of the type to determine if they are valid.
  16040. func (s *PutBucketCorsInput) Validate() error {
  16041. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  16042. if s.Bucket == nil {
  16043. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16044. }
  16045. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16046. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16047. }
  16048. if s.CORSConfiguration == nil {
  16049. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  16050. }
  16051. if s.CORSConfiguration != nil {
  16052. if err := s.CORSConfiguration.Validate(); err != nil {
  16053. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  16054. }
  16055. }
  16056. if invalidParams.Len() > 0 {
  16057. return invalidParams
  16058. }
  16059. return nil
  16060. }
  16061. // SetBucket sets the Bucket field's value.
  16062. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  16063. s.Bucket = &v
  16064. return s
  16065. }
  16066. func (s *PutBucketCorsInput) getBucket() (v string) {
  16067. if s.Bucket == nil {
  16068. return v
  16069. }
  16070. return *s.Bucket
  16071. }
  16072. // SetCORSConfiguration sets the CORSConfiguration field's value.
  16073. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  16074. s.CORSConfiguration = v
  16075. return s
  16076. }
  16077. type PutBucketCorsOutput struct {
  16078. _ struct{} `type:"structure"`
  16079. }
  16080. // String returns the string representation
  16081. func (s PutBucketCorsOutput) String() string {
  16082. return awsutil.Prettify(s)
  16083. }
  16084. // GoString returns the string representation
  16085. func (s PutBucketCorsOutput) GoString() string {
  16086. return s.String()
  16087. }
  16088. type PutBucketEncryptionInput struct {
  16089. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  16090. // The name of the bucket for which the server-side encryption configuration
  16091. // is set.
  16092. //
  16093. // Bucket is a required field
  16094. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16095. // Container for server-side encryption configuration rules. Currently S3 supports
  16096. // one rule only.
  16097. //
  16098. // ServerSideEncryptionConfiguration is a required field
  16099. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16100. }
  16101. // String returns the string representation
  16102. func (s PutBucketEncryptionInput) String() string {
  16103. return awsutil.Prettify(s)
  16104. }
  16105. // GoString returns the string representation
  16106. func (s PutBucketEncryptionInput) GoString() string {
  16107. return s.String()
  16108. }
  16109. // Validate inspects the fields of the type to determine if they are valid.
  16110. func (s *PutBucketEncryptionInput) Validate() error {
  16111. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  16112. if s.Bucket == nil {
  16113. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16114. }
  16115. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16116. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16117. }
  16118. if s.ServerSideEncryptionConfiguration == nil {
  16119. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  16120. }
  16121. if s.ServerSideEncryptionConfiguration != nil {
  16122. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  16123. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  16124. }
  16125. }
  16126. if invalidParams.Len() > 0 {
  16127. return invalidParams
  16128. }
  16129. return nil
  16130. }
  16131. // SetBucket sets the Bucket field's value.
  16132. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  16133. s.Bucket = &v
  16134. return s
  16135. }
  16136. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  16137. if s.Bucket == nil {
  16138. return v
  16139. }
  16140. return *s.Bucket
  16141. }
  16142. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  16143. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  16144. s.ServerSideEncryptionConfiguration = v
  16145. return s
  16146. }
  16147. type PutBucketEncryptionOutput struct {
  16148. _ struct{} `type:"structure"`
  16149. }
  16150. // String returns the string representation
  16151. func (s PutBucketEncryptionOutput) String() string {
  16152. return awsutil.Prettify(s)
  16153. }
  16154. // GoString returns the string representation
  16155. func (s PutBucketEncryptionOutput) GoString() string {
  16156. return s.String()
  16157. }
  16158. type PutBucketInventoryConfigurationInput struct {
  16159. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  16160. // The name of the bucket where the inventory configuration will be stored.
  16161. //
  16162. // Bucket is a required field
  16163. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16164. // The ID used to identify the inventory configuration.
  16165. //
  16166. // Id is a required field
  16167. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  16168. // Specifies the inventory configuration.
  16169. //
  16170. // InventoryConfiguration is a required field
  16171. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16172. }
  16173. // String returns the string representation
  16174. func (s PutBucketInventoryConfigurationInput) String() string {
  16175. return awsutil.Prettify(s)
  16176. }
  16177. // GoString returns the string representation
  16178. func (s PutBucketInventoryConfigurationInput) GoString() string {
  16179. return s.String()
  16180. }
  16181. // Validate inspects the fields of the type to determine if they are valid.
  16182. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  16183. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  16184. if s.Bucket == nil {
  16185. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16186. }
  16187. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16188. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16189. }
  16190. if s.Id == nil {
  16191. invalidParams.Add(request.NewErrParamRequired("Id"))
  16192. }
  16193. if s.InventoryConfiguration == nil {
  16194. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  16195. }
  16196. if s.InventoryConfiguration != nil {
  16197. if err := s.InventoryConfiguration.Validate(); err != nil {
  16198. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  16199. }
  16200. }
  16201. if invalidParams.Len() > 0 {
  16202. return invalidParams
  16203. }
  16204. return nil
  16205. }
  16206. // SetBucket sets the Bucket field's value.
  16207. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  16208. s.Bucket = &v
  16209. return s
  16210. }
  16211. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  16212. if s.Bucket == nil {
  16213. return v
  16214. }
  16215. return *s.Bucket
  16216. }
  16217. // SetId sets the Id field's value.
  16218. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  16219. s.Id = &v
  16220. return s
  16221. }
  16222. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  16223. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  16224. s.InventoryConfiguration = v
  16225. return s
  16226. }
  16227. type PutBucketInventoryConfigurationOutput struct {
  16228. _ struct{} `type:"structure"`
  16229. }
  16230. // String returns the string representation
  16231. func (s PutBucketInventoryConfigurationOutput) String() string {
  16232. return awsutil.Prettify(s)
  16233. }
  16234. // GoString returns the string representation
  16235. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  16236. return s.String()
  16237. }
  16238. type PutBucketLifecycleConfigurationInput struct {
  16239. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  16240. // Bucket is a required field
  16241. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16242. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16243. }
  16244. // String returns the string representation
  16245. func (s PutBucketLifecycleConfigurationInput) String() string {
  16246. return awsutil.Prettify(s)
  16247. }
  16248. // GoString returns the string representation
  16249. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  16250. return s.String()
  16251. }
  16252. // Validate inspects the fields of the type to determine if they are valid.
  16253. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  16254. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  16255. if s.Bucket == nil {
  16256. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16257. }
  16258. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16259. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16260. }
  16261. if s.LifecycleConfiguration != nil {
  16262. if err := s.LifecycleConfiguration.Validate(); err != nil {
  16263. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  16264. }
  16265. }
  16266. if invalidParams.Len() > 0 {
  16267. return invalidParams
  16268. }
  16269. return nil
  16270. }
  16271. // SetBucket sets the Bucket field's value.
  16272. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  16273. s.Bucket = &v
  16274. return s
  16275. }
  16276. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  16277. if s.Bucket == nil {
  16278. return v
  16279. }
  16280. return *s.Bucket
  16281. }
  16282. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  16283. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  16284. s.LifecycleConfiguration = v
  16285. return s
  16286. }
  16287. type PutBucketLifecycleConfigurationOutput struct {
  16288. _ struct{} `type:"structure"`
  16289. }
  16290. // String returns the string representation
  16291. func (s PutBucketLifecycleConfigurationOutput) String() string {
  16292. return awsutil.Prettify(s)
  16293. }
  16294. // GoString returns the string representation
  16295. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  16296. return s.String()
  16297. }
  16298. type PutBucketLifecycleInput struct {
  16299. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  16300. // Bucket is a required field
  16301. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16302. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16303. }
  16304. // String returns the string representation
  16305. func (s PutBucketLifecycleInput) String() string {
  16306. return awsutil.Prettify(s)
  16307. }
  16308. // GoString returns the string representation
  16309. func (s PutBucketLifecycleInput) GoString() string {
  16310. return s.String()
  16311. }
  16312. // Validate inspects the fields of the type to determine if they are valid.
  16313. func (s *PutBucketLifecycleInput) Validate() error {
  16314. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  16315. if s.Bucket == nil {
  16316. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16317. }
  16318. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16319. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16320. }
  16321. if s.LifecycleConfiguration != nil {
  16322. if err := s.LifecycleConfiguration.Validate(); err != nil {
  16323. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  16324. }
  16325. }
  16326. if invalidParams.Len() > 0 {
  16327. return invalidParams
  16328. }
  16329. return nil
  16330. }
  16331. // SetBucket sets the Bucket field's value.
  16332. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  16333. s.Bucket = &v
  16334. return s
  16335. }
  16336. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  16337. if s.Bucket == nil {
  16338. return v
  16339. }
  16340. return *s.Bucket
  16341. }
  16342. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  16343. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  16344. s.LifecycleConfiguration = v
  16345. return s
  16346. }
  16347. type PutBucketLifecycleOutput struct {
  16348. _ struct{} `type:"structure"`
  16349. }
  16350. // String returns the string representation
  16351. func (s PutBucketLifecycleOutput) String() string {
  16352. return awsutil.Prettify(s)
  16353. }
  16354. // GoString returns the string representation
  16355. func (s PutBucketLifecycleOutput) GoString() string {
  16356. return s.String()
  16357. }
  16358. type PutBucketLoggingInput struct {
  16359. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  16360. // Bucket is a required field
  16361. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16362. // BucketLoggingStatus is a required field
  16363. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16364. }
  16365. // String returns the string representation
  16366. func (s PutBucketLoggingInput) String() string {
  16367. return awsutil.Prettify(s)
  16368. }
  16369. // GoString returns the string representation
  16370. func (s PutBucketLoggingInput) GoString() string {
  16371. return s.String()
  16372. }
  16373. // Validate inspects the fields of the type to determine if they are valid.
  16374. func (s *PutBucketLoggingInput) Validate() error {
  16375. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  16376. if s.Bucket == nil {
  16377. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16378. }
  16379. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16380. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16381. }
  16382. if s.BucketLoggingStatus == nil {
  16383. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  16384. }
  16385. if s.BucketLoggingStatus != nil {
  16386. if err := s.BucketLoggingStatus.Validate(); err != nil {
  16387. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  16388. }
  16389. }
  16390. if invalidParams.Len() > 0 {
  16391. return invalidParams
  16392. }
  16393. return nil
  16394. }
  16395. // SetBucket sets the Bucket field's value.
  16396. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  16397. s.Bucket = &v
  16398. return s
  16399. }
  16400. func (s *PutBucketLoggingInput) getBucket() (v string) {
  16401. if s.Bucket == nil {
  16402. return v
  16403. }
  16404. return *s.Bucket
  16405. }
  16406. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  16407. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  16408. s.BucketLoggingStatus = v
  16409. return s
  16410. }
  16411. type PutBucketLoggingOutput struct {
  16412. _ struct{} `type:"structure"`
  16413. }
  16414. // String returns the string representation
  16415. func (s PutBucketLoggingOutput) String() string {
  16416. return awsutil.Prettify(s)
  16417. }
  16418. // GoString returns the string representation
  16419. func (s PutBucketLoggingOutput) GoString() string {
  16420. return s.String()
  16421. }
  16422. type PutBucketMetricsConfigurationInput struct {
  16423. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  16424. // The name of the bucket for which the metrics configuration is set.
  16425. //
  16426. // Bucket is a required field
  16427. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16428. // The ID used to identify the metrics configuration.
  16429. //
  16430. // Id is a required field
  16431. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  16432. // Specifies the metrics configuration.
  16433. //
  16434. // MetricsConfiguration is a required field
  16435. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16436. }
  16437. // String returns the string representation
  16438. func (s PutBucketMetricsConfigurationInput) String() string {
  16439. return awsutil.Prettify(s)
  16440. }
  16441. // GoString returns the string representation
  16442. func (s PutBucketMetricsConfigurationInput) GoString() string {
  16443. return s.String()
  16444. }
  16445. // Validate inspects the fields of the type to determine if they are valid.
  16446. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  16447. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  16448. if s.Bucket == nil {
  16449. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16450. }
  16451. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16452. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16453. }
  16454. if s.Id == nil {
  16455. invalidParams.Add(request.NewErrParamRequired("Id"))
  16456. }
  16457. if s.MetricsConfiguration == nil {
  16458. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  16459. }
  16460. if s.MetricsConfiguration != nil {
  16461. if err := s.MetricsConfiguration.Validate(); err != nil {
  16462. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  16463. }
  16464. }
  16465. if invalidParams.Len() > 0 {
  16466. return invalidParams
  16467. }
  16468. return nil
  16469. }
  16470. // SetBucket sets the Bucket field's value.
  16471. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  16472. s.Bucket = &v
  16473. return s
  16474. }
  16475. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  16476. if s.Bucket == nil {
  16477. return v
  16478. }
  16479. return *s.Bucket
  16480. }
  16481. // SetId sets the Id field's value.
  16482. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  16483. s.Id = &v
  16484. return s
  16485. }
  16486. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  16487. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  16488. s.MetricsConfiguration = v
  16489. return s
  16490. }
  16491. type PutBucketMetricsConfigurationOutput struct {
  16492. _ struct{} `type:"structure"`
  16493. }
  16494. // String returns the string representation
  16495. func (s PutBucketMetricsConfigurationOutput) String() string {
  16496. return awsutil.Prettify(s)
  16497. }
  16498. // GoString returns the string representation
  16499. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  16500. return s.String()
  16501. }
  16502. type PutBucketNotificationConfigurationInput struct {
  16503. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  16504. // Bucket is a required field
  16505. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16506. // A container for specifying the notification configuration of the bucket.
  16507. // If this element is empty, notifications are turned off for the bucket.
  16508. //
  16509. // NotificationConfiguration is a required field
  16510. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16511. }
  16512. // String returns the string representation
  16513. func (s PutBucketNotificationConfigurationInput) String() string {
  16514. return awsutil.Prettify(s)
  16515. }
  16516. // GoString returns the string representation
  16517. func (s PutBucketNotificationConfigurationInput) GoString() string {
  16518. return s.String()
  16519. }
  16520. // Validate inspects the fields of the type to determine if they are valid.
  16521. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  16522. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  16523. if s.Bucket == nil {
  16524. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16525. }
  16526. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16527. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16528. }
  16529. if s.NotificationConfiguration == nil {
  16530. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  16531. }
  16532. if s.NotificationConfiguration != nil {
  16533. if err := s.NotificationConfiguration.Validate(); err != nil {
  16534. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  16535. }
  16536. }
  16537. if invalidParams.Len() > 0 {
  16538. return invalidParams
  16539. }
  16540. return nil
  16541. }
  16542. // SetBucket sets the Bucket field's value.
  16543. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  16544. s.Bucket = &v
  16545. return s
  16546. }
  16547. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  16548. if s.Bucket == nil {
  16549. return v
  16550. }
  16551. return *s.Bucket
  16552. }
  16553. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  16554. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  16555. s.NotificationConfiguration = v
  16556. return s
  16557. }
  16558. type PutBucketNotificationConfigurationOutput struct {
  16559. _ struct{} `type:"structure"`
  16560. }
  16561. // String returns the string representation
  16562. func (s PutBucketNotificationConfigurationOutput) String() string {
  16563. return awsutil.Prettify(s)
  16564. }
  16565. // GoString returns the string representation
  16566. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  16567. return s.String()
  16568. }
  16569. type PutBucketNotificationInput struct {
  16570. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  16571. // Bucket is a required field
  16572. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16573. // NotificationConfiguration is a required field
  16574. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16575. }
  16576. // String returns the string representation
  16577. func (s PutBucketNotificationInput) String() string {
  16578. return awsutil.Prettify(s)
  16579. }
  16580. // GoString returns the string representation
  16581. func (s PutBucketNotificationInput) GoString() string {
  16582. return s.String()
  16583. }
  16584. // Validate inspects the fields of the type to determine if they are valid.
  16585. func (s *PutBucketNotificationInput) Validate() error {
  16586. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  16587. if s.Bucket == nil {
  16588. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16589. }
  16590. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16591. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16592. }
  16593. if s.NotificationConfiguration == nil {
  16594. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  16595. }
  16596. if invalidParams.Len() > 0 {
  16597. return invalidParams
  16598. }
  16599. return nil
  16600. }
  16601. // SetBucket sets the Bucket field's value.
  16602. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  16603. s.Bucket = &v
  16604. return s
  16605. }
  16606. func (s *PutBucketNotificationInput) getBucket() (v string) {
  16607. if s.Bucket == nil {
  16608. return v
  16609. }
  16610. return *s.Bucket
  16611. }
  16612. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  16613. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  16614. s.NotificationConfiguration = v
  16615. return s
  16616. }
  16617. type PutBucketNotificationOutput struct {
  16618. _ struct{} `type:"structure"`
  16619. }
  16620. // String returns the string representation
  16621. func (s PutBucketNotificationOutput) String() string {
  16622. return awsutil.Prettify(s)
  16623. }
  16624. // GoString returns the string representation
  16625. func (s PutBucketNotificationOutput) GoString() string {
  16626. return s.String()
  16627. }
  16628. type PutBucketPolicyInput struct {
  16629. _ struct{} `type:"structure" payload:"Policy"`
  16630. // Bucket is a required field
  16631. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16632. // Set this parameter to true to confirm that you want to remove your permissions
  16633. // to change this bucket policy in the future.
  16634. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  16635. // The bucket policy as a JSON document.
  16636. //
  16637. // Policy is a required field
  16638. Policy *string `type:"string" required:"true"`
  16639. }
  16640. // String returns the string representation
  16641. func (s PutBucketPolicyInput) String() string {
  16642. return awsutil.Prettify(s)
  16643. }
  16644. // GoString returns the string representation
  16645. func (s PutBucketPolicyInput) GoString() string {
  16646. return s.String()
  16647. }
  16648. // Validate inspects the fields of the type to determine if they are valid.
  16649. func (s *PutBucketPolicyInput) Validate() error {
  16650. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  16651. if s.Bucket == nil {
  16652. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16653. }
  16654. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16655. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16656. }
  16657. if s.Policy == nil {
  16658. invalidParams.Add(request.NewErrParamRequired("Policy"))
  16659. }
  16660. if invalidParams.Len() > 0 {
  16661. return invalidParams
  16662. }
  16663. return nil
  16664. }
  16665. // SetBucket sets the Bucket field's value.
  16666. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  16667. s.Bucket = &v
  16668. return s
  16669. }
  16670. func (s *PutBucketPolicyInput) getBucket() (v string) {
  16671. if s.Bucket == nil {
  16672. return v
  16673. }
  16674. return *s.Bucket
  16675. }
  16676. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  16677. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  16678. s.ConfirmRemoveSelfBucketAccess = &v
  16679. return s
  16680. }
  16681. // SetPolicy sets the Policy field's value.
  16682. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  16683. s.Policy = &v
  16684. return s
  16685. }
  16686. type PutBucketPolicyOutput struct {
  16687. _ struct{} `type:"structure"`
  16688. }
  16689. // String returns the string representation
  16690. func (s PutBucketPolicyOutput) String() string {
  16691. return awsutil.Prettify(s)
  16692. }
  16693. // GoString returns the string representation
  16694. func (s PutBucketPolicyOutput) GoString() string {
  16695. return s.String()
  16696. }
  16697. type PutBucketReplicationInput struct {
  16698. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  16699. // Bucket is a required field
  16700. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16701. // A container for replication rules. You can add up to 1,000 rules. The maximum
  16702. // size of a replication configuration is 2 MB.
  16703. //
  16704. // ReplicationConfiguration is a required field
  16705. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16706. }
  16707. // String returns the string representation
  16708. func (s PutBucketReplicationInput) String() string {
  16709. return awsutil.Prettify(s)
  16710. }
  16711. // GoString returns the string representation
  16712. func (s PutBucketReplicationInput) GoString() string {
  16713. return s.String()
  16714. }
  16715. // Validate inspects the fields of the type to determine if they are valid.
  16716. func (s *PutBucketReplicationInput) Validate() error {
  16717. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  16718. if s.Bucket == nil {
  16719. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16720. }
  16721. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16722. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16723. }
  16724. if s.ReplicationConfiguration == nil {
  16725. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  16726. }
  16727. if s.ReplicationConfiguration != nil {
  16728. if err := s.ReplicationConfiguration.Validate(); err != nil {
  16729. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  16730. }
  16731. }
  16732. if invalidParams.Len() > 0 {
  16733. return invalidParams
  16734. }
  16735. return nil
  16736. }
  16737. // SetBucket sets the Bucket field's value.
  16738. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  16739. s.Bucket = &v
  16740. return s
  16741. }
  16742. func (s *PutBucketReplicationInput) getBucket() (v string) {
  16743. if s.Bucket == nil {
  16744. return v
  16745. }
  16746. return *s.Bucket
  16747. }
  16748. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  16749. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  16750. s.ReplicationConfiguration = v
  16751. return s
  16752. }
  16753. type PutBucketReplicationOutput struct {
  16754. _ struct{} `type:"structure"`
  16755. }
  16756. // String returns the string representation
  16757. func (s PutBucketReplicationOutput) String() string {
  16758. return awsutil.Prettify(s)
  16759. }
  16760. // GoString returns the string representation
  16761. func (s PutBucketReplicationOutput) GoString() string {
  16762. return s.String()
  16763. }
  16764. type PutBucketRequestPaymentInput struct {
  16765. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  16766. // Bucket is a required field
  16767. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16768. // RequestPaymentConfiguration is a required field
  16769. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16770. }
  16771. // String returns the string representation
  16772. func (s PutBucketRequestPaymentInput) String() string {
  16773. return awsutil.Prettify(s)
  16774. }
  16775. // GoString returns the string representation
  16776. func (s PutBucketRequestPaymentInput) GoString() string {
  16777. return s.String()
  16778. }
  16779. // Validate inspects the fields of the type to determine if they are valid.
  16780. func (s *PutBucketRequestPaymentInput) Validate() error {
  16781. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  16782. if s.Bucket == nil {
  16783. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16784. }
  16785. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16786. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16787. }
  16788. if s.RequestPaymentConfiguration == nil {
  16789. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  16790. }
  16791. if s.RequestPaymentConfiguration != nil {
  16792. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  16793. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  16794. }
  16795. }
  16796. if invalidParams.Len() > 0 {
  16797. return invalidParams
  16798. }
  16799. return nil
  16800. }
  16801. // SetBucket sets the Bucket field's value.
  16802. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  16803. s.Bucket = &v
  16804. return s
  16805. }
  16806. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  16807. if s.Bucket == nil {
  16808. return v
  16809. }
  16810. return *s.Bucket
  16811. }
  16812. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  16813. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  16814. s.RequestPaymentConfiguration = v
  16815. return s
  16816. }
  16817. type PutBucketRequestPaymentOutput struct {
  16818. _ struct{} `type:"structure"`
  16819. }
  16820. // String returns the string representation
  16821. func (s PutBucketRequestPaymentOutput) String() string {
  16822. return awsutil.Prettify(s)
  16823. }
  16824. // GoString returns the string representation
  16825. func (s PutBucketRequestPaymentOutput) GoString() string {
  16826. return s.String()
  16827. }
  16828. type PutBucketTaggingInput struct {
  16829. _ struct{} `type:"structure" payload:"Tagging"`
  16830. // Bucket is a required field
  16831. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16832. // Tagging is a required field
  16833. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16834. }
  16835. // String returns the string representation
  16836. func (s PutBucketTaggingInput) String() string {
  16837. return awsutil.Prettify(s)
  16838. }
  16839. // GoString returns the string representation
  16840. func (s PutBucketTaggingInput) GoString() string {
  16841. return s.String()
  16842. }
  16843. // Validate inspects the fields of the type to determine if they are valid.
  16844. func (s *PutBucketTaggingInput) Validate() error {
  16845. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  16846. if s.Bucket == nil {
  16847. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16848. }
  16849. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16850. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16851. }
  16852. if s.Tagging == nil {
  16853. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  16854. }
  16855. if s.Tagging != nil {
  16856. if err := s.Tagging.Validate(); err != nil {
  16857. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  16858. }
  16859. }
  16860. if invalidParams.Len() > 0 {
  16861. return invalidParams
  16862. }
  16863. return nil
  16864. }
  16865. // SetBucket sets the Bucket field's value.
  16866. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  16867. s.Bucket = &v
  16868. return s
  16869. }
  16870. func (s *PutBucketTaggingInput) getBucket() (v string) {
  16871. if s.Bucket == nil {
  16872. return v
  16873. }
  16874. return *s.Bucket
  16875. }
  16876. // SetTagging sets the Tagging field's value.
  16877. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  16878. s.Tagging = v
  16879. return s
  16880. }
  16881. type PutBucketTaggingOutput struct {
  16882. _ struct{} `type:"structure"`
  16883. }
  16884. // String returns the string representation
  16885. func (s PutBucketTaggingOutput) String() string {
  16886. return awsutil.Prettify(s)
  16887. }
  16888. // GoString returns the string representation
  16889. func (s PutBucketTaggingOutput) GoString() string {
  16890. return s.String()
  16891. }
  16892. type PutBucketVersioningInput struct {
  16893. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  16894. // Bucket is a required field
  16895. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16896. // The concatenation of the authentication device's serial number, a space,
  16897. // and the value that is displayed on your authentication device.
  16898. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  16899. // VersioningConfiguration is a required field
  16900. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16901. }
  16902. // String returns the string representation
  16903. func (s PutBucketVersioningInput) String() string {
  16904. return awsutil.Prettify(s)
  16905. }
  16906. // GoString returns the string representation
  16907. func (s PutBucketVersioningInput) GoString() string {
  16908. return s.String()
  16909. }
  16910. // Validate inspects the fields of the type to determine if they are valid.
  16911. func (s *PutBucketVersioningInput) Validate() error {
  16912. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  16913. if s.Bucket == nil {
  16914. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16915. }
  16916. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16917. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16918. }
  16919. if s.VersioningConfiguration == nil {
  16920. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  16921. }
  16922. if invalidParams.Len() > 0 {
  16923. return invalidParams
  16924. }
  16925. return nil
  16926. }
  16927. // SetBucket sets the Bucket field's value.
  16928. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  16929. s.Bucket = &v
  16930. return s
  16931. }
  16932. func (s *PutBucketVersioningInput) getBucket() (v string) {
  16933. if s.Bucket == nil {
  16934. return v
  16935. }
  16936. return *s.Bucket
  16937. }
  16938. // SetMFA sets the MFA field's value.
  16939. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  16940. s.MFA = &v
  16941. return s
  16942. }
  16943. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  16944. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  16945. s.VersioningConfiguration = v
  16946. return s
  16947. }
  16948. type PutBucketVersioningOutput struct {
  16949. _ struct{} `type:"structure"`
  16950. }
  16951. // String returns the string representation
  16952. func (s PutBucketVersioningOutput) String() string {
  16953. return awsutil.Prettify(s)
  16954. }
  16955. // GoString returns the string representation
  16956. func (s PutBucketVersioningOutput) GoString() string {
  16957. return s.String()
  16958. }
  16959. type PutBucketWebsiteInput struct {
  16960. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  16961. // Bucket is a required field
  16962. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16963. // WebsiteConfiguration is a required field
  16964. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16965. }
  16966. // String returns the string representation
  16967. func (s PutBucketWebsiteInput) String() string {
  16968. return awsutil.Prettify(s)
  16969. }
  16970. // GoString returns the string representation
  16971. func (s PutBucketWebsiteInput) GoString() string {
  16972. return s.String()
  16973. }
  16974. // Validate inspects the fields of the type to determine if they are valid.
  16975. func (s *PutBucketWebsiteInput) Validate() error {
  16976. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  16977. if s.Bucket == nil {
  16978. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16979. }
  16980. if s.Bucket != nil && len(*s.Bucket) < 1 {
  16981. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  16982. }
  16983. if s.WebsiteConfiguration == nil {
  16984. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  16985. }
  16986. if s.WebsiteConfiguration != nil {
  16987. if err := s.WebsiteConfiguration.Validate(); err != nil {
  16988. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  16989. }
  16990. }
  16991. if invalidParams.Len() > 0 {
  16992. return invalidParams
  16993. }
  16994. return nil
  16995. }
  16996. // SetBucket sets the Bucket field's value.
  16997. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  16998. s.Bucket = &v
  16999. return s
  17000. }
  17001. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  17002. if s.Bucket == nil {
  17003. return v
  17004. }
  17005. return *s.Bucket
  17006. }
  17007. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  17008. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  17009. s.WebsiteConfiguration = v
  17010. return s
  17011. }
  17012. type PutBucketWebsiteOutput struct {
  17013. _ struct{} `type:"structure"`
  17014. }
  17015. // String returns the string representation
  17016. func (s PutBucketWebsiteOutput) String() string {
  17017. return awsutil.Prettify(s)
  17018. }
  17019. // GoString returns the string representation
  17020. func (s PutBucketWebsiteOutput) GoString() string {
  17021. return s.String()
  17022. }
  17023. type PutObjectAclInput struct {
  17024. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  17025. // The canned ACL to apply to the object.
  17026. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  17027. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17028. // Bucket is a required field
  17029. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17030. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  17031. // bucket.
  17032. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  17033. // Allows grantee to list the objects in the bucket.
  17034. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  17035. // Allows grantee to read the bucket ACL.
  17036. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  17037. // Allows grantee to create, overwrite, and delete any object in the bucket.
  17038. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  17039. // Allows grantee to write the ACL for the applicable bucket.
  17040. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  17041. // Key is a required field
  17042. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17043. // Confirms that the requester knows that she or he will be charged for the
  17044. // request. Bucket owners need not specify this parameter in their requests.
  17045. // Documentation on downloading objects from requester pays buckets can be found
  17046. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17047. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17048. // VersionId used to reference a specific version of the object.
  17049. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17050. }
  17051. // String returns the string representation
  17052. func (s PutObjectAclInput) String() string {
  17053. return awsutil.Prettify(s)
  17054. }
  17055. // GoString returns the string representation
  17056. func (s PutObjectAclInput) GoString() string {
  17057. return s.String()
  17058. }
  17059. // Validate inspects the fields of the type to determine if they are valid.
  17060. func (s *PutObjectAclInput) Validate() error {
  17061. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  17062. if s.Bucket == nil {
  17063. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17064. }
  17065. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17066. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17067. }
  17068. if s.Key == nil {
  17069. invalidParams.Add(request.NewErrParamRequired("Key"))
  17070. }
  17071. if s.Key != nil && len(*s.Key) < 1 {
  17072. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17073. }
  17074. if s.AccessControlPolicy != nil {
  17075. if err := s.AccessControlPolicy.Validate(); err != nil {
  17076. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  17077. }
  17078. }
  17079. if invalidParams.Len() > 0 {
  17080. return invalidParams
  17081. }
  17082. return nil
  17083. }
  17084. // SetACL sets the ACL field's value.
  17085. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  17086. s.ACL = &v
  17087. return s
  17088. }
  17089. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  17090. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  17091. s.AccessControlPolicy = v
  17092. return s
  17093. }
  17094. // SetBucket sets the Bucket field's value.
  17095. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  17096. s.Bucket = &v
  17097. return s
  17098. }
  17099. func (s *PutObjectAclInput) getBucket() (v string) {
  17100. if s.Bucket == nil {
  17101. return v
  17102. }
  17103. return *s.Bucket
  17104. }
  17105. // SetGrantFullControl sets the GrantFullControl field's value.
  17106. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  17107. s.GrantFullControl = &v
  17108. return s
  17109. }
  17110. // SetGrantRead sets the GrantRead field's value.
  17111. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  17112. s.GrantRead = &v
  17113. return s
  17114. }
  17115. // SetGrantReadACP sets the GrantReadACP field's value.
  17116. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  17117. s.GrantReadACP = &v
  17118. return s
  17119. }
  17120. // SetGrantWrite sets the GrantWrite field's value.
  17121. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  17122. s.GrantWrite = &v
  17123. return s
  17124. }
  17125. // SetGrantWriteACP sets the GrantWriteACP field's value.
  17126. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  17127. s.GrantWriteACP = &v
  17128. return s
  17129. }
  17130. // SetKey sets the Key field's value.
  17131. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  17132. s.Key = &v
  17133. return s
  17134. }
  17135. // SetRequestPayer sets the RequestPayer field's value.
  17136. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  17137. s.RequestPayer = &v
  17138. return s
  17139. }
  17140. // SetVersionId sets the VersionId field's value.
  17141. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  17142. s.VersionId = &v
  17143. return s
  17144. }
  17145. type PutObjectAclOutput struct {
  17146. _ struct{} `type:"structure"`
  17147. // If present, indicates that the requester was successfully charged for the
  17148. // request.
  17149. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17150. }
  17151. // String returns the string representation
  17152. func (s PutObjectAclOutput) String() string {
  17153. return awsutil.Prettify(s)
  17154. }
  17155. // GoString returns the string representation
  17156. func (s PutObjectAclOutput) GoString() string {
  17157. return s.String()
  17158. }
  17159. // SetRequestCharged sets the RequestCharged field's value.
  17160. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  17161. s.RequestCharged = &v
  17162. return s
  17163. }
  17164. type PutObjectInput struct {
  17165. _ struct{} `type:"structure" payload:"Body"`
  17166. // The canned ACL to apply to the object.
  17167. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  17168. // Object data.
  17169. Body io.ReadSeeker `type:"blob"`
  17170. // Name of the bucket to which the PUT operation was initiated.
  17171. //
  17172. // Bucket is a required field
  17173. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17174. // Specifies caching behavior along the request/reply chain.
  17175. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  17176. // Specifies presentational information for the object.
  17177. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  17178. // Specifies what content encodings have been applied to the object and thus
  17179. // what decoding mechanisms must be applied to obtain the media-type referenced
  17180. // by the Content-Type header field.
  17181. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  17182. // The language the content is in.
  17183. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  17184. // Size of the body in bytes. This parameter is useful when the size of the
  17185. // body cannot be determined automatically.
  17186. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  17187. // The base64-encoded 128-bit MD5 digest of the part data.
  17188. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  17189. // A standard MIME type describing the format of the object data.
  17190. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  17191. // The date and time at which the object is no longer cacheable.
  17192. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
  17193. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  17194. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  17195. // Allows grantee to read the object data and its metadata.
  17196. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  17197. // Allows grantee to read the object ACL.
  17198. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  17199. // Allows grantee to write the ACL for the applicable object.
  17200. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  17201. // Object key for which the PUT operation was initiated.
  17202. //
  17203. // Key is a required field
  17204. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17205. // A map of metadata to store with the object in S3.
  17206. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  17207. // The Legal Hold status that you want to apply to the specified object.
  17208. ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
  17209. // The Object Lock mode that you want to apply to this object.
  17210. ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
  17211. // The date and time when you want this object's Object Lock to expire.
  17212. ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
  17213. // Confirms that the requester knows that she or he will be charged for the
  17214. // request. Bucket owners need not specify this parameter in their requests.
  17215. // Documentation on downloading objects from requester pays buckets can be found
  17216. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17217. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17218. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17219. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17220. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17221. // data. This value is used to store the object and then it is discarded; Amazon
  17222. // does not store the encryption key. The key must be appropriate for use with
  17223. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17224. // header.
  17225. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  17226. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17227. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17228. // key was transmitted without error.
  17229. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17230. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  17231. // requests for an object protected by AWS KMS will fail if not made via SSL
  17232. // or using SigV4. Documentation on configuring any of the officially supported
  17233. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  17234. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  17235. // The Server-side encryption algorithm used when storing this object in S3
  17236. // (e.g., AES256, aws:kms).
  17237. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17238. // The type of storage to use for the object. Defaults to 'STANDARD'.
  17239. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  17240. // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
  17241. // (For example, "Key1=Value1")
  17242. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  17243. // If the bucket is configured as a website, redirects requests for this object
  17244. // to another object in the same bucket or to an external URL. Amazon S3 stores
  17245. // the value of this header in the object metadata.
  17246. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  17247. }
  17248. // String returns the string representation
  17249. func (s PutObjectInput) String() string {
  17250. return awsutil.Prettify(s)
  17251. }
  17252. // GoString returns the string representation
  17253. func (s PutObjectInput) GoString() string {
  17254. return s.String()
  17255. }
  17256. // Validate inspects the fields of the type to determine if they are valid.
  17257. func (s *PutObjectInput) Validate() error {
  17258. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  17259. if s.Bucket == nil {
  17260. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17261. }
  17262. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17263. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17264. }
  17265. if s.Key == nil {
  17266. invalidParams.Add(request.NewErrParamRequired("Key"))
  17267. }
  17268. if s.Key != nil && len(*s.Key) < 1 {
  17269. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17270. }
  17271. if invalidParams.Len() > 0 {
  17272. return invalidParams
  17273. }
  17274. return nil
  17275. }
  17276. // SetACL sets the ACL field's value.
  17277. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  17278. s.ACL = &v
  17279. return s
  17280. }
  17281. // SetBody sets the Body field's value.
  17282. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  17283. s.Body = v
  17284. return s
  17285. }
  17286. // SetBucket sets the Bucket field's value.
  17287. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  17288. s.Bucket = &v
  17289. return s
  17290. }
  17291. func (s *PutObjectInput) getBucket() (v string) {
  17292. if s.Bucket == nil {
  17293. return v
  17294. }
  17295. return *s.Bucket
  17296. }
  17297. // SetCacheControl sets the CacheControl field's value.
  17298. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  17299. s.CacheControl = &v
  17300. return s
  17301. }
  17302. // SetContentDisposition sets the ContentDisposition field's value.
  17303. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  17304. s.ContentDisposition = &v
  17305. return s
  17306. }
  17307. // SetContentEncoding sets the ContentEncoding field's value.
  17308. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  17309. s.ContentEncoding = &v
  17310. return s
  17311. }
  17312. // SetContentLanguage sets the ContentLanguage field's value.
  17313. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  17314. s.ContentLanguage = &v
  17315. return s
  17316. }
  17317. // SetContentLength sets the ContentLength field's value.
  17318. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  17319. s.ContentLength = &v
  17320. return s
  17321. }
  17322. // SetContentMD5 sets the ContentMD5 field's value.
  17323. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  17324. s.ContentMD5 = &v
  17325. return s
  17326. }
  17327. // SetContentType sets the ContentType field's value.
  17328. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  17329. s.ContentType = &v
  17330. return s
  17331. }
  17332. // SetExpires sets the Expires field's value.
  17333. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  17334. s.Expires = &v
  17335. return s
  17336. }
  17337. // SetGrantFullControl sets the GrantFullControl field's value.
  17338. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  17339. s.GrantFullControl = &v
  17340. return s
  17341. }
  17342. // SetGrantRead sets the GrantRead field's value.
  17343. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  17344. s.GrantRead = &v
  17345. return s
  17346. }
  17347. // SetGrantReadACP sets the GrantReadACP field's value.
  17348. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  17349. s.GrantReadACP = &v
  17350. return s
  17351. }
  17352. // SetGrantWriteACP sets the GrantWriteACP field's value.
  17353. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  17354. s.GrantWriteACP = &v
  17355. return s
  17356. }
  17357. // SetKey sets the Key field's value.
  17358. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  17359. s.Key = &v
  17360. return s
  17361. }
  17362. // SetMetadata sets the Metadata field's value.
  17363. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  17364. s.Metadata = v
  17365. return s
  17366. }
  17367. // SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
  17368. func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput {
  17369. s.ObjectLockLegalHoldStatus = &v
  17370. return s
  17371. }
  17372. // SetObjectLockMode sets the ObjectLockMode field's value.
  17373. func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput {
  17374. s.ObjectLockMode = &v
  17375. return s
  17376. }
  17377. // SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
  17378. func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput {
  17379. s.ObjectLockRetainUntilDate = &v
  17380. return s
  17381. }
  17382. // SetRequestPayer sets the RequestPayer field's value.
  17383. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  17384. s.RequestPayer = &v
  17385. return s
  17386. }
  17387. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17388. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  17389. s.SSECustomerAlgorithm = &v
  17390. return s
  17391. }
  17392. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17393. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  17394. s.SSECustomerKey = &v
  17395. return s
  17396. }
  17397. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  17398. if s.SSECustomerKey == nil {
  17399. return v
  17400. }
  17401. return *s.SSECustomerKey
  17402. }
  17403. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17404. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  17405. s.SSECustomerKeyMD5 = &v
  17406. return s
  17407. }
  17408. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17409. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  17410. s.SSEKMSKeyId = &v
  17411. return s
  17412. }
  17413. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17414. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  17415. s.ServerSideEncryption = &v
  17416. return s
  17417. }
  17418. // SetStorageClass sets the StorageClass field's value.
  17419. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  17420. s.StorageClass = &v
  17421. return s
  17422. }
  17423. // SetTagging sets the Tagging field's value.
  17424. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  17425. s.Tagging = &v
  17426. return s
  17427. }
  17428. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  17429. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  17430. s.WebsiteRedirectLocation = &v
  17431. return s
  17432. }
  17433. type PutObjectLegalHoldInput struct {
  17434. _ struct{} `type:"structure" payload:"LegalHold"`
  17435. // The bucket containing the object that you want to place a Legal Hold on.
  17436. //
  17437. // Bucket is a required field
  17438. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17439. // The key name for the object that you want to place a Legal Hold on.
  17440. //
  17441. // Key is a required field
  17442. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17443. // Container element for the Legal Hold configuration you want to apply to the
  17444. // specified object.
  17445. LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17446. // Confirms that the requester knows that she or he will be charged for the
  17447. // request. Bucket owners need not specify this parameter in their requests.
  17448. // Documentation on downloading objects from requester pays buckets can be found
  17449. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17450. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17451. // The version ID of the object that you want to place a Legal Hold on.
  17452. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17453. }
  17454. // String returns the string representation
  17455. func (s PutObjectLegalHoldInput) String() string {
  17456. return awsutil.Prettify(s)
  17457. }
  17458. // GoString returns the string representation
  17459. func (s PutObjectLegalHoldInput) GoString() string {
  17460. return s.String()
  17461. }
  17462. // Validate inspects the fields of the type to determine if they are valid.
  17463. func (s *PutObjectLegalHoldInput) Validate() error {
  17464. invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"}
  17465. if s.Bucket == nil {
  17466. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17467. }
  17468. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17469. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17470. }
  17471. if s.Key == nil {
  17472. invalidParams.Add(request.NewErrParamRequired("Key"))
  17473. }
  17474. if s.Key != nil && len(*s.Key) < 1 {
  17475. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17476. }
  17477. if invalidParams.Len() > 0 {
  17478. return invalidParams
  17479. }
  17480. return nil
  17481. }
  17482. // SetBucket sets the Bucket field's value.
  17483. func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput {
  17484. s.Bucket = &v
  17485. return s
  17486. }
  17487. func (s *PutObjectLegalHoldInput) getBucket() (v string) {
  17488. if s.Bucket == nil {
  17489. return v
  17490. }
  17491. return *s.Bucket
  17492. }
  17493. // SetKey sets the Key field's value.
  17494. func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput {
  17495. s.Key = &v
  17496. return s
  17497. }
  17498. // SetLegalHold sets the LegalHold field's value.
  17499. func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput {
  17500. s.LegalHold = v
  17501. return s
  17502. }
  17503. // SetRequestPayer sets the RequestPayer field's value.
  17504. func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput {
  17505. s.RequestPayer = &v
  17506. return s
  17507. }
  17508. // SetVersionId sets the VersionId field's value.
  17509. func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput {
  17510. s.VersionId = &v
  17511. return s
  17512. }
  17513. type PutObjectLegalHoldOutput struct {
  17514. _ struct{} `type:"structure"`
  17515. // If present, indicates that the requester was successfully charged for the
  17516. // request.
  17517. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17518. }
  17519. // String returns the string representation
  17520. func (s PutObjectLegalHoldOutput) String() string {
  17521. return awsutil.Prettify(s)
  17522. }
  17523. // GoString returns the string representation
  17524. func (s PutObjectLegalHoldOutput) GoString() string {
  17525. return s.String()
  17526. }
  17527. // SetRequestCharged sets the RequestCharged field's value.
  17528. func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput {
  17529. s.RequestCharged = &v
  17530. return s
  17531. }
  17532. type PutObjectLockConfigurationInput struct {
  17533. _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
  17534. // The bucket whose Object Lock configuration you want to create or replace.
  17535. //
  17536. // Bucket is a required field
  17537. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17538. // The Object Lock configuration that you want to apply to the specified bucket.
  17539. ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17540. // Confirms that the requester knows that she or he will be charged for the
  17541. // request. Bucket owners need not specify this parameter in their requests.
  17542. // Documentation on downloading objects from requester pays buckets can be found
  17543. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17544. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17545. Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
  17546. }
  17547. // String returns the string representation
  17548. func (s PutObjectLockConfigurationInput) String() string {
  17549. return awsutil.Prettify(s)
  17550. }
  17551. // GoString returns the string representation
  17552. func (s PutObjectLockConfigurationInput) GoString() string {
  17553. return s.String()
  17554. }
  17555. // Validate inspects the fields of the type to determine if they are valid.
  17556. func (s *PutObjectLockConfigurationInput) Validate() error {
  17557. invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"}
  17558. if s.Bucket == nil {
  17559. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17560. }
  17561. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17562. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17563. }
  17564. if invalidParams.Len() > 0 {
  17565. return invalidParams
  17566. }
  17567. return nil
  17568. }
  17569. // SetBucket sets the Bucket field's value.
  17570. func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput {
  17571. s.Bucket = &v
  17572. return s
  17573. }
  17574. func (s *PutObjectLockConfigurationInput) getBucket() (v string) {
  17575. if s.Bucket == nil {
  17576. return v
  17577. }
  17578. return *s.Bucket
  17579. }
  17580. // SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
  17581. func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
  17582. s.ObjectLockConfiguration = v
  17583. return s
  17584. }
  17585. // SetRequestPayer sets the RequestPayer field's value.
  17586. func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput {
  17587. s.RequestPayer = &v
  17588. return s
  17589. }
  17590. // SetToken sets the Token field's value.
  17591. func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput {
  17592. s.Token = &v
  17593. return s
  17594. }
  17595. type PutObjectLockConfigurationOutput struct {
  17596. _ struct{} `type:"structure"`
  17597. // If present, indicates that the requester was successfully charged for the
  17598. // request.
  17599. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17600. }
  17601. // String returns the string representation
  17602. func (s PutObjectLockConfigurationOutput) String() string {
  17603. return awsutil.Prettify(s)
  17604. }
  17605. // GoString returns the string representation
  17606. func (s PutObjectLockConfigurationOutput) GoString() string {
  17607. return s.String()
  17608. }
  17609. // SetRequestCharged sets the RequestCharged field's value.
  17610. func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput {
  17611. s.RequestCharged = &v
  17612. return s
  17613. }
  17614. type PutObjectOutput struct {
  17615. _ struct{} `type:"structure"`
  17616. // Entity tag for the uploaded object.
  17617. ETag *string `location:"header" locationName:"ETag" type:"string"`
  17618. // If the object expiration is configured, this will contain the expiration
  17619. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  17620. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  17621. // If present, indicates that the requester was successfully charged for the
  17622. // request.
  17623. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17624. // If server-side encryption with a customer-provided encryption key was requested,
  17625. // the response will include this header confirming the encryption algorithm
  17626. // used.
  17627. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17628. // If server-side encryption with a customer-provided encryption key was requested,
  17629. // the response will include this header to provide round trip message integrity
  17630. // verification of the customer-provided encryption key.
  17631. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17632. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  17633. // encryption key that was used for the object.
  17634. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  17635. // The Server-side encryption algorithm used when storing this object in S3
  17636. // (e.g., AES256, aws:kms).
  17637. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17638. // Version of the object.
  17639. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  17640. }
  17641. // String returns the string representation
  17642. func (s PutObjectOutput) String() string {
  17643. return awsutil.Prettify(s)
  17644. }
  17645. // GoString returns the string representation
  17646. func (s PutObjectOutput) GoString() string {
  17647. return s.String()
  17648. }
  17649. // SetETag sets the ETag field's value.
  17650. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  17651. s.ETag = &v
  17652. return s
  17653. }
  17654. // SetExpiration sets the Expiration field's value.
  17655. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  17656. s.Expiration = &v
  17657. return s
  17658. }
  17659. // SetRequestCharged sets the RequestCharged field's value.
  17660. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  17661. s.RequestCharged = &v
  17662. return s
  17663. }
  17664. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17665. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  17666. s.SSECustomerAlgorithm = &v
  17667. return s
  17668. }
  17669. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17670. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  17671. s.SSECustomerKeyMD5 = &v
  17672. return s
  17673. }
  17674. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17675. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  17676. s.SSEKMSKeyId = &v
  17677. return s
  17678. }
  17679. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17680. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  17681. s.ServerSideEncryption = &v
  17682. return s
  17683. }
  17684. // SetVersionId sets the VersionId field's value.
  17685. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  17686. s.VersionId = &v
  17687. return s
  17688. }
  17689. type PutObjectRetentionInput struct {
  17690. _ struct{} `type:"structure" payload:"Retention"`
  17691. // The bucket that contains the object you want to apply this Object Retention
  17692. // configuration to.
  17693. //
  17694. // Bucket is a required field
  17695. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17696. // Indicates whether this operation should bypass Governance-mode restrictions.j
  17697. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
  17698. // The key name for the object that you want to apply this Object Retention
  17699. // configuration to.
  17700. //
  17701. // Key is a required field
  17702. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17703. // Confirms that the requester knows that she or he will be charged for the
  17704. // request. Bucket owners need not specify this parameter in their requests.
  17705. // Documentation on downloading objects from requester pays buckets can be found
  17706. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17707. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17708. // The container element for the Object Retention configuration.
  17709. Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17710. // The version ID for the object that you want to apply this Object Retention
  17711. // configuration to.
  17712. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17713. }
  17714. // String returns the string representation
  17715. func (s PutObjectRetentionInput) String() string {
  17716. return awsutil.Prettify(s)
  17717. }
  17718. // GoString returns the string representation
  17719. func (s PutObjectRetentionInput) GoString() string {
  17720. return s.String()
  17721. }
  17722. // Validate inspects the fields of the type to determine if they are valid.
  17723. func (s *PutObjectRetentionInput) Validate() error {
  17724. invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"}
  17725. if s.Bucket == nil {
  17726. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17727. }
  17728. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17729. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17730. }
  17731. if s.Key == nil {
  17732. invalidParams.Add(request.NewErrParamRequired("Key"))
  17733. }
  17734. if s.Key != nil && len(*s.Key) < 1 {
  17735. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17736. }
  17737. if invalidParams.Len() > 0 {
  17738. return invalidParams
  17739. }
  17740. return nil
  17741. }
  17742. // SetBucket sets the Bucket field's value.
  17743. func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
  17744. s.Bucket = &v
  17745. return s
  17746. }
  17747. func (s *PutObjectRetentionInput) getBucket() (v string) {
  17748. if s.Bucket == nil {
  17749. return v
  17750. }
  17751. return *s.Bucket
  17752. }
  17753. // SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
  17754. func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput {
  17755. s.BypassGovernanceRetention = &v
  17756. return s
  17757. }
  17758. // SetKey sets the Key field's value.
  17759. func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput {
  17760. s.Key = &v
  17761. return s
  17762. }
  17763. // SetRequestPayer sets the RequestPayer field's value.
  17764. func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput {
  17765. s.RequestPayer = &v
  17766. return s
  17767. }
  17768. // SetRetention sets the Retention field's value.
  17769. func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput {
  17770. s.Retention = v
  17771. return s
  17772. }
  17773. // SetVersionId sets the VersionId field's value.
  17774. func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput {
  17775. s.VersionId = &v
  17776. return s
  17777. }
  17778. type PutObjectRetentionOutput struct {
  17779. _ struct{} `type:"structure"`
  17780. // If present, indicates that the requester was successfully charged for the
  17781. // request.
  17782. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17783. }
  17784. // String returns the string representation
  17785. func (s PutObjectRetentionOutput) String() string {
  17786. return awsutil.Prettify(s)
  17787. }
  17788. // GoString returns the string representation
  17789. func (s PutObjectRetentionOutput) GoString() string {
  17790. return s.String()
  17791. }
  17792. // SetRequestCharged sets the RequestCharged field's value.
  17793. func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput {
  17794. s.RequestCharged = &v
  17795. return s
  17796. }
  17797. type PutObjectTaggingInput struct {
  17798. _ struct{} `type:"structure" payload:"Tagging"`
  17799. // Bucket is a required field
  17800. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17801. // Key is a required field
  17802. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17803. // Tagging is a required field
  17804. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17805. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  17806. }
  17807. // String returns the string representation
  17808. func (s PutObjectTaggingInput) String() string {
  17809. return awsutil.Prettify(s)
  17810. }
  17811. // GoString returns the string representation
  17812. func (s PutObjectTaggingInput) GoString() string {
  17813. return s.String()
  17814. }
  17815. // Validate inspects the fields of the type to determine if they are valid.
  17816. func (s *PutObjectTaggingInput) Validate() error {
  17817. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  17818. if s.Bucket == nil {
  17819. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17820. }
  17821. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17822. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17823. }
  17824. if s.Key == nil {
  17825. invalidParams.Add(request.NewErrParamRequired("Key"))
  17826. }
  17827. if s.Key != nil && len(*s.Key) < 1 {
  17828. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17829. }
  17830. if s.Tagging == nil {
  17831. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  17832. }
  17833. if s.Tagging != nil {
  17834. if err := s.Tagging.Validate(); err != nil {
  17835. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  17836. }
  17837. }
  17838. if invalidParams.Len() > 0 {
  17839. return invalidParams
  17840. }
  17841. return nil
  17842. }
  17843. // SetBucket sets the Bucket field's value.
  17844. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  17845. s.Bucket = &v
  17846. return s
  17847. }
  17848. func (s *PutObjectTaggingInput) getBucket() (v string) {
  17849. if s.Bucket == nil {
  17850. return v
  17851. }
  17852. return *s.Bucket
  17853. }
  17854. // SetKey sets the Key field's value.
  17855. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  17856. s.Key = &v
  17857. return s
  17858. }
  17859. // SetTagging sets the Tagging field's value.
  17860. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  17861. s.Tagging = v
  17862. return s
  17863. }
  17864. // SetVersionId sets the VersionId field's value.
  17865. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  17866. s.VersionId = &v
  17867. return s
  17868. }
  17869. type PutObjectTaggingOutput struct {
  17870. _ struct{} `type:"structure"`
  17871. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  17872. }
  17873. // String returns the string representation
  17874. func (s PutObjectTaggingOutput) String() string {
  17875. return awsutil.Prettify(s)
  17876. }
  17877. // GoString returns the string representation
  17878. func (s PutObjectTaggingOutput) GoString() string {
  17879. return s.String()
  17880. }
  17881. // SetVersionId sets the VersionId field's value.
  17882. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  17883. s.VersionId = &v
  17884. return s
  17885. }
  17886. type PutPublicAccessBlockInput struct {
  17887. _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
  17888. // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
  17889. // want to set.
  17890. //
  17891. // Bucket is a required field
  17892. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17893. // The PublicAccessBlock configuration that you want to apply to this Amazon
  17894. // S3 bucket. You can enable the configuration options in any combination. For
  17895. // more information about when Amazon S3 considers a bucket or object public,
  17896. // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
  17897. // in the Amazon Simple Storage Service Developer Guide.
  17898. //
  17899. // PublicAccessBlockConfiguration is a required field
  17900. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  17901. }
  17902. // String returns the string representation
  17903. func (s PutPublicAccessBlockInput) String() string {
  17904. return awsutil.Prettify(s)
  17905. }
  17906. // GoString returns the string representation
  17907. func (s PutPublicAccessBlockInput) GoString() string {
  17908. return s.String()
  17909. }
  17910. // Validate inspects the fields of the type to determine if they are valid.
  17911. func (s *PutPublicAccessBlockInput) Validate() error {
  17912. invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"}
  17913. if s.Bucket == nil {
  17914. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17915. }
  17916. if s.Bucket != nil && len(*s.Bucket) < 1 {
  17917. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  17918. }
  17919. if s.PublicAccessBlockConfiguration == nil {
  17920. invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration"))
  17921. }
  17922. if invalidParams.Len() > 0 {
  17923. return invalidParams
  17924. }
  17925. return nil
  17926. }
  17927. // SetBucket sets the Bucket field's value.
  17928. func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput {
  17929. s.Bucket = &v
  17930. return s
  17931. }
  17932. func (s *PutPublicAccessBlockInput) getBucket() (v string) {
  17933. if s.Bucket == nil {
  17934. return v
  17935. }
  17936. return *s.Bucket
  17937. }
  17938. // SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
  17939. func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
  17940. s.PublicAccessBlockConfiguration = v
  17941. return s
  17942. }
  17943. type PutPublicAccessBlockOutput struct {
  17944. _ struct{} `type:"structure"`
  17945. }
  17946. // String returns the string representation
  17947. func (s PutPublicAccessBlockOutput) String() string {
  17948. return awsutil.Prettify(s)
  17949. }
  17950. // GoString returns the string representation
  17951. func (s PutPublicAccessBlockOutput) GoString() string {
  17952. return s.String()
  17953. }
  17954. // A container for specifying the configuration for publication of messages
  17955. // to an Amazon Simple Queue Service (Amazon SQS) queue.when Amazon S3 detects
  17956. // specified events.
  17957. type QueueConfiguration struct {
  17958. _ struct{} `type:"structure"`
  17959. // Events is a required field
  17960. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  17961. // A container for object key name filtering rules. For information about key
  17962. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  17963. // in the Amazon Simple Storage Service Developer Guide.
  17964. Filter *NotificationConfigurationFilter `type:"structure"`
  17965. // An optional unique identifier for configurations in a notification configuration.
  17966. // If you don't provide one, Amazon S3 will assign an ID.
  17967. Id *string `type:"string"`
  17968. // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
  17969. // will publish a message when it detects events of the specified type.
  17970. //
  17971. // QueueArn is a required field
  17972. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  17973. }
  17974. // String returns the string representation
  17975. func (s QueueConfiguration) String() string {
  17976. return awsutil.Prettify(s)
  17977. }
  17978. // GoString returns the string representation
  17979. func (s QueueConfiguration) GoString() string {
  17980. return s.String()
  17981. }
  17982. // Validate inspects the fields of the type to determine if they are valid.
  17983. func (s *QueueConfiguration) Validate() error {
  17984. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  17985. if s.Events == nil {
  17986. invalidParams.Add(request.NewErrParamRequired("Events"))
  17987. }
  17988. if s.QueueArn == nil {
  17989. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  17990. }
  17991. if invalidParams.Len() > 0 {
  17992. return invalidParams
  17993. }
  17994. return nil
  17995. }
  17996. // SetEvents sets the Events field's value.
  17997. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  17998. s.Events = v
  17999. return s
  18000. }
  18001. // SetFilter sets the Filter field's value.
  18002. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  18003. s.Filter = v
  18004. return s
  18005. }
  18006. // SetId sets the Id field's value.
  18007. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  18008. s.Id = &v
  18009. return s
  18010. }
  18011. // SetQueueArn sets the QueueArn field's value.
  18012. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  18013. s.QueueArn = &v
  18014. return s
  18015. }
  18016. type QueueConfigurationDeprecated struct {
  18017. _ struct{} `type:"structure"`
  18018. // The bucket event for which to send notifications.
  18019. //
  18020. // Deprecated: Event has been deprecated
  18021. Event *string `deprecated:"true" type:"string" enum:"Event"`
  18022. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  18023. // An optional unique identifier for configurations in a notification configuration.
  18024. // If you don't provide one, Amazon S3 will assign an ID.
  18025. Id *string `type:"string"`
  18026. Queue *string `type:"string"`
  18027. }
  18028. // String returns the string representation
  18029. func (s QueueConfigurationDeprecated) String() string {
  18030. return awsutil.Prettify(s)
  18031. }
  18032. // GoString returns the string representation
  18033. func (s QueueConfigurationDeprecated) GoString() string {
  18034. return s.String()
  18035. }
  18036. // SetEvent sets the Event field's value.
  18037. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  18038. s.Event = &v
  18039. return s
  18040. }
  18041. // SetEvents sets the Events field's value.
  18042. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  18043. s.Events = v
  18044. return s
  18045. }
  18046. // SetId sets the Id field's value.
  18047. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  18048. s.Id = &v
  18049. return s
  18050. }
  18051. // SetQueue sets the Queue field's value.
  18052. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  18053. s.Queue = &v
  18054. return s
  18055. }
  18056. type RecordsEvent struct {
  18057. _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
  18058. // The byte array of partial, one or more result records.
  18059. //
  18060. // Payload is automatically base64 encoded/decoded by the SDK.
  18061. Payload []byte `type:"blob"`
  18062. }
  18063. // String returns the string representation
  18064. func (s RecordsEvent) String() string {
  18065. return awsutil.Prettify(s)
  18066. }
  18067. // GoString returns the string representation
  18068. func (s RecordsEvent) GoString() string {
  18069. return s.String()
  18070. }
  18071. // SetPayload sets the Payload field's value.
  18072. func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
  18073. s.Payload = v
  18074. return s
  18075. }
  18076. // The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
  18077. func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
  18078. // UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
  18079. // This method is only used internally within the SDK's EventStream handling.
  18080. func (s *RecordsEvent) UnmarshalEvent(
  18081. payloadUnmarshaler protocol.PayloadUnmarshaler,
  18082. msg eventstream.Message,
  18083. ) error {
  18084. s.Payload = make([]byte, len(msg.Payload))
  18085. copy(s.Payload, msg.Payload)
  18086. return nil
  18087. }
  18088. type Redirect struct {
  18089. _ struct{} `type:"structure"`
  18090. // The host name to use in the redirect request.
  18091. HostName *string `type:"string"`
  18092. // The HTTP redirect code to use on the response. Not required if one of the
  18093. // siblings is present.
  18094. HttpRedirectCode *string `type:"string"`
  18095. // Protocol to use (http, https) when redirecting requests. The default is the
  18096. // protocol that is used in the original request.
  18097. Protocol *string `type:"string" enum:"Protocol"`
  18098. // The object key prefix to use in the redirect request. For example, to redirect
  18099. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  18100. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  18101. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  18102. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  18103. // is not provided.
  18104. ReplaceKeyPrefixWith *string `type:"string"`
  18105. // The specific object key to use in the redirect request. For example, redirect
  18106. // request to error.html. Not required if one of the sibling is present. Can
  18107. // be present only if ReplaceKeyPrefixWith is not provided.
  18108. ReplaceKeyWith *string `type:"string"`
  18109. }
  18110. // String returns the string representation
  18111. func (s Redirect) String() string {
  18112. return awsutil.Prettify(s)
  18113. }
  18114. // GoString returns the string representation
  18115. func (s Redirect) GoString() string {
  18116. return s.String()
  18117. }
  18118. // SetHostName sets the HostName field's value.
  18119. func (s *Redirect) SetHostName(v string) *Redirect {
  18120. s.HostName = &v
  18121. return s
  18122. }
  18123. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  18124. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  18125. s.HttpRedirectCode = &v
  18126. return s
  18127. }
  18128. // SetProtocol sets the Protocol field's value.
  18129. func (s *Redirect) SetProtocol(v string) *Redirect {
  18130. s.Protocol = &v
  18131. return s
  18132. }
  18133. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  18134. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  18135. s.ReplaceKeyPrefixWith = &v
  18136. return s
  18137. }
  18138. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  18139. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  18140. s.ReplaceKeyWith = &v
  18141. return s
  18142. }
  18143. type RedirectAllRequestsTo struct {
  18144. _ struct{} `type:"structure"`
  18145. // Name of the host where requests will be redirected.
  18146. //
  18147. // HostName is a required field
  18148. HostName *string `type:"string" required:"true"`
  18149. // Protocol to use (http, https) when redirecting requests. The default is the
  18150. // protocol that is used in the original request.
  18151. Protocol *string `type:"string" enum:"Protocol"`
  18152. }
  18153. // String returns the string representation
  18154. func (s RedirectAllRequestsTo) String() string {
  18155. return awsutil.Prettify(s)
  18156. }
  18157. // GoString returns the string representation
  18158. func (s RedirectAllRequestsTo) GoString() string {
  18159. return s.String()
  18160. }
  18161. // Validate inspects the fields of the type to determine if they are valid.
  18162. func (s *RedirectAllRequestsTo) Validate() error {
  18163. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  18164. if s.HostName == nil {
  18165. invalidParams.Add(request.NewErrParamRequired("HostName"))
  18166. }
  18167. if invalidParams.Len() > 0 {
  18168. return invalidParams
  18169. }
  18170. return nil
  18171. }
  18172. // SetHostName sets the HostName field's value.
  18173. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  18174. s.HostName = &v
  18175. return s
  18176. }
  18177. // SetProtocol sets the Protocol field's value.
  18178. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  18179. s.Protocol = &v
  18180. return s
  18181. }
  18182. // A container for replication rules. You can add up to 1,000 rules. The maximum
  18183. // size of a replication configuration is 2 MB.
  18184. type ReplicationConfiguration struct {
  18185. _ struct{} `type:"structure"`
  18186. // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
  18187. // (IAM) role that Amazon S3 can assume when replicating the objects.
  18188. //
  18189. // Role is a required field
  18190. Role *string `type:"string" required:"true"`
  18191. // A container for one or more replication rules. A replication configuration
  18192. // must have at least one rule and can contain a maximum of 1,000 rules.
  18193. //
  18194. // Rules is a required field
  18195. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  18196. }
  18197. // String returns the string representation
  18198. func (s ReplicationConfiguration) String() string {
  18199. return awsutil.Prettify(s)
  18200. }
  18201. // GoString returns the string representation
  18202. func (s ReplicationConfiguration) GoString() string {
  18203. return s.String()
  18204. }
  18205. // Validate inspects the fields of the type to determine if they are valid.
  18206. func (s *ReplicationConfiguration) Validate() error {
  18207. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  18208. if s.Role == nil {
  18209. invalidParams.Add(request.NewErrParamRequired("Role"))
  18210. }
  18211. if s.Rules == nil {
  18212. invalidParams.Add(request.NewErrParamRequired("Rules"))
  18213. }
  18214. if s.Rules != nil {
  18215. for i, v := range s.Rules {
  18216. if v == nil {
  18217. continue
  18218. }
  18219. if err := v.Validate(); err != nil {
  18220. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  18221. }
  18222. }
  18223. }
  18224. if invalidParams.Len() > 0 {
  18225. return invalidParams
  18226. }
  18227. return nil
  18228. }
  18229. // SetRole sets the Role field's value.
  18230. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  18231. s.Role = &v
  18232. return s
  18233. }
  18234. // SetRules sets the Rules field's value.
  18235. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  18236. s.Rules = v
  18237. return s
  18238. }
  18239. // A container for information about a specific replication rule.
  18240. type ReplicationRule struct {
  18241. _ struct{} `type:"structure"`
  18242. // Specifies whether Amazon S3 should replicate delete makers.
  18243. DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
  18244. // A container for information about the replication destination.
  18245. //
  18246. // Destination is a required field
  18247. Destination *Destination `type:"structure" required:"true"`
  18248. // A filter that identifies the subset of objects to which the replication rule
  18249. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  18250. Filter *ReplicationRuleFilter `type:"structure"`
  18251. // A unique identifier for the rule. The maximum value is 255 characters.
  18252. ID *string `type:"string"`
  18253. // An object keyname prefix that identifies the object or objects to which the
  18254. // rule applies. The maximum prefix length is 1,024 characters.
  18255. //
  18256. // Deprecated: Prefix has been deprecated
  18257. Prefix *string `deprecated:"true" type:"string"`
  18258. // The priority associated with the rule. If you specify multiple rules in a
  18259. // replication configuration, Amazon S3 prioritizes the rules to prevent conflicts
  18260. // when filtering. If two or more rules identify the same object based on a
  18261. // specified filter, the rule with higher priority takes precedence. For example:
  18262. //
  18263. // * Same object quality prefix based filter criteria If prefixes you specified
  18264. // in multiple rules overlap
  18265. //
  18266. // * Same object qualify tag based filter criteria specified in multiple
  18267. // rules
  18268. //
  18269. // For more information, see Cross-Region Replication (CRR) ( https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html)
  18270. // in the Amazon S3 Developer Guide.
  18271. Priority *int64 `type:"integer"`
  18272. // A container that describes additional filters for identifying the source
  18273. // objects that you want to replicate. You can choose to enable or disable the
  18274. // replication of these objects. Currently, Amazon S3 supports only the filter
  18275. // that you can specify for objects created with server-side encryption using
  18276. // an AWS KMS-Managed Key (SSE-KMS).
  18277. //
  18278. // If you want Amazon S3 to replicate objects created with server-side encryption
  18279. // using AWS KMS-Managed Keys.
  18280. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  18281. // If status isn't enabled, the rule is ignored.
  18282. //
  18283. // Status is a required field
  18284. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  18285. }
  18286. // String returns the string representation
  18287. func (s ReplicationRule) String() string {
  18288. return awsutil.Prettify(s)
  18289. }
  18290. // GoString returns the string representation
  18291. func (s ReplicationRule) GoString() string {
  18292. return s.String()
  18293. }
  18294. // Validate inspects the fields of the type to determine if they are valid.
  18295. func (s *ReplicationRule) Validate() error {
  18296. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  18297. if s.Destination == nil {
  18298. invalidParams.Add(request.NewErrParamRequired("Destination"))
  18299. }
  18300. if s.Status == nil {
  18301. invalidParams.Add(request.NewErrParamRequired("Status"))
  18302. }
  18303. if s.Destination != nil {
  18304. if err := s.Destination.Validate(); err != nil {
  18305. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  18306. }
  18307. }
  18308. if s.Filter != nil {
  18309. if err := s.Filter.Validate(); err != nil {
  18310. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  18311. }
  18312. }
  18313. if s.SourceSelectionCriteria != nil {
  18314. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  18315. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  18316. }
  18317. }
  18318. if invalidParams.Len() > 0 {
  18319. return invalidParams
  18320. }
  18321. return nil
  18322. }
  18323. // SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
  18324. func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
  18325. s.DeleteMarkerReplication = v
  18326. return s
  18327. }
  18328. // SetDestination sets the Destination field's value.
  18329. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  18330. s.Destination = v
  18331. return s
  18332. }
  18333. // SetFilter sets the Filter field's value.
  18334. func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
  18335. s.Filter = v
  18336. return s
  18337. }
  18338. // SetID sets the ID field's value.
  18339. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  18340. s.ID = &v
  18341. return s
  18342. }
  18343. // SetPrefix sets the Prefix field's value.
  18344. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  18345. s.Prefix = &v
  18346. return s
  18347. }
  18348. // SetPriority sets the Priority field's value.
  18349. func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
  18350. s.Priority = &v
  18351. return s
  18352. }
  18353. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  18354. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  18355. s.SourceSelectionCriteria = v
  18356. return s
  18357. }
  18358. // SetStatus sets the Status field's value.
  18359. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  18360. s.Status = &v
  18361. return s
  18362. }
  18363. type ReplicationRuleAndOperator struct {
  18364. _ struct{} `type:"structure"`
  18365. Prefix *string `type:"string"`
  18366. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  18367. }
  18368. // String returns the string representation
  18369. func (s ReplicationRuleAndOperator) String() string {
  18370. return awsutil.Prettify(s)
  18371. }
  18372. // GoString returns the string representation
  18373. func (s ReplicationRuleAndOperator) GoString() string {
  18374. return s.String()
  18375. }
  18376. // Validate inspects the fields of the type to determine if they are valid.
  18377. func (s *ReplicationRuleAndOperator) Validate() error {
  18378. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
  18379. if s.Tags != nil {
  18380. for i, v := range s.Tags {
  18381. if v == nil {
  18382. continue
  18383. }
  18384. if err := v.Validate(); err != nil {
  18385. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  18386. }
  18387. }
  18388. }
  18389. if invalidParams.Len() > 0 {
  18390. return invalidParams
  18391. }
  18392. return nil
  18393. }
  18394. // SetPrefix sets the Prefix field's value.
  18395. func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
  18396. s.Prefix = &v
  18397. return s
  18398. }
  18399. // SetTags sets the Tags field's value.
  18400. func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
  18401. s.Tags = v
  18402. return s
  18403. }
  18404. // A filter that identifies the subset of objects to which the replication rule
  18405. // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
  18406. type ReplicationRuleFilter struct {
  18407. _ struct{} `type:"structure"`
  18408. // A container for specifying rule filters. The filters determine the subset
  18409. // of objects to which the rule applies. This element is required only if you
  18410. // specify more than one filter. For example:
  18411. //
  18412. // * If you specify both a Prefix and a Tag filter, wrap these filters in
  18413. // an And tag.
  18414. //
  18415. // * If you specify a filter based on multiple tags, wrap the Tag elements
  18416. // in an And tag.
  18417. And *ReplicationRuleAndOperator `type:"structure"`
  18418. // An object keyname prefix that identifies the subset of objects to which the
  18419. // rule applies.
  18420. Prefix *string `type:"string"`
  18421. // A container for specifying a tag key and value.
  18422. //
  18423. // The rule applies only to objects that have the tag in their tag set.
  18424. Tag *Tag `type:"structure"`
  18425. }
  18426. // String returns the string representation
  18427. func (s ReplicationRuleFilter) String() string {
  18428. return awsutil.Prettify(s)
  18429. }
  18430. // GoString returns the string representation
  18431. func (s ReplicationRuleFilter) GoString() string {
  18432. return s.String()
  18433. }
  18434. // Validate inspects the fields of the type to determine if they are valid.
  18435. func (s *ReplicationRuleFilter) Validate() error {
  18436. invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
  18437. if s.And != nil {
  18438. if err := s.And.Validate(); err != nil {
  18439. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  18440. }
  18441. }
  18442. if s.Tag != nil {
  18443. if err := s.Tag.Validate(); err != nil {
  18444. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  18445. }
  18446. }
  18447. if invalidParams.Len() > 0 {
  18448. return invalidParams
  18449. }
  18450. return nil
  18451. }
  18452. // SetAnd sets the And field's value.
  18453. func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
  18454. s.And = v
  18455. return s
  18456. }
  18457. // SetPrefix sets the Prefix field's value.
  18458. func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
  18459. s.Prefix = &v
  18460. return s
  18461. }
  18462. // SetTag sets the Tag field's value.
  18463. func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
  18464. s.Tag = v
  18465. return s
  18466. }
  18467. type RequestPaymentConfiguration struct {
  18468. _ struct{} `type:"structure"`
  18469. // Specifies who pays for the download and request fees.
  18470. //
  18471. // Payer is a required field
  18472. Payer *string `type:"string" required:"true" enum:"Payer"`
  18473. }
  18474. // String returns the string representation
  18475. func (s RequestPaymentConfiguration) String() string {
  18476. return awsutil.Prettify(s)
  18477. }
  18478. // GoString returns the string representation
  18479. func (s RequestPaymentConfiguration) GoString() string {
  18480. return s.String()
  18481. }
  18482. // Validate inspects the fields of the type to determine if they are valid.
  18483. func (s *RequestPaymentConfiguration) Validate() error {
  18484. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  18485. if s.Payer == nil {
  18486. invalidParams.Add(request.NewErrParamRequired("Payer"))
  18487. }
  18488. if invalidParams.Len() > 0 {
  18489. return invalidParams
  18490. }
  18491. return nil
  18492. }
  18493. // SetPayer sets the Payer field's value.
  18494. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  18495. s.Payer = &v
  18496. return s
  18497. }
  18498. type RequestProgress struct {
  18499. _ struct{} `type:"structure"`
  18500. // Specifies whether periodic QueryProgress frames should be sent. Valid values:
  18501. // TRUE, FALSE. Default value: FALSE.
  18502. Enabled *bool `type:"boolean"`
  18503. }
  18504. // String returns the string representation
  18505. func (s RequestProgress) String() string {
  18506. return awsutil.Prettify(s)
  18507. }
  18508. // GoString returns the string representation
  18509. func (s RequestProgress) GoString() string {
  18510. return s.String()
  18511. }
  18512. // SetEnabled sets the Enabled field's value.
  18513. func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
  18514. s.Enabled = &v
  18515. return s
  18516. }
  18517. type RestoreObjectInput struct {
  18518. _ struct{} `type:"structure" payload:"RestoreRequest"`
  18519. // Bucket is a required field
  18520. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  18521. // Key is a required field
  18522. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  18523. // Confirms that the requester knows that she or he will be charged for the
  18524. // request. Bucket owners need not specify this parameter in their requests.
  18525. // Documentation on downloading objects from requester pays buckets can be found
  18526. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  18527. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  18528. // Container for restore job parameters.
  18529. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  18530. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  18531. }
  18532. // String returns the string representation
  18533. func (s RestoreObjectInput) String() string {
  18534. return awsutil.Prettify(s)
  18535. }
  18536. // GoString returns the string representation
  18537. func (s RestoreObjectInput) GoString() string {
  18538. return s.String()
  18539. }
  18540. // Validate inspects the fields of the type to determine if they are valid.
  18541. func (s *RestoreObjectInput) Validate() error {
  18542. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  18543. if s.Bucket == nil {
  18544. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  18545. }
  18546. if s.Bucket != nil && len(*s.Bucket) < 1 {
  18547. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  18548. }
  18549. if s.Key == nil {
  18550. invalidParams.Add(request.NewErrParamRequired("Key"))
  18551. }
  18552. if s.Key != nil && len(*s.Key) < 1 {
  18553. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  18554. }
  18555. if s.RestoreRequest != nil {
  18556. if err := s.RestoreRequest.Validate(); err != nil {
  18557. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  18558. }
  18559. }
  18560. if invalidParams.Len() > 0 {
  18561. return invalidParams
  18562. }
  18563. return nil
  18564. }
  18565. // SetBucket sets the Bucket field's value.
  18566. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  18567. s.Bucket = &v
  18568. return s
  18569. }
  18570. func (s *RestoreObjectInput) getBucket() (v string) {
  18571. if s.Bucket == nil {
  18572. return v
  18573. }
  18574. return *s.Bucket
  18575. }
  18576. // SetKey sets the Key field's value.
  18577. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  18578. s.Key = &v
  18579. return s
  18580. }
  18581. // SetRequestPayer sets the RequestPayer field's value.
  18582. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  18583. s.RequestPayer = &v
  18584. return s
  18585. }
  18586. // SetRestoreRequest sets the RestoreRequest field's value.
  18587. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  18588. s.RestoreRequest = v
  18589. return s
  18590. }
  18591. // SetVersionId sets the VersionId field's value.
  18592. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  18593. s.VersionId = &v
  18594. return s
  18595. }
  18596. type RestoreObjectOutput struct {
  18597. _ struct{} `type:"structure"`
  18598. // If present, indicates that the requester was successfully charged for the
  18599. // request.
  18600. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  18601. // Indicates the path in the provided S3 output location where Select results
  18602. // will be restored to.
  18603. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  18604. }
  18605. // String returns the string representation
  18606. func (s RestoreObjectOutput) String() string {
  18607. return awsutil.Prettify(s)
  18608. }
  18609. // GoString returns the string representation
  18610. func (s RestoreObjectOutput) GoString() string {
  18611. return s.String()
  18612. }
  18613. // SetRequestCharged sets the RequestCharged field's value.
  18614. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  18615. s.RequestCharged = &v
  18616. return s
  18617. }
  18618. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  18619. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  18620. s.RestoreOutputPath = &v
  18621. return s
  18622. }
  18623. // Container for restore job parameters.
  18624. type RestoreRequest struct {
  18625. _ struct{} `type:"structure"`
  18626. // Lifetime of the active copy in days. Do not use with restores that specify
  18627. // OutputLocation.
  18628. Days *int64 `type:"integer"`
  18629. // The optional description for the job.
  18630. Description *string `type:"string"`
  18631. // Glacier related parameters pertaining to this job. Do not use with restores
  18632. // that specify OutputLocation.
  18633. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  18634. // Describes the location where the restore job's output is stored.
  18635. OutputLocation *OutputLocation `type:"structure"`
  18636. // Describes the parameters for Select job types.
  18637. SelectParameters *SelectParameters `type:"structure"`
  18638. // Glacier retrieval tier at which the restore will be processed.
  18639. Tier *string `type:"string" enum:"Tier"`
  18640. // Type of restore request.
  18641. Type *string `type:"string" enum:"RestoreRequestType"`
  18642. }
  18643. // String returns the string representation
  18644. func (s RestoreRequest) String() string {
  18645. return awsutil.Prettify(s)
  18646. }
  18647. // GoString returns the string representation
  18648. func (s RestoreRequest) GoString() string {
  18649. return s.String()
  18650. }
  18651. // Validate inspects the fields of the type to determine if they are valid.
  18652. func (s *RestoreRequest) Validate() error {
  18653. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  18654. if s.GlacierJobParameters != nil {
  18655. if err := s.GlacierJobParameters.Validate(); err != nil {
  18656. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  18657. }
  18658. }
  18659. if s.OutputLocation != nil {
  18660. if err := s.OutputLocation.Validate(); err != nil {
  18661. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  18662. }
  18663. }
  18664. if s.SelectParameters != nil {
  18665. if err := s.SelectParameters.Validate(); err != nil {
  18666. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  18667. }
  18668. }
  18669. if invalidParams.Len() > 0 {
  18670. return invalidParams
  18671. }
  18672. return nil
  18673. }
  18674. // SetDays sets the Days field's value.
  18675. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  18676. s.Days = &v
  18677. return s
  18678. }
  18679. // SetDescription sets the Description field's value.
  18680. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  18681. s.Description = &v
  18682. return s
  18683. }
  18684. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  18685. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  18686. s.GlacierJobParameters = v
  18687. return s
  18688. }
  18689. // SetOutputLocation sets the OutputLocation field's value.
  18690. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  18691. s.OutputLocation = v
  18692. return s
  18693. }
  18694. // SetSelectParameters sets the SelectParameters field's value.
  18695. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  18696. s.SelectParameters = v
  18697. return s
  18698. }
  18699. // SetTier sets the Tier field's value.
  18700. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  18701. s.Tier = &v
  18702. return s
  18703. }
  18704. // SetType sets the Type field's value.
  18705. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  18706. s.Type = &v
  18707. return s
  18708. }
  18709. type RoutingRule struct {
  18710. _ struct{} `type:"structure"`
  18711. // A container for describing a condition that must be met for the specified
  18712. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  18713. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  18714. // redirect request to another host where you might process the error.
  18715. Condition *Condition `type:"structure"`
  18716. // Container for redirect information. You can redirect requests to another
  18717. // host, to another page, or with another protocol. In the event of an error,
  18718. // you can specify a different error code to return.
  18719. //
  18720. // Redirect is a required field
  18721. Redirect *Redirect `type:"structure" required:"true"`
  18722. }
  18723. // String returns the string representation
  18724. func (s RoutingRule) String() string {
  18725. return awsutil.Prettify(s)
  18726. }
  18727. // GoString returns the string representation
  18728. func (s RoutingRule) GoString() string {
  18729. return s.String()
  18730. }
  18731. // Validate inspects the fields of the type to determine if they are valid.
  18732. func (s *RoutingRule) Validate() error {
  18733. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  18734. if s.Redirect == nil {
  18735. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  18736. }
  18737. if invalidParams.Len() > 0 {
  18738. return invalidParams
  18739. }
  18740. return nil
  18741. }
  18742. // SetCondition sets the Condition field's value.
  18743. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  18744. s.Condition = v
  18745. return s
  18746. }
  18747. // SetRedirect sets the Redirect field's value.
  18748. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  18749. s.Redirect = v
  18750. return s
  18751. }
  18752. type Rule struct {
  18753. _ struct{} `type:"structure"`
  18754. // Specifies the days since the initiation of an Incomplete Multipart Upload
  18755. // that Lifecycle will wait before permanently removing all parts of the upload.
  18756. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  18757. Expiration *LifecycleExpiration `type:"structure"`
  18758. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  18759. ID *string `type:"string"`
  18760. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  18761. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  18762. // configuration action on a bucket that has versioning enabled (or suspended)
  18763. // to request that Amazon S3 delete noncurrent object versions at a specific
  18764. // period in the object's lifetime.
  18765. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  18766. // Container for the transition rule that describes when noncurrent objects
  18767. // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER
  18768. // storage class. If your bucket is versioning-enabled (or versioning is suspended),
  18769. // you can set this action to request that Amazon S3 transition noncurrent object
  18770. // versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING or GLACIER storage
  18771. // class at a specific period in the object's lifetime.
  18772. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  18773. // Prefix identifying one or more objects to which the rule applies.
  18774. //
  18775. // Prefix is a required field
  18776. Prefix *string `type:"string" required:"true"`
  18777. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  18778. // is not currently being applied.
  18779. //
  18780. // Status is a required field
  18781. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  18782. Transition *Transition `type:"structure"`
  18783. }
  18784. // String returns the string representation
  18785. func (s Rule) String() string {
  18786. return awsutil.Prettify(s)
  18787. }
  18788. // GoString returns the string representation
  18789. func (s Rule) GoString() string {
  18790. return s.String()
  18791. }
  18792. // Validate inspects the fields of the type to determine if they are valid.
  18793. func (s *Rule) Validate() error {
  18794. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  18795. if s.Prefix == nil {
  18796. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  18797. }
  18798. if s.Status == nil {
  18799. invalidParams.Add(request.NewErrParamRequired("Status"))
  18800. }
  18801. if invalidParams.Len() > 0 {
  18802. return invalidParams
  18803. }
  18804. return nil
  18805. }
  18806. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  18807. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  18808. s.AbortIncompleteMultipartUpload = v
  18809. return s
  18810. }
  18811. // SetExpiration sets the Expiration field's value.
  18812. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  18813. s.Expiration = v
  18814. return s
  18815. }
  18816. // SetID sets the ID field's value.
  18817. func (s *Rule) SetID(v string) *Rule {
  18818. s.ID = &v
  18819. return s
  18820. }
  18821. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  18822. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  18823. s.NoncurrentVersionExpiration = v
  18824. return s
  18825. }
  18826. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  18827. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  18828. s.NoncurrentVersionTransition = v
  18829. return s
  18830. }
  18831. // SetPrefix sets the Prefix field's value.
  18832. func (s *Rule) SetPrefix(v string) *Rule {
  18833. s.Prefix = &v
  18834. return s
  18835. }
  18836. // SetStatus sets the Status field's value.
  18837. func (s *Rule) SetStatus(v string) *Rule {
  18838. s.Status = &v
  18839. return s
  18840. }
  18841. // SetTransition sets the Transition field's value.
  18842. func (s *Rule) SetTransition(v *Transition) *Rule {
  18843. s.Transition = v
  18844. return s
  18845. }
  18846. // Specifies the use of SSE-KMS to encrypt delivered Inventory reports.
  18847. type SSEKMS struct {
  18848. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  18849. // Specifies the ID of the AWS Key Management Service (KMS) master encryption
  18850. // key to use for encrypting Inventory reports.
  18851. //
  18852. // KeyId is a required field
  18853. KeyId *string `type:"string" required:"true" sensitive:"true"`
  18854. }
  18855. // String returns the string representation
  18856. func (s SSEKMS) String() string {
  18857. return awsutil.Prettify(s)
  18858. }
  18859. // GoString returns the string representation
  18860. func (s SSEKMS) GoString() string {
  18861. return s.String()
  18862. }
  18863. // Validate inspects the fields of the type to determine if they are valid.
  18864. func (s *SSEKMS) Validate() error {
  18865. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  18866. if s.KeyId == nil {
  18867. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  18868. }
  18869. if invalidParams.Len() > 0 {
  18870. return invalidParams
  18871. }
  18872. return nil
  18873. }
  18874. // SetKeyId sets the KeyId field's value.
  18875. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  18876. s.KeyId = &v
  18877. return s
  18878. }
  18879. // Specifies the use of SSE-S3 to encrypt delivered Inventory reports.
  18880. type SSES3 struct {
  18881. _ struct{} `locationName:"SSE-S3" type:"structure"`
  18882. }
  18883. // String returns the string representation
  18884. func (s SSES3) String() string {
  18885. return awsutil.Prettify(s)
  18886. }
  18887. // GoString returns the string representation
  18888. func (s SSES3) GoString() string {
  18889. return s.String()
  18890. }
  18891. // SelectObjectContentEventStream provides handling of EventStreams for
  18892. // the SelectObjectContent API.
  18893. //
  18894. // Use this type to receive SelectObjectContentEventStream events. The events
  18895. // can be read from the Events channel member.
  18896. //
  18897. // The events that can be received are:
  18898. //
  18899. // * ContinuationEvent
  18900. // * EndEvent
  18901. // * ProgressEvent
  18902. // * RecordsEvent
  18903. // * StatsEvent
  18904. type SelectObjectContentEventStream struct {
  18905. // Reader is the EventStream reader for the SelectObjectContentEventStream
  18906. // events. This value is automatically set by the SDK when the API call is made
  18907. // Use this member when unit testing your code with the SDK to mock out the
  18908. // EventStream Reader.
  18909. //
  18910. // Must not be nil.
  18911. Reader SelectObjectContentEventStreamReader
  18912. // StreamCloser is the io.Closer for the EventStream connection. For HTTP
  18913. // EventStream this is the response Body. The stream will be closed when
  18914. // the Close method of the EventStream is called.
  18915. StreamCloser io.Closer
  18916. }
  18917. // Close closes the EventStream. This will also cause the Events channel to be
  18918. // closed. You can use the closing of the Events channel to terminate your
  18919. // application's read from the API's EventStream.
  18920. //
  18921. // Will close the underlying EventStream reader. For EventStream over HTTP
  18922. // connection this will also close the HTTP connection.
  18923. //
  18924. // Close must be called when done using the EventStream API. Not calling Close
  18925. // may result in resource leaks.
  18926. func (es *SelectObjectContentEventStream) Close() (err error) {
  18927. es.Reader.Close()
  18928. return es.Err()
  18929. }
  18930. // Err returns any error that occurred while reading EventStream Events from
  18931. // the service API's response. Returns nil if there were no errors.
  18932. func (es *SelectObjectContentEventStream) Err() error {
  18933. if err := es.Reader.Err(); err != nil {
  18934. return err
  18935. }
  18936. es.StreamCloser.Close()
  18937. return nil
  18938. }
  18939. // Events returns a channel to read EventStream Events from the
  18940. // SelectObjectContent API.
  18941. //
  18942. // These events are:
  18943. //
  18944. // * ContinuationEvent
  18945. // * EndEvent
  18946. // * ProgressEvent
  18947. // * RecordsEvent
  18948. // * StatsEvent
  18949. func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  18950. return es.Reader.Events()
  18951. }
  18952. // SelectObjectContentEventStreamEvent groups together all EventStream
  18953. // events read from the SelectObjectContent API.
  18954. //
  18955. // These events are:
  18956. //
  18957. // * ContinuationEvent
  18958. // * EndEvent
  18959. // * ProgressEvent
  18960. // * RecordsEvent
  18961. // * StatsEvent
  18962. type SelectObjectContentEventStreamEvent interface {
  18963. eventSelectObjectContentEventStream()
  18964. }
  18965. // SelectObjectContentEventStreamReader provides the interface for reading EventStream
  18966. // Events from the SelectObjectContent API. The
  18967. // default implementation for this interface will be SelectObjectContentEventStream.
  18968. //
  18969. // The reader's Close method must allow multiple concurrent calls.
  18970. //
  18971. // These events are:
  18972. //
  18973. // * ContinuationEvent
  18974. // * EndEvent
  18975. // * ProgressEvent
  18976. // * RecordsEvent
  18977. // * StatsEvent
  18978. type SelectObjectContentEventStreamReader interface {
  18979. // Returns a channel of events as they are read from the event stream.
  18980. Events() <-chan SelectObjectContentEventStreamEvent
  18981. // Close will close the underlying event stream reader. For event stream over
  18982. // HTTP this will also close the HTTP connection.
  18983. Close() error
  18984. // Returns any error that has occurred while reading from the event stream.
  18985. Err() error
  18986. }
  18987. type readSelectObjectContentEventStream struct {
  18988. eventReader *eventstreamapi.EventReader
  18989. stream chan SelectObjectContentEventStreamEvent
  18990. errVal atomic.Value
  18991. done chan struct{}
  18992. closeOnce sync.Once
  18993. }
  18994. func newReadSelectObjectContentEventStream(
  18995. reader io.ReadCloser,
  18996. unmarshalers request.HandlerList,
  18997. logger aws.Logger,
  18998. logLevel aws.LogLevelType,
  18999. ) *readSelectObjectContentEventStream {
  19000. r := &readSelectObjectContentEventStream{
  19001. stream: make(chan SelectObjectContentEventStreamEvent),
  19002. done: make(chan struct{}),
  19003. }
  19004. r.eventReader = eventstreamapi.NewEventReader(
  19005. reader,
  19006. protocol.HandlerPayloadUnmarshal{
  19007. Unmarshalers: unmarshalers,
  19008. },
  19009. r.unmarshalerForEventType,
  19010. )
  19011. r.eventReader.UseLogger(logger, logLevel)
  19012. return r
  19013. }
  19014. // Close will close the underlying event stream reader. For EventStream over
  19015. // HTTP this will also close the HTTP connection.
  19016. func (r *readSelectObjectContentEventStream) Close() error {
  19017. r.closeOnce.Do(r.safeClose)
  19018. return r.Err()
  19019. }
  19020. func (r *readSelectObjectContentEventStream) safeClose() {
  19021. close(r.done)
  19022. err := r.eventReader.Close()
  19023. if err != nil {
  19024. r.errVal.Store(err)
  19025. }
  19026. }
  19027. func (r *readSelectObjectContentEventStream) Err() error {
  19028. if v := r.errVal.Load(); v != nil {
  19029. return v.(error)
  19030. }
  19031. return nil
  19032. }
  19033. func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
  19034. return r.stream
  19035. }
  19036. func (r *readSelectObjectContentEventStream) readEventStream() {
  19037. defer close(r.stream)
  19038. for {
  19039. event, err := r.eventReader.ReadEvent()
  19040. if err != nil {
  19041. if err == io.EOF {
  19042. return
  19043. }
  19044. select {
  19045. case <-r.done:
  19046. // If closed already ignore the error
  19047. return
  19048. default:
  19049. }
  19050. r.errVal.Store(err)
  19051. return
  19052. }
  19053. select {
  19054. case r.stream <- event.(SelectObjectContentEventStreamEvent):
  19055. case <-r.done:
  19056. return
  19057. }
  19058. }
  19059. }
  19060. func (r *readSelectObjectContentEventStream) unmarshalerForEventType(
  19061. eventType string,
  19062. ) (eventstreamapi.Unmarshaler, error) {
  19063. switch eventType {
  19064. case "Cont":
  19065. return &ContinuationEvent{}, nil
  19066. case "End":
  19067. return &EndEvent{}, nil
  19068. case "Progress":
  19069. return &ProgressEvent{}, nil
  19070. case "Records":
  19071. return &RecordsEvent{}, nil
  19072. case "Stats":
  19073. return &StatsEvent{}, nil
  19074. default:
  19075. return nil, awserr.New(
  19076. request.ErrCodeSerialization,
  19077. fmt.Sprintf("unknown event type name, %s, for SelectObjectContentEventStream", eventType),
  19078. nil,
  19079. )
  19080. }
  19081. }
  19082. // Request to filter the contents of an Amazon S3 object based on a simple Structured
  19083. // Query Language (SQL) statement. In the request, along with the SQL expression,
  19084. // you must specify a data serialization format (JSON or CSV) of the object.
  19085. // Amazon S3 uses this to parse object data into records. It returns only records
  19086. // that match the specified SQL expression. You must also specify the data serialization
  19087. // format for the response. For more information, see S3Select API Documentation
  19088. // (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
  19089. type SelectObjectContentInput struct {
  19090. _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  19091. // The S3 bucket.
  19092. //
  19093. // Bucket is a required field
  19094. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19095. // The expression that is used to query the object.
  19096. //
  19097. // Expression is a required field
  19098. Expression *string `type:"string" required:"true"`
  19099. // The type of the provided expression (for example., SQL).
  19100. //
  19101. // ExpressionType is a required field
  19102. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  19103. // Describes the format of the data in the object that is being queried.
  19104. //
  19105. // InputSerialization is a required field
  19106. InputSerialization *InputSerialization `type:"structure" required:"true"`
  19107. // The object key.
  19108. //
  19109. // Key is a required field
  19110. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19111. // Describes the format of the data that you want Amazon S3 to return in response.
  19112. //
  19113. // OutputSerialization is a required field
  19114. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  19115. // Specifies if periodic request progress information should be enabled.
  19116. RequestProgress *RequestProgress `type:"structure"`
  19117. // The SSE Algorithm used to encrypt the object. For more information, see
  19118. // Server-Side Encryption (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19119. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19120. // The SSE Customer Key. For more information, see Server-Side Encryption (Using
  19121. // Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19122. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19123. // The SSE Customer Key MD5. For more information, see Server-Side Encryption
  19124. // (Using Customer-Provided Encryption Keys (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
  19125. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19126. }
  19127. // String returns the string representation
  19128. func (s SelectObjectContentInput) String() string {
  19129. return awsutil.Prettify(s)
  19130. }
  19131. // GoString returns the string representation
  19132. func (s SelectObjectContentInput) GoString() string {
  19133. return s.String()
  19134. }
  19135. // Validate inspects the fields of the type to determine if they are valid.
  19136. func (s *SelectObjectContentInput) Validate() error {
  19137. invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
  19138. if s.Bucket == nil {
  19139. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  19140. }
  19141. if s.Bucket != nil && len(*s.Bucket) < 1 {
  19142. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  19143. }
  19144. if s.Expression == nil {
  19145. invalidParams.Add(request.NewErrParamRequired("Expression"))
  19146. }
  19147. if s.ExpressionType == nil {
  19148. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  19149. }
  19150. if s.InputSerialization == nil {
  19151. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  19152. }
  19153. if s.Key == nil {
  19154. invalidParams.Add(request.NewErrParamRequired("Key"))
  19155. }
  19156. if s.Key != nil && len(*s.Key) < 1 {
  19157. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19158. }
  19159. if s.OutputSerialization == nil {
  19160. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  19161. }
  19162. if invalidParams.Len() > 0 {
  19163. return invalidParams
  19164. }
  19165. return nil
  19166. }
  19167. // SetBucket sets the Bucket field's value.
  19168. func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
  19169. s.Bucket = &v
  19170. return s
  19171. }
  19172. func (s *SelectObjectContentInput) getBucket() (v string) {
  19173. if s.Bucket == nil {
  19174. return v
  19175. }
  19176. return *s.Bucket
  19177. }
  19178. // SetExpression sets the Expression field's value.
  19179. func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
  19180. s.Expression = &v
  19181. return s
  19182. }
  19183. // SetExpressionType sets the ExpressionType field's value.
  19184. func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
  19185. s.ExpressionType = &v
  19186. return s
  19187. }
  19188. // SetInputSerialization sets the InputSerialization field's value.
  19189. func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
  19190. s.InputSerialization = v
  19191. return s
  19192. }
  19193. // SetKey sets the Key field's value.
  19194. func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
  19195. s.Key = &v
  19196. return s
  19197. }
  19198. // SetOutputSerialization sets the OutputSerialization field's value.
  19199. func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
  19200. s.OutputSerialization = v
  19201. return s
  19202. }
  19203. // SetRequestProgress sets the RequestProgress field's value.
  19204. func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
  19205. s.RequestProgress = v
  19206. return s
  19207. }
  19208. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  19209. func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
  19210. s.SSECustomerAlgorithm = &v
  19211. return s
  19212. }
  19213. // SetSSECustomerKey sets the SSECustomerKey field's value.
  19214. func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
  19215. s.SSECustomerKey = &v
  19216. return s
  19217. }
  19218. func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
  19219. if s.SSECustomerKey == nil {
  19220. return v
  19221. }
  19222. return *s.SSECustomerKey
  19223. }
  19224. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  19225. func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
  19226. s.SSECustomerKeyMD5 = &v
  19227. return s
  19228. }
  19229. type SelectObjectContentOutput struct {
  19230. _ struct{} `type:"structure" payload:"Payload"`
  19231. // Use EventStream to use the API's stream.
  19232. EventStream *SelectObjectContentEventStream `type:"structure"`
  19233. }
  19234. // String returns the string representation
  19235. func (s SelectObjectContentOutput) String() string {
  19236. return awsutil.Prettify(s)
  19237. }
  19238. // GoString returns the string representation
  19239. func (s SelectObjectContentOutput) GoString() string {
  19240. return s.String()
  19241. }
  19242. // SetEventStream sets the EventStream field's value.
  19243. func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
  19244. s.EventStream = v
  19245. return s
  19246. }
  19247. func (s *SelectObjectContentOutput) runEventStreamLoop(r *request.Request) {
  19248. if r.Error != nil {
  19249. return
  19250. }
  19251. reader := newReadSelectObjectContentEventStream(
  19252. r.HTTPResponse.Body,
  19253. r.Handlers.UnmarshalStream,
  19254. r.Config.Logger,
  19255. r.Config.LogLevel.Value(),
  19256. )
  19257. go reader.readEventStream()
  19258. eventStream := &SelectObjectContentEventStream{
  19259. StreamCloser: r.HTTPResponse.Body,
  19260. Reader: reader,
  19261. }
  19262. s.EventStream = eventStream
  19263. }
  19264. // Describes the parameters for Select job types.
  19265. type SelectParameters struct {
  19266. _ struct{} `type:"structure"`
  19267. // The expression that is used to query the object.
  19268. //
  19269. // Expression is a required field
  19270. Expression *string `type:"string" required:"true"`
  19271. // The type of the provided expression (e.g., SQL).
  19272. //
  19273. // ExpressionType is a required field
  19274. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  19275. // Describes the serialization format of the object.
  19276. //
  19277. // InputSerialization is a required field
  19278. InputSerialization *InputSerialization `type:"structure" required:"true"`
  19279. // Describes how the results of the Select job are serialized.
  19280. //
  19281. // OutputSerialization is a required field
  19282. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  19283. }
  19284. // String returns the string representation
  19285. func (s SelectParameters) String() string {
  19286. return awsutil.Prettify(s)
  19287. }
  19288. // GoString returns the string representation
  19289. func (s SelectParameters) GoString() string {
  19290. return s.String()
  19291. }
  19292. // Validate inspects the fields of the type to determine if they are valid.
  19293. func (s *SelectParameters) Validate() error {
  19294. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  19295. if s.Expression == nil {
  19296. invalidParams.Add(request.NewErrParamRequired("Expression"))
  19297. }
  19298. if s.ExpressionType == nil {
  19299. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  19300. }
  19301. if s.InputSerialization == nil {
  19302. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  19303. }
  19304. if s.OutputSerialization == nil {
  19305. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  19306. }
  19307. if invalidParams.Len() > 0 {
  19308. return invalidParams
  19309. }
  19310. return nil
  19311. }
  19312. // SetExpression sets the Expression field's value.
  19313. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  19314. s.Expression = &v
  19315. return s
  19316. }
  19317. // SetExpressionType sets the ExpressionType field's value.
  19318. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  19319. s.ExpressionType = &v
  19320. return s
  19321. }
  19322. // SetInputSerialization sets the InputSerialization field's value.
  19323. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  19324. s.InputSerialization = v
  19325. return s
  19326. }
  19327. // SetOutputSerialization sets the OutputSerialization field's value.
  19328. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  19329. s.OutputSerialization = v
  19330. return s
  19331. }
  19332. // Describes the default server-side encryption to apply to new objects in the
  19333. // bucket. If Put Object request does not specify any server-side encryption,
  19334. // this default encryption will be applied.
  19335. type ServerSideEncryptionByDefault struct {
  19336. _ struct{} `type:"structure"`
  19337. // KMS master key ID to use for the default encryption. This parameter is allowed
  19338. // if SSEAlgorithm is aws:kms.
  19339. KMSMasterKeyID *string `type:"string" sensitive:"true"`
  19340. // Server-side encryption algorithm to use for the default encryption.
  19341. //
  19342. // SSEAlgorithm is a required field
  19343. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  19344. }
  19345. // String returns the string representation
  19346. func (s ServerSideEncryptionByDefault) String() string {
  19347. return awsutil.Prettify(s)
  19348. }
  19349. // GoString returns the string representation
  19350. func (s ServerSideEncryptionByDefault) GoString() string {
  19351. return s.String()
  19352. }
  19353. // Validate inspects the fields of the type to determine if they are valid.
  19354. func (s *ServerSideEncryptionByDefault) Validate() error {
  19355. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  19356. if s.SSEAlgorithm == nil {
  19357. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  19358. }
  19359. if invalidParams.Len() > 0 {
  19360. return invalidParams
  19361. }
  19362. return nil
  19363. }
  19364. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  19365. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  19366. s.KMSMasterKeyID = &v
  19367. return s
  19368. }
  19369. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  19370. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  19371. s.SSEAlgorithm = &v
  19372. return s
  19373. }
  19374. // Container for server-side encryption configuration rules. Currently S3 supports
  19375. // one rule only.
  19376. type ServerSideEncryptionConfiguration struct {
  19377. _ struct{} `type:"structure"`
  19378. // Container for information about a particular server-side encryption configuration
  19379. // rule.
  19380. //
  19381. // Rules is a required field
  19382. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  19383. }
  19384. // String returns the string representation
  19385. func (s ServerSideEncryptionConfiguration) String() string {
  19386. return awsutil.Prettify(s)
  19387. }
  19388. // GoString returns the string representation
  19389. func (s ServerSideEncryptionConfiguration) GoString() string {
  19390. return s.String()
  19391. }
  19392. // Validate inspects the fields of the type to determine if they are valid.
  19393. func (s *ServerSideEncryptionConfiguration) Validate() error {
  19394. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  19395. if s.Rules == nil {
  19396. invalidParams.Add(request.NewErrParamRequired("Rules"))
  19397. }
  19398. if s.Rules != nil {
  19399. for i, v := range s.Rules {
  19400. if v == nil {
  19401. continue
  19402. }
  19403. if err := v.Validate(); err != nil {
  19404. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  19405. }
  19406. }
  19407. }
  19408. if invalidParams.Len() > 0 {
  19409. return invalidParams
  19410. }
  19411. return nil
  19412. }
  19413. // SetRules sets the Rules field's value.
  19414. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  19415. s.Rules = v
  19416. return s
  19417. }
  19418. // Container for information about a particular server-side encryption configuration
  19419. // rule.
  19420. type ServerSideEncryptionRule struct {
  19421. _ struct{} `type:"structure"`
  19422. // Describes the default server-side encryption to apply to new objects in the
  19423. // bucket. If Put Object request does not specify any server-side encryption,
  19424. // this default encryption will be applied.
  19425. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  19426. }
  19427. // String returns the string representation
  19428. func (s ServerSideEncryptionRule) String() string {
  19429. return awsutil.Prettify(s)
  19430. }
  19431. // GoString returns the string representation
  19432. func (s ServerSideEncryptionRule) GoString() string {
  19433. return s.String()
  19434. }
  19435. // Validate inspects the fields of the type to determine if they are valid.
  19436. func (s *ServerSideEncryptionRule) Validate() error {
  19437. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  19438. if s.ApplyServerSideEncryptionByDefault != nil {
  19439. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  19440. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  19441. }
  19442. }
  19443. if invalidParams.Len() > 0 {
  19444. return invalidParams
  19445. }
  19446. return nil
  19447. }
  19448. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  19449. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  19450. s.ApplyServerSideEncryptionByDefault = v
  19451. return s
  19452. }
  19453. // A container for filters that define which source objects should be replicated.
  19454. type SourceSelectionCriteria struct {
  19455. _ struct{} `type:"structure"`
  19456. // A container for filter information for the selection of S3 objects encrypted
  19457. // with AWS KMS. If you include SourceSelectionCriteria in the replication configuration,
  19458. // this element is required.
  19459. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  19460. }
  19461. // String returns the string representation
  19462. func (s SourceSelectionCriteria) String() string {
  19463. return awsutil.Prettify(s)
  19464. }
  19465. // GoString returns the string representation
  19466. func (s SourceSelectionCriteria) GoString() string {
  19467. return s.String()
  19468. }
  19469. // Validate inspects the fields of the type to determine if they are valid.
  19470. func (s *SourceSelectionCriteria) Validate() error {
  19471. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  19472. if s.SseKmsEncryptedObjects != nil {
  19473. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  19474. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  19475. }
  19476. }
  19477. if invalidParams.Len() > 0 {
  19478. return invalidParams
  19479. }
  19480. return nil
  19481. }
  19482. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  19483. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  19484. s.SseKmsEncryptedObjects = v
  19485. return s
  19486. }
  19487. // A container for filter information for the selection of S3 objects encrypted
  19488. // with AWS KMS.
  19489. type SseKmsEncryptedObjects struct {
  19490. _ struct{} `type:"structure"`
  19491. // If the status is not Enabled, replication for S3 objects encrypted with AWS
  19492. // KMS is disabled.
  19493. //
  19494. // Status is a required field
  19495. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  19496. }
  19497. // String returns the string representation
  19498. func (s SseKmsEncryptedObjects) String() string {
  19499. return awsutil.Prettify(s)
  19500. }
  19501. // GoString returns the string representation
  19502. func (s SseKmsEncryptedObjects) GoString() string {
  19503. return s.String()
  19504. }
  19505. // Validate inspects the fields of the type to determine if they are valid.
  19506. func (s *SseKmsEncryptedObjects) Validate() error {
  19507. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  19508. if s.Status == nil {
  19509. invalidParams.Add(request.NewErrParamRequired("Status"))
  19510. }
  19511. if invalidParams.Len() > 0 {
  19512. return invalidParams
  19513. }
  19514. return nil
  19515. }
  19516. // SetStatus sets the Status field's value.
  19517. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  19518. s.Status = &v
  19519. return s
  19520. }
  19521. type Stats struct {
  19522. _ struct{} `type:"structure"`
  19523. // The total number of uncompressed object bytes processed.
  19524. BytesProcessed *int64 `type:"long"`
  19525. // The total number of bytes of records payload data returned.
  19526. BytesReturned *int64 `type:"long"`
  19527. // The total number of object bytes scanned.
  19528. BytesScanned *int64 `type:"long"`
  19529. }
  19530. // String returns the string representation
  19531. func (s Stats) String() string {
  19532. return awsutil.Prettify(s)
  19533. }
  19534. // GoString returns the string representation
  19535. func (s Stats) GoString() string {
  19536. return s.String()
  19537. }
  19538. // SetBytesProcessed sets the BytesProcessed field's value.
  19539. func (s *Stats) SetBytesProcessed(v int64) *Stats {
  19540. s.BytesProcessed = &v
  19541. return s
  19542. }
  19543. // SetBytesReturned sets the BytesReturned field's value.
  19544. func (s *Stats) SetBytesReturned(v int64) *Stats {
  19545. s.BytesReturned = &v
  19546. return s
  19547. }
  19548. // SetBytesScanned sets the BytesScanned field's value.
  19549. func (s *Stats) SetBytesScanned(v int64) *Stats {
  19550. s.BytesScanned = &v
  19551. return s
  19552. }
  19553. type StatsEvent struct {
  19554. _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
  19555. // The Stats event details.
  19556. Details *Stats `locationName:"Details" type:"structure"`
  19557. }
  19558. // String returns the string representation
  19559. func (s StatsEvent) String() string {
  19560. return awsutil.Prettify(s)
  19561. }
  19562. // GoString returns the string representation
  19563. func (s StatsEvent) GoString() string {
  19564. return s.String()
  19565. }
  19566. // SetDetails sets the Details field's value.
  19567. func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
  19568. s.Details = v
  19569. return s
  19570. }
  19571. // The StatsEvent is and event in the SelectObjectContentEventStream group of events.
  19572. func (s *StatsEvent) eventSelectObjectContentEventStream() {}
  19573. // UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
  19574. // This method is only used internally within the SDK's EventStream handling.
  19575. func (s *StatsEvent) UnmarshalEvent(
  19576. payloadUnmarshaler protocol.PayloadUnmarshaler,
  19577. msg eventstream.Message,
  19578. ) error {
  19579. if err := payloadUnmarshaler.UnmarshalPayload(
  19580. bytes.NewReader(msg.Payload), s,
  19581. ); err != nil {
  19582. return err
  19583. }
  19584. return nil
  19585. }
  19586. type StorageClassAnalysis struct {
  19587. _ struct{} `type:"structure"`
  19588. // A container used to describe how data related to the storage class analysis
  19589. // should be exported.
  19590. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  19591. }
  19592. // String returns the string representation
  19593. func (s StorageClassAnalysis) String() string {
  19594. return awsutil.Prettify(s)
  19595. }
  19596. // GoString returns the string representation
  19597. func (s StorageClassAnalysis) GoString() string {
  19598. return s.String()
  19599. }
  19600. // Validate inspects the fields of the type to determine if they are valid.
  19601. func (s *StorageClassAnalysis) Validate() error {
  19602. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  19603. if s.DataExport != nil {
  19604. if err := s.DataExport.Validate(); err != nil {
  19605. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  19606. }
  19607. }
  19608. if invalidParams.Len() > 0 {
  19609. return invalidParams
  19610. }
  19611. return nil
  19612. }
  19613. // SetDataExport sets the DataExport field's value.
  19614. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  19615. s.DataExport = v
  19616. return s
  19617. }
  19618. type StorageClassAnalysisDataExport struct {
  19619. _ struct{} `type:"structure"`
  19620. // The place to store the data for an analysis.
  19621. //
  19622. // Destination is a required field
  19623. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  19624. // The version of the output schema to use when exporting data. Must be V_1.
  19625. //
  19626. // OutputSchemaVersion is a required field
  19627. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  19628. }
  19629. // String returns the string representation
  19630. func (s StorageClassAnalysisDataExport) String() string {
  19631. return awsutil.Prettify(s)
  19632. }
  19633. // GoString returns the string representation
  19634. func (s StorageClassAnalysisDataExport) GoString() string {
  19635. return s.String()
  19636. }
  19637. // Validate inspects the fields of the type to determine if they are valid.
  19638. func (s *StorageClassAnalysisDataExport) Validate() error {
  19639. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  19640. if s.Destination == nil {
  19641. invalidParams.Add(request.NewErrParamRequired("Destination"))
  19642. }
  19643. if s.OutputSchemaVersion == nil {
  19644. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  19645. }
  19646. if s.Destination != nil {
  19647. if err := s.Destination.Validate(); err != nil {
  19648. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  19649. }
  19650. }
  19651. if invalidParams.Len() > 0 {
  19652. return invalidParams
  19653. }
  19654. return nil
  19655. }
  19656. // SetDestination sets the Destination field's value.
  19657. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  19658. s.Destination = v
  19659. return s
  19660. }
  19661. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  19662. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  19663. s.OutputSchemaVersion = &v
  19664. return s
  19665. }
  19666. type Tag struct {
  19667. _ struct{} `type:"structure"`
  19668. // Name of the tag.
  19669. //
  19670. // Key is a required field
  19671. Key *string `min:"1" type:"string" required:"true"`
  19672. // Value of the tag.
  19673. //
  19674. // Value is a required field
  19675. Value *string `type:"string" required:"true"`
  19676. }
  19677. // String returns the string representation
  19678. func (s Tag) String() string {
  19679. return awsutil.Prettify(s)
  19680. }
  19681. // GoString returns the string representation
  19682. func (s Tag) GoString() string {
  19683. return s.String()
  19684. }
  19685. // Validate inspects the fields of the type to determine if they are valid.
  19686. func (s *Tag) Validate() error {
  19687. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  19688. if s.Key == nil {
  19689. invalidParams.Add(request.NewErrParamRequired("Key"))
  19690. }
  19691. if s.Key != nil && len(*s.Key) < 1 {
  19692. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  19693. }
  19694. if s.Value == nil {
  19695. invalidParams.Add(request.NewErrParamRequired("Value"))
  19696. }
  19697. if invalidParams.Len() > 0 {
  19698. return invalidParams
  19699. }
  19700. return nil
  19701. }
  19702. // SetKey sets the Key field's value.
  19703. func (s *Tag) SetKey(v string) *Tag {
  19704. s.Key = &v
  19705. return s
  19706. }
  19707. // SetValue sets the Value field's value.
  19708. func (s *Tag) SetValue(v string) *Tag {
  19709. s.Value = &v
  19710. return s
  19711. }
  19712. type Tagging struct {
  19713. _ struct{} `type:"structure"`
  19714. // TagSet is a required field
  19715. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  19716. }
  19717. // String returns the string representation
  19718. func (s Tagging) String() string {
  19719. return awsutil.Prettify(s)
  19720. }
  19721. // GoString returns the string representation
  19722. func (s Tagging) GoString() string {
  19723. return s.String()
  19724. }
  19725. // Validate inspects the fields of the type to determine if they are valid.
  19726. func (s *Tagging) Validate() error {
  19727. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  19728. if s.TagSet == nil {
  19729. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  19730. }
  19731. if s.TagSet != nil {
  19732. for i, v := range s.TagSet {
  19733. if v == nil {
  19734. continue
  19735. }
  19736. if err := v.Validate(); err != nil {
  19737. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  19738. }
  19739. }
  19740. }
  19741. if invalidParams.Len() > 0 {
  19742. return invalidParams
  19743. }
  19744. return nil
  19745. }
  19746. // SetTagSet sets the TagSet field's value.
  19747. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  19748. s.TagSet = v
  19749. return s
  19750. }
  19751. type TargetGrant struct {
  19752. _ struct{} `type:"structure"`
  19753. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  19754. // Logging permissions assigned to the Grantee for the bucket.
  19755. Permission *string `type:"string" enum:"BucketLogsPermission"`
  19756. }
  19757. // String returns the string representation
  19758. func (s TargetGrant) String() string {
  19759. return awsutil.Prettify(s)
  19760. }
  19761. // GoString returns the string representation
  19762. func (s TargetGrant) GoString() string {
  19763. return s.String()
  19764. }
  19765. // Validate inspects the fields of the type to determine if they are valid.
  19766. func (s *TargetGrant) Validate() error {
  19767. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  19768. if s.Grantee != nil {
  19769. if err := s.Grantee.Validate(); err != nil {
  19770. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  19771. }
  19772. }
  19773. if invalidParams.Len() > 0 {
  19774. return invalidParams
  19775. }
  19776. return nil
  19777. }
  19778. // SetGrantee sets the Grantee field's value.
  19779. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  19780. s.Grantee = v
  19781. return s
  19782. }
  19783. // SetPermission sets the Permission field's value.
  19784. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  19785. s.Permission = &v
  19786. return s
  19787. }
  19788. // A container for specifying the configuration for publication of messages
  19789. // to an Amazon Simple Notification Service (Amazon SNS) topic.when Amazon S3
  19790. // detects specified events.
  19791. type TopicConfiguration struct {
  19792. _ struct{} `type:"structure"`
  19793. // Events is a required field
  19794. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  19795. // A container for object key name filtering rules. For information about key
  19796. // name filtering, see Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  19797. // in the Amazon Simple Storage Service Developer Guide.
  19798. Filter *NotificationConfigurationFilter `type:"structure"`
  19799. // An optional unique identifier for configurations in a notification configuration.
  19800. // If you don't provide one, Amazon S3 will assign an ID.
  19801. Id *string `type:"string"`
  19802. // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3
  19803. // will publish a message when it detects events of the specified type.
  19804. //
  19805. // TopicArn is a required field
  19806. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  19807. }
  19808. // String returns the string representation
  19809. func (s TopicConfiguration) String() string {
  19810. return awsutil.Prettify(s)
  19811. }
  19812. // GoString returns the string representation
  19813. func (s TopicConfiguration) GoString() string {
  19814. return s.String()
  19815. }
  19816. // Validate inspects the fields of the type to determine if they are valid.
  19817. func (s *TopicConfiguration) Validate() error {
  19818. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  19819. if s.Events == nil {
  19820. invalidParams.Add(request.NewErrParamRequired("Events"))
  19821. }
  19822. if s.TopicArn == nil {
  19823. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  19824. }
  19825. if invalidParams.Len() > 0 {
  19826. return invalidParams
  19827. }
  19828. return nil
  19829. }
  19830. // SetEvents sets the Events field's value.
  19831. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  19832. s.Events = v
  19833. return s
  19834. }
  19835. // SetFilter sets the Filter field's value.
  19836. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  19837. s.Filter = v
  19838. return s
  19839. }
  19840. // SetId sets the Id field's value.
  19841. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  19842. s.Id = &v
  19843. return s
  19844. }
  19845. // SetTopicArn sets the TopicArn field's value.
  19846. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  19847. s.TopicArn = &v
  19848. return s
  19849. }
  19850. type TopicConfigurationDeprecated struct {
  19851. _ struct{} `type:"structure"`
  19852. // Bucket event for which to send notifications.
  19853. //
  19854. // Deprecated: Event has been deprecated
  19855. Event *string `deprecated:"true" type:"string" enum:"Event"`
  19856. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  19857. // An optional unique identifier for configurations in a notification configuration.
  19858. // If you don't provide one, Amazon S3 will assign an ID.
  19859. Id *string `type:"string"`
  19860. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  19861. // specified events for the bucket.
  19862. Topic *string `type:"string"`
  19863. }
  19864. // String returns the string representation
  19865. func (s TopicConfigurationDeprecated) String() string {
  19866. return awsutil.Prettify(s)
  19867. }
  19868. // GoString returns the string representation
  19869. func (s TopicConfigurationDeprecated) GoString() string {
  19870. return s.String()
  19871. }
  19872. // SetEvent sets the Event field's value.
  19873. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  19874. s.Event = &v
  19875. return s
  19876. }
  19877. // SetEvents sets the Events field's value.
  19878. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  19879. s.Events = v
  19880. return s
  19881. }
  19882. // SetId sets the Id field's value.
  19883. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  19884. s.Id = &v
  19885. return s
  19886. }
  19887. // SetTopic sets the Topic field's value.
  19888. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  19889. s.Topic = &v
  19890. return s
  19891. }
  19892. type Transition struct {
  19893. _ struct{} `type:"structure"`
  19894. // Indicates at what date the object is to be moved or deleted. Should be in
  19895. // GMT ISO 8601 Format.
  19896. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  19897. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  19898. // The value must be a non-zero positive integer.
  19899. Days *int64 `type:"integer"`
  19900. // The class of storage used to store the object.
  19901. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  19902. }
  19903. // String returns the string representation
  19904. func (s Transition) String() string {
  19905. return awsutil.Prettify(s)
  19906. }
  19907. // GoString returns the string representation
  19908. func (s Transition) GoString() string {
  19909. return s.String()
  19910. }
  19911. // SetDate sets the Date field's value.
  19912. func (s *Transition) SetDate(v time.Time) *Transition {
  19913. s.Date = &v
  19914. return s
  19915. }
  19916. // SetDays sets the Days field's value.
  19917. func (s *Transition) SetDays(v int64) *Transition {
  19918. s.Days = &v
  19919. return s
  19920. }
  19921. // SetStorageClass sets the StorageClass field's value.
  19922. func (s *Transition) SetStorageClass(v string) *Transition {
  19923. s.StorageClass = &v
  19924. return s
  19925. }
  19926. type UploadPartCopyInput struct {
  19927. _ struct{} `type:"structure"`
  19928. // Bucket is a required field
  19929. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  19930. // The name of the source bucket and key name of the source object, separated
  19931. // by a slash (/). Must be URL-encoded.
  19932. //
  19933. // CopySource is a required field
  19934. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  19935. // Copies the object if its entity tag (ETag) matches the specified tag.
  19936. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  19937. // Copies the object if it has been modified since the specified time.
  19938. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
  19939. // Copies the object if its entity tag (ETag) is different than the specified
  19940. // ETag.
  19941. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  19942. // Copies the object if it hasn't been modified since the specified time.
  19943. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
  19944. // The range of bytes to copy from the source object. The range value must use
  19945. // the form bytes=first-last, where the first and last are the zero-based byte
  19946. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  19947. // first ten bytes of the source. You can copy a range only if the source object
  19948. // is greater than 5 GB.
  19949. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  19950. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  19951. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  19952. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  19953. // the source object. The encryption key provided in this header must be one
  19954. // that was used when the source object was created.
  19955. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19956. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19957. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  19958. // key was transmitted without error.
  19959. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  19960. // Key is a required field
  19961. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  19962. // Part number of part being copied. This is a positive integer between 1 and
  19963. // 10,000.
  19964. //
  19965. // PartNumber is a required field
  19966. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  19967. // Confirms that the requester knows that she or he will be charged for the
  19968. // request. Bucket owners need not specify this parameter in their requests.
  19969. // Documentation on downloading objects from requester pays buckets can be found
  19970. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  19971. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  19972. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  19973. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  19974. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  19975. // data. This value is used to store the object and then it is discarded; Amazon
  19976. // does not store the encryption key. The key must be appropriate for use with
  19977. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  19978. // header. This must be the same encryption key specified in the initiate multipart
  19979. // upload request.
  19980. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  19981. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  19982. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  19983. // key was transmitted without error.
  19984. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  19985. // Upload ID identifying the multipart upload whose part is being copied.
  19986. //
  19987. // UploadId is a required field
  19988. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  19989. }
  19990. // String returns the string representation
  19991. func (s UploadPartCopyInput) String() string {
  19992. return awsutil.Prettify(s)
  19993. }
  19994. // GoString returns the string representation
  19995. func (s UploadPartCopyInput) GoString() string {
  19996. return s.String()
  19997. }
  19998. // Validate inspects the fields of the type to determine if they are valid.
  19999. func (s *UploadPartCopyInput) Validate() error {
  20000. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  20001. if s.Bucket == nil {
  20002. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20003. }
  20004. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20005. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20006. }
  20007. if s.CopySource == nil {
  20008. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  20009. }
  20010. if s.Key == nil {
  20011. invalidParams.Add(request.NewErrParamRequired("Key"))
  20012. }
  20013. if s.Key != nil && len(*s.Key) < 1 {
  20014. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20015. }
  20016. if s.PartNumber == nil {
  20017. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  20018. }
  20019. if s.UploadId == nil {
  20020. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  20021. }
  20022. if invalidParams.Len() > 0 {
  20023. return invalidParams
  20024. }
  20025. return nil
  20026. }
  20027. // SetBucket sets the Bucket field's value.
  20028. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  20029. s.Bucket = &v
  20030. return s
  20031. }
  20032. func (s *UploadPartCopyInput) getBucket() (v string) {
  20033. if s.Bucket == nil {
  20034. return v
  20035. }
  20036. return *s.Bucket
  20037. }
  20038. // SetCopySource sets the CopySource field's value.
  20039. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  20040. s.CopySource = &v
  20041. return s
  20042. }
  20043. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  20044. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  20045. s.CopySourceIfMatch = &v
  20046. return s
  20047. }
  20048. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  20049. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  20050. s.CopySourceIfModifiedSince = &v
  20051. return s
  20052. }
  20053. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  20054. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  20055. s.CopySourceIfNoneMatch = &v
  20056. return s
  20057. }
  20058. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  20059. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  20060. s.CopySourceIfUnmodifiedSince = &v
  20061. return s
  20062. }
  20063. // SetCopySourceRange sets the CopySourceRange field's value.
  20064. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  20065. s.CopySourceRange = &v
  20066. return s
  20067. }
  20068. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  20069. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  20070. s.CopySourceSSECustomerAlgorithm = &v
  20071. return s
  20072. }
  20073. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  20074. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  20075. s.CopySourceSSECustomerKey = &v
  20076. return s
  20077. }
  20078. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  20079. if s.CopySourceSSECustomerKey == nil {
  20080. return v
  20081. }
  20082. return *s.CopySourceSSECustomerKey
  20083. }
  20084. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  20085. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  20086. s.CopySourceSSECustomerKeyMD5 = &v
  20087. return s
  20088. }
  20089. // SetKey sets the Key field's value.
  20090. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  20091. s.Key = &v
  20092. return s
  20093. }
  20094. // SetPartNumber sets the PartNumber field's value.
  20095. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  20096. s.PartNumber = &v
  20097. return s
  20098. }
  20099. // SetRequestPayer sets the RequestPayer field's value.
  20100. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  20101. s.RequestPayer = &v
  20102. return s
  20103. }
  20104. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20105. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  20106. s.SSECustomerAlgorithm = &v
  20107. return s
  20108. }
  20109. // SetSSECustomerKey sets the SSECustomerKey field's value.
  20110. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  20111. s.SSECustomerKey = &v
  20112. return s
  20113. }
  20114. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  20115. if s.SSECustomerKey == nil {
  20116. return v
  20117. }
  20118. return *s.SSECustomerKey
  20119. }
  20120. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20121. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  20122. s.SSECustomerKeyMD5 = &v
  20123. return s
  20124. }
  20125. // SetUploadId sets the UploadId field's value.
  20126. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  20127. s.UploadId = &v
  20128. return s
  20129. }
  20130. type UploadPartCopyOutput struct {
  20131. _ struct{} `type:"structure" payload:"CopyPartResult"`
  20132. CopyPartResult *CopyPartResult `type:"structure"`
  20133. // The version of the source object that was copied, if you have enabled versioning
  20134. // on the source bucket.
  20135. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  20136. // If present, indicates that the requester was successfully charged for the
  20137. // request.
  20138. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20139. // If server-side encryption with a customer-provided encryption key was requested,
  20140. // the response will include this header confirming the encryption algorithm
  20141. // used.
  20142. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20143. // If server-side encryption with a customer-provided encryption key was requested,
  20144. // the response will include this header to provide round trip message integrity
  20145. // verification of the customer-provided encryption key.
  20146. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20147. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  20148. // encryption key that was used for the object.
  20149. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20150. // The Server-side encryption algorithm used when storing this object in S3
  20151. // (e.g., AES256, aws:kms).
  20152. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20153. }
  20154. // String returns the string representation
  20155. func (s UploadPartCopyOutput) String() string {
  20156. return awsutil.Prettify(s)
  20157. }
  20158. // GoString returns the string representation
  20159. func (s UploadPartCopyOutput) GoString() string {
  20160. return s.String()
  20161. }
  20162. // SetCopyPartResult sets the CopyPartResult field's value.
  20163. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  20164. s.CopyPartResult = v
  20165. return s
  20166. }
  20167. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  20168. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  20169. s.CopySourceVersionId = &v
  20170. return s
  20171. }
  20172. // SetRequestCharged sets the RequestCharged field's value.
  20173. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  20174. s.RequestCharged = &v
  20175. return s
  20176. }
  20177. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20178. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  20179. s.SSECustomerAlgorithm = &v
  20180. return s
  20181. }
  20182. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20183. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  20184. s.SSECustomerKeyMD5 = &v
  20185. return s
  20186. }
  20187. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20188. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  20189. s.SSEKMSKeyId = &v
  20190. return s
  20191. }
  20192. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20193. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  20194. s.ServerSideEncryption = &v
  20195. return s
  20196. }
  20197. type UploadPartInput struct {
  20198. _ struct{} `type:"structure" payload:"Body"`
  20199. // Object data.
  20200. Body io.ReadSeeker `type:"blob"`
  20201. // Name of the bucket to which the multipart upload was initiated.
  20202. //
  20203. // Bucket is a required field
  20204. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  20205. // Size of the body in bytes. This parameter is useful when the size of the
  20206. // body cannot be determined automatically.
  20207. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  20208. // The base64-encoded 128-bit MD5 digest of the part data.
  20209. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  20210. // Object key for which the multipart upload was initiated.
  20211. //
  20212. // Key is a required field
  20213. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  20214. // Part number of part being uploaded. This is a positive integer between 1
  20215. // and 10,000.
  20216. //
  20217. // PartNumber is a required field
  20218. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  20219. // Confirms that the requester knows that she or he will be charged for the
  20220. // request. Bucket owners need not specify this parameter in their requests.
  20221. // Documentation on downloading objects from requester pays buckets can be found
  20222. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20223. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  20224. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  20225. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20226. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  20227. // data. This value is used to store the object and then it is discarded; Amazon
  20228. // does not store the encryption key. The key must be appropriate for use with
  20229. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  20230. // header. This must be the same encryption key specified in the initiate multipart
  20231. // upload request.
  20232. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
  20233. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  20234. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  20235. // key was transmitted without error.
  20236. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20237. // Upload ID identifying the multipart upload whose part is being uploaded.
  20238. //
  20239. // UploadId is a required field
  20240. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  20241. }
  20242. // String returns the string representation
  20243. func (s UploadPartInput) String() string {
  20244. return awsutil.Prettify(s)
  20245. }
  20246. // GoString returns the string representation
  20247. func (s UploadPartInput) GoString() string {
  20248. return s.String()
  20249. }
  20250. // Validate inspects the fields of the type to determine if they are valid.
  20251. func (s *UploadPartInput) Validate() error {
  20252. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  20253. if s.Bucket == nil {
  20254. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  20255. }
  20256. if s.Bucket != nil && len(*s.Bucket) < 1 {
  20257. invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
  20258. }
  20259. if s.Key == nil {
  20260. invalidParams.Add(request.NewErrParamRequired("Key"))
  20261. }
  20262. if s.Key != nil && len(*s.Key) < 1 {
  20263. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  20264. }
  20265. if s.PartNumber == nil {
  20266. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  20267. }
  20268. if s.UploadId == nil {
  20269. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  20270. }
  20271. if invalidParams.Len() > 0 {
  20272. return invalidParams
  20273. }
  20274. return nil
  20275. }
  20276. // SetBody sets the Body field's value.
  20277. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  20278. s.Body = v
  20279. return s
  20280. }
  20281. // SetBucket sets the Bucket field's value.
  20282. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  20283. s.Bucket = &v
  20284. return s
  20285. }
  20286. func (s *UploadPartInput) getBucket() (v string) {
  20287. if s.Bucket == nil {
  20288. return v
  20289. }
  20290. return *s.Bucket
  20291. }
  20292. // SetContentLength sets the ContentLength field's value.
  20293. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  20294. s.ContentLength = &v
  20295. return s
  20296. }
  20297. // SetContentMD5 sets the ContentMD5 field's value.
  20298. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  20299. s.ContentMD5 = &v
  20300. return s
  20301. }
  20302. // SetKey sets the Key field's value.
  20303. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  20304. s.Key = &v
  20305. return s
  20306. }
  20307. // SetPartNumber sets the PartNumber field's value.
  20308. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  20309. s.PartNumber = &v
  20310. return s
  20311. }
  20312. // SetRequestPayer sets the RequestPayer field's value.
  20313. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  20314. s.RequestPayer = &v
  20315. return s
  20316. }
  20317. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20318. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  20319. s.SSECustomerAlgorithm = &v
  20320. return s
  20321. }
  20322. // SetSSECustomerKey sets the SSECustomerKey field's value.
  20323. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  20324. s.SSECustomerKey = &v
  20325. return s
  20326. }
  20327. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  20328. if s.SSECustomerKey == nil {
  20329. return v
  20330. }
  20331. return *s.SSECustomerKey
  20332. }
  20333. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20334. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  20335. s.SSECustomerKeyMD5 = &v
  20336. return s
  20337. }
  20338. // SetUploadId sets the UploadId field's value.
  20339. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  20340. s.UploadId = &v
  20341. return s
  20342. }
  20343. type UploadPartOutput struct {
  20344. _ struct{} `type:"structure"`
  20345. // Entity tag for the uploaded object.
  20346. ETag *string `location:"header" locationName:"ETag" type:"string"`
  20347. // If present, indicates that the requester was successfully charged for the
  20348. // request.
  20349. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  20350. // If server-side encryption with a customer-provided encryption key was requested,
  20351. // the response will include this header confirming the encryption algorithm
  20352. // used.
  20353. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  20354. // If server-side encryption with a customer-provided encryption key was requested,
  20355. // the response will include this header to provide round trip message integrity
  20356. // verification of the customer-provided encryption key.
  20357. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  20358. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  20359. // encryption key that was used for the object.
  20360. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
  20361. // The Server-side encryption algorithm used when storing this object in S3
  20362. // (e.g., AES256, aws:kms).
  20363. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  20364. }
  20365. // String returns the string representation
  20366. func (s UploadPartOutput) String() string {
  20367. return awsutil.Prettify(s)
  20368. }
  20369. // GoString returns the string representation
  20370. func (s UploadPartOutput) GoString() string {
  20371. return s.String()
  20372. }
  20373. // SetETag sets the ETag field's value.
  20374. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  20375. s.ETag = &v
  20376. return s
  20377. }
  20378. // SetRequestCharged sets the RequestCharged field's value.
  20379. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  20380. s.RequestCharged = &v
  20381. return s
  20382. }
  20383. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  20384. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  20385. s.SSECustomerAlgorithm = &v
  20386. return s
  20387. }
  20388. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  20389. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  20390. s.SSECustomerKeyMD5 = &v
  20391. return s
  20392. }
  20393. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  20394. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  20395. s.SSEKMSKeyId = &v
  20396. return s
  20397. }
  20398. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  20399. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  20400. s.ServerSideEncryption = &v
  20401. return s
  20402. }
  20403. type VersioningConfiguration struct {
  20404. _ struct{} `type:"structure"`
  20405. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  20406. // This element is only returned if the bucket has been configured with MFA
  20407. // delete. If the bucket has never been so configured, this element is not returned.
  20408. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  20409. // The versioning state of the bucket.
  20410. Status *string `type:"string" enum:"BucketVersioningStatus"`
  20411. }
  20412. // String returns the string representation
  20413. func (s VersioningConfiguration) String() string {
  20414. return awsutil.Prettify(s)
  20415. }
  20416. // GoString returns the string representation
  20417. func (s VersioningConfiguration) GoString() string {
  20418. return s.String()
  20419. }
  20420. // SetMFADelete sets the MFADelete field's value.
  20421. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  20422. s.MFADelete = &v
  20423. return s
  20424. }
  20425. // SetStatus sets the Status field's value.
  20426. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  20427. s.Status = &v
  20428. return s
  20429. }
  20430. type WebsiteConfiguration struct {
  20431. _ struct{} `type:"structure"`
  20432. ErrorDocument *ErrorDocument `type:"structure"`
  20433. IndexDocument *IndexDocument `type:"structure"`
  20434. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  20435. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  20436. }
  20437. // String returns the string representation
  20438. func (s WebsiteConfiguration) String() string {
  20439. return awsutil.Prettify(s)
  20440. }
  20441. // GoString returns the string representation
  20442. func (s WebsiteConfiguration) GoString() string {
  20443. return s.String()
  20444. }
  20445. // Validate inspects the fields of the type to determine if they are valid.
  20446. func (s *WebsiteConfiguration) Validate() error {
  20447. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  20448. if s.ErrorDocument != nil {
  20449. if err := s.ErrorDocument.Validate(); err != nil {
  20450. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  20451. }
  20452. }
  20453. if s.IndexDocument != nil {
  20454. if err := s.IndexDocument.Validate(); err != nil {
  20455. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  20456. }
  20457. }
  20458. if s.RedirectAllRequestsTo != nil {
  20459. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  20460. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  20461. }
  20462. }
  20463. if s.RoutingRules != nil {
  20464. for i, v := range s.RoutingRules {
  20465. if v == nil {
  20466. continue
  20467. }
  20468. if err := v.Validate(); err != nil {
  20469. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  20470. }
  20471. }
  20472. }
  20473. if invalidParams.Len() > 0 {
  20474. return invalidParams
  20475. }
  20476. return nil
  20477. }
  20478. // SetErrorDocument sets the ErrorDocument field's value.
  20479. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  20480. s.ErrorDocument = v
  20481. return s
  20482. }
  20483. // SetIndexDocument sets the IndexDocument field's value.
  20484. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  20485. s.IndexDocument = v
  20486. return s
  20487. }
  20488. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  20489. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  20490. s.RedirectAllRequestsTo = v
  20491. return s
  20492. }
  20493. // SetRoutingRules sets the RoutingRules field's value.
  20494. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  20495. s.RoutingRules = v
  20496. return s
  20497. }
  20498. const (
  20499. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  20500. AnalyticsS3ExportFileFormatCsv = "CSV"
  20501. )
  20502. const (
  20503. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  20504. BucketAccelerateStatusEnabled = "Enabled"
  20505. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  20506. BucketAccelerateStatusSuspended = "Suspended"
  20507. )
  20508. const (
  20509. // BucketCannedACLPrivate is a BucketCannedACL enum value
  20510. BucketCannedACLPrivate = "private"
  20511. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  20512. BucketCannedACLPublicRead = "public-read"
  20513. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  20514. BucketCannedACLPublicReadWrite = "public-read-write"
  20515. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  20516. BucketCannedACLAuthenticatedRead = "authenticated-read"
  20517. )
  20518. const (
  20519. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  20520. BucketLocationConstraintEu = "EU"
  20521. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  20522. BucketLocationConstraintEuWest1 = "eu-west-1"
  20523. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  20524. BucketLocationConstraintUsWest1 = "us-west-1"
  20525. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  20526. BucketLocationConstraintUsWest2 = "us-west-2"
  20527. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  20528. BucketLocationConstraintApSouth1 = "ap-south-1"
  20529. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  20530. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  20531. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  20532. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  20533. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  20534. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  20535. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  20536. BucketLocationConstraintSaEast1 = "sa-east-1"
  20537. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  20538. BucketLocationConstraintCnNorth1 = "cn-north-1"
  20539. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  20540. BucketLocationConstraintEuCentral1 = "eu-central-1"
  20541. )
  20542. const (
  20543. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  20544. BucketLogsPermissionFullControl = "FULL_CONTROL"
  20545. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  20546. BucketLogsPermissionRead = "READ"
  20547. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  20548. BucketLogsPermissionWrite = "WRITE"
  20549. )
  20550. const (
  20551. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  20552. BucketVersioningStatusEnabled = "Enabled"
  20553. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  20554. BucketVersioningStatusSuspended = "Suspended"
  20555. )
  20556. const (
  20557. // CompressionTypeNone is a CompressionType enum value
  20558. CompressionTypeNone = "NONE"
  20559. // CompressionTypeGzip is a CompressionType enum value
  20560. CompressionTypeGzip = "GZIP"
  20561. // CompressionTypeBzip2 is a CompressionType enum value
  20562. CompressionTypeBzip2 = "BZIP2"
  20563. )
  20564. const (
  20565. // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
  20566. DeleteMarkerReplicationStatusEnabled = "Enabled"
  20567. // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
  20568. DeleteMarkerReplicationStatusDisabled = "Disabled"
  20569. )
  20570. // Requests Amazon S3 to encode the object keys in the response and specifies
  20571. // the encoding method to use. An object key may contain any Unicode character;
  20572. // however, XML 1.0 parser cannot parse some characters, such as characters
  20573. // with an ASCII value from 0 to 10. For characters that are not supported in
  20574. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  20575. // keys in the response.
  20576. const (
  20577. // EncodingTypeUrl is a EncodingType enum value
  20578. EncodingTypeUrl = "url"
  20579. )
  20580. // The bucket event for which to send notifications.
  20581. const (
  20582. // EventS3ReducedRedundancyLostObject is a Event enum value
  20583. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  20584. // EventS3ObjectCreated is a Event enum value
  20585. EventS3ObjectCreated = "s3:ObjectCreated:*"
  20586. // EventS3ObjectCreatedPut is a Event enum value
  20587. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  20588. // EventS3ObjectCreatedPost is a Event enum value
  20589. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  20590. // EventS3ObjectCreatedCopy is a Event enum value
  20591. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  20592. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  20593. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  20594. // EventS3ObjectRemoved is a Event enum value
  20595. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  20596. // EventS3ObjectRemovedDelete is a Event enum value
  20597. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  20598. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  20599. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  20600. // EventS3ObjectRestorePost is a Event enum value
  20601. EventS3ObjectRestorePost = "s3:ObjectRestore:Post"
  20602. // EventS3ObjectRestoreCompleted is a Event enum value
  20603. EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed"
  20604. )
  20605. const (
  20606. // ExpirationStatusEnabled is a ExpirationStatus enum value
  20607. ExpirationStatusEnabled = "Enabled"
  20608. // ExpirationStatusDisabled is a ExpirationStatus enum value
  20609. ExpirationStatusDisabled = "Disabled"
  20610. )
  20611. const (
  20612. // ExpressionTypeSql is a ExpressionType enum value
  20613. ExpressionTypeSql = "SQL"
  20614. )
  20615. const (
  20616. // FileHeaderInfoUse is a FileHeaderInfo enum value
  20617. FileHeaderInfoUse = "USE"
  20618. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  20619. FileHeaderInfoIgnore = "IGNORE"
  20620. // FileHeaderInfoNone is a FileHeaderInfo enum value
  20621. FileHeaderInfoNone = "NONE"
  20622. )
  20623. const (
  20624. // FilterRuleNamePrefix is a FilterRuleName enum value
  20625. FilterRuleNamePrefix = "prefix"
  20626. // FilterRuleNameSuffix is a FilterRuleName enum value
  20627. FilterRuleNameSuffix = "suffix"
  20628. )
  20629. const (
  20630. // InventoryFormatCsv is a InventoryFormat enum value
  20631. InventoryFormatCsv = "CSV"
  20632. // InventoryFormatOrc is a InventoryFormat enum value
  20633. InventoryFormatOrc = "ORC"
  20634. // InventoryFormatParquet is a InventoryFormat enum value
  20635. InventoryFormatParquet = "Parquet"
  20636. )
  20637. const (
  20638. // InventoryFrequencyDaily is a InventoryFrequency enum value
  20639. InventoryFrequencyDaily = "Daily"
  20640. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  20641. InventoryFrequencyWeekly = "Weekly"
  20642. )
  20643. const (
  20644. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  20645. InventoryIncludedObjectVersionsAll = "All"
  20646. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  20647. InventoryIncludedObjectVersionsCurrent = "Current"
  20648. )
  20649. const (
  20650. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  20651. InventoryOptionalFieldSize = "Size"
  20652. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  20653. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  20654. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  20655. InventoryOptionalFieldStorageClass = "StorageClass"
  20656. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  20657. InventoryOptionalFieldEtag = "ETag"
  20658. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  20659. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  20660. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  20661. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  20662. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  20663. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  20664. // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value
  20665. InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate"
  20666. // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value
  20667. InventoryOptionalFieldObjectLockMode = "ObjectLockMode"
  20668. // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
  20669. InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
  20670. )
  20671. const (
  20672. // JSONTypeDocument is a JSONType enum value
  20673. JSONTypeDocument = "DOCUMENT"
  20674. // JSONTypeLines is a JSONType enum value
  20675. JSONTypeLines = "LINES"
  20676. )
  20677. const (
  20678. // MFADeleteEnabled is a MFADelete enum value
  20679. MFADeleteEnabled = "Enabled"
  20680. // MFADeleteDisabled is a MFADelete enum value
  20681. MFADeleteDisabled = "Disabled"
  20682. )
  20683. const (
  20684. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  20685. MFADeleteStatusEnabled = "Enabled"
  20686. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  20687. MFADeleteStatusDisabled = "Disabled"
  20688. )
  20689. const (
  20690. // MetadataDirectiveCopy is a MetadataDirective enum value
  20691. MetadataDirectiveCopy = "COPY"
  20692. // MetadataDirectiveReplace is a MetadataDirective enum value
  20693. MetadataDirectiveReplace = "REPLACE"
  20694. )
  20695. const (
  20696. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  20697. ObjectCannedACLPrivate = "private"
  20698. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  20699. ObjectCannedACLPublicRead = "public-read"
  20700. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  20701. ObjectCannedACLPublicReadWrite = "public-read-write"
  20702. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  20703. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  20704. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  20705. ObjectCannedACLAwsExecRead = "aws-exec-read"
  20706. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  20707. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  20708. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  20709. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  20710. )
  20711. const (
  20712. // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value
  20713. ObjectLockEnabledEnabled = "Enabled"
  20714. )
  20715. const (
  20716. // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value
  20717. ObjectLockLegalHoldStatusOn = "ON"
  20718. // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value
  20719. ObjectLockLegalHoldStatusOff = "OFF"
  20720. )
  20721. const (
  20722. // ObjectLockModeGovernance is a ObjectLockMode enum value
  20723. ObjectLockModeGovernance = "GOVERNANCE"
  20724. // ObjectLockModeCompliance is a ObjectLockMode enum value
  20725. ObjectLockModeCompliance = "COMPLIANCE"
  20726. )
  20727. const (
  20728. // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value
  20729. ObjectLockRetentionModeGovernance = "GOVERNANCE"
  20730. // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value
  20731. ObjectLockRetentionModeCompliance = "COMPLIANCE"
  20732. )
  20733. const (
  20734. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  20735. ObjectStorageClassStandard = "STANDARD"
  20736. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  20737. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  20738. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  20739. ObjectStorageClassGlacier = "GLACIER"
  20740. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  20741. ObjectStorageClassStandardIa = "STANDARD_IA"
  20742. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  20743. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  20744. // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
  20745. ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20746. )
  20747. const (
  20748. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  20749. ObjectVersionStorageClassStandard = "STANDARD"
  20750. )
  20751. const (
  20752. // OwnerOverrideDestination is a OwnerOverride enum value
  20753. OwnerOverrideDestination = "Destination"
  20754. )
  20755. const (
  20756. // PayerRequester is a Payer enum value
  20757. PayerRequester = "Requester"
  20758. // PayerBucketOwner is a Payer enum value
  20759. PayerBucketOwner = "BucketOwner"
  20760. )
  20761. const (
  20762. // PermissionFullControl is a Permission enum value
  20763. PermissionFullControl = "FULL_CONTROL"
  20764. // PermissionWrite is a Permission enum value
  20765. PermissionWrite = "WRITE"
  20766. // PermissionWriteAcp is a Permission enum value
  20767. PermissionWriteAcp = "WRITE_ACP"
  20768. // PermissionRead is a Permission enum value
  20769. PermissionRead = "READ"
  20770. // PermissionReadAcp is a Permission enum value
  20771. PermissionReadAcp = "READ_ACP"
  20772. )
  20773. const (
  20774. // ProtocolHttp is a Protocol enum value
  20775. ProtocolHttp = "http"
  20776. // ProtocolHttps is a Protocol enum value
  20777. ProtocolHttps = "https"
  20778. )
  20779. const (
  20780. // QuoteFieldsAlways is a QuoteFields enum value
  20781. QuoteFieldsAlways = "ALWAYS"
  20782. // QuoteFieldsAsneeded is a QuoteFields enum value
  20783. QuoteFieldsAsneeded = "ASNEEDED"
  20784. )
  20785. const (
  20786. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  20787. ReplicationRuleStatusEnabled = "Enabled"
  20788. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  20789. ReplicationRuleStatusDisabled = "Disabled"
  20790. )
  20791. const (
  20792. // ReplicationStatusComplete is a ReplicationStatus enum value
  20793. ReplicationStatusComplete = "COMPLETE"
  20794. // ReplicationStatusPending is a ReplicationStatus enum value
  20795. ReplicationStatusPending = "PENDING"
  20796. // ReplicationStatusFailed is a ReplicationStatus enum value
  20797. ReplicationStatusFailed = "FAILED"
  20798. // ReplicationStatusReplica is a ReplicationStatus enum value
  20799. ReplicationStatusReplica = "REPLICA"
  20800. )
  20801. // If present, indicates that the requester was successfully charged for the
  20802. // request.
  20803. const (
  20804. // RequestChargedRequester is a RequestCharged enum value
  20805. RequestChargedRequester = "requester"
  20806. )
  20807. // Confirms that the requester knows that she or he will be charged for the
  20808. // request. Bucket owners need not specify this parameter in their requests.
  20809. // Documentation on downloading objects from requester pays buckets can be found
  20810. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  20811. const (
  20812. // RequestPayerRequester is a RequestPayer enum value
  20813. RequestPayerRequester = "requester"
  20814. )
  20815. const (
  20816. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  20817. RestoreRequestTypeSelect = "SELECT"
  20818. )
  20819. const (
  20820. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  20821. ServerSideEncryptionAes256 = "AES256"
  20822. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  20823. ServerSideEncryptionAwsKms = "aws:kms"
  20824. )
  20825. const (
  20826. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  20827. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  20828. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  20829. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  20830. )
  20831. const (
  20832. // StorageClassStandard is a StorageClass enum value
  20833. StorageClassStandard = "STANDARD"
  20834. // StorageClassReducedRedundancy is a StorageClass enum value
  20835. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  20836. // StorageClassStandardIa is a StorageClass enum value
  20837. StorageClassStandardIa = "STANDARD_IA"
  20838. // StorageClassOnezoneIa is a StorageClass enum value
  20839. StorageClassOnezoneIa = "ONEZONE_IA"
  20840. // StorageClassIntelligentTiering is a StorageClass enum value
  20841. StorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20842. // StorageClassGlacier is a StorageClass enum value
  20843. StorageClassGlacier = "GLACIER"
  20844. )
  20845. const (
  20846. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  20847. StorageClassAnalysisSchemaVersionV1 = "V_1"
  20848. )
  20849. const (
  20850. // TaggingDirectiveCopy is a TaggingDirective enum value
  20851. TaggingDirectiveCopy = "COPY"
  20852. // TaggingDirectiveReplace is a TaggingDirective enum value
  20853. TaggingDirectiveReplace = "REPLACE"
  20854. )
  20855. const (
  20856. // TierStandard is a Tier enum value
  20857. TierStandard = "Standard"
  20858. // TierBulk is a Tier enum value
  20859. TierBulk = "Bulk"
  20860. // TierExpedited is a Tier enum value
  20861. TierExpedited = "Expedited"
  20862. )
  20863. const (
  20864. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  20865. TransitionStorageClassGlacier = "GLACIER"
  20866. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  20867. TransitionStorageClassStandardIa = "STANDARD_IA"
  20868. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  20869. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  20870. // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value
  20871. TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
  20872. )
  20873. const (
  20874. // TypeCanonicalUser is a Type enum value
  20875. TypeCanonicalUser = "CanonicalUser"
  20876. // TypeAmazonCustomerByEmail is a Type enum value
  20877. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  20878. // TypeGroup is a Type enum value
  20879. TypeGroup = "Group"
  20880. )