api.go 661 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. // Package s3 provides a client for Amazon Simple Storage Service.
  3. package s3
  4. import (
  5. "fmt"
  6. "io"
  7. "time"
  8. "github.com/aws/aws-sdk-go/aws"
  9. "github.com/aws/aws-sdk-go/aws/awsutil"
  10. "github.com/aws/aws-sdk-go/aws/request"
  11. "github.com/aws/aws-sdk-go/private/protocol"
  12. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  13. )
  14. const opAbortMultipartUpload = "AbortMultipartUpload"
  15. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  16. // client's request for the AbortMultipartUpload operation. The "output" return
  17. // value can be used to capture response data after the request's "Send" method
  18. // is called.
  19. //
  20. // See AbortMultipartUpload for usage and error information.
  21. //
  22. // Creating a request object using this method should be used when you want to inject
  23. // custom logic into the request's lifecycle using a custom handler, or if you want to
  24. // access properties on the request object before or after sending the request. If
  25. // you just want the service response, call the AbortMultipartUpload method directly
  26. // instead.
  27. //
  28. // Note: You must call the "Send" method on the returned request object in order
  29. // to execute the request.
  30. //
  31. // // Example sending a request using the AbortMultipartUploadRequest method.
  32. // req, resp := client.AbortMultipartUploadRequest(params)
  33. //
  34. // err := req.Send()
  35. // if err == nil { // resp is now filled
  36. // fmt.Println(resp)
  37. // }
  38. //
  39. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  40. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  41. op := &request.Operation{
  42. Name: opAbortMultipartUpload,
  43. HTTPMethod: "DELETE",
  44. HTTPPath: "/{Bucket}/{Key+}",
  45. }
  46. if input == nil {
  47. input = &AbortMultipartUploadInput{}
  48. }
  49. output = &AbortMultipartUploadOutput{}
  50. req = c.newRequest(op, input, output)
  51. return
  52. }
  53. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  54. //
  55. // Aborts a multipart upload.
  56. //
  57. // To verify that all parts have been removed, so you don't get charged for
  58. // the part storage, you should call the List Parts operation and ensure the
  59. // parts list is empty.
  60. //
  61. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  62. // with awserr.Error's Code and Message methods to get detailed information about
  63. // the error.
  64. //
  65. // See the AWS API reference guide for Amazon Simple Storage Service's
  66. // API operation AbortMultipartUpload for usage and error information.
  67. //
  68. // Returned Error Codes:
  69. // * ErrCodeNoSuchUpload "NoSuchUpload"
  70. // The specified multipart upload does not exist.
  71. //
  72. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  73. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  74. req, out := c.AbortMultipartUploadRequest(input)
  75. return out, req.Send()
  76. }
  77. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  78. // the ability to pass a context and additional request options.
  79. //
  80. // See AbortMultipartUpload for details on how to use this API operation.
  81. //
  82. // The context must be non-nil and will be used for request cancellation. If
  83. // the context is nil a panic will occur. In the future the SDK may create
  84. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  85. // for more information on using Contexts.
  86. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  87. req, out := c.AbortMultipartUploadRequest(input)
  88. req.SetContext(ctx)
  89. req.ApplyOptions(opts...)
  90. return out, req.Send()
  91. }
  92. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  93. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  94. // client's request for the CompleteMultipartUpload operation. The "output" return
  95. // value can be used to capture response data after the request's "Send" method
  96. // is called.
  97. //
  98. // See CompleteMultipartUpload for usage and error information.
  99. //
  100. // Creating a request object using this method should be used when you want to inject
  101. // custom logic into the request's lifecycle using a custom handler, or if you want to
  102. // access properties on the request object before or after sending the request. If
  103. // you just want the service response, call the CompleteMultipartUpload method directly
  104. // instead.
  105. //
  106. // Note: You must call the "Send" method on the returned request object in order
  107. // to execute the request.
  108. //
  109. // // Example sending a request using the CompleteMultipartUploadRequest method.
  110. // req, resp := client.CompleteMultipartUploadRequest(params)
  111. //
  112. // err := req.Send()
  113. // if err == nil { // resp is now filled
  114. // fmt.Println(resp)
  115. // }
  116. //
  117. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  118. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  119. op := &request.Operation{
  120. Name: opCompleteMultipartUpload,
  121. HTTPMethod: "POST",
  122. HTTPPath: "/{Bucket}/{Key+}",
  123. }
  124. if input == nil {
  125. input = &CompleteMultipartUploadInput{}
  126. }
  127. output = &CompleteMultipartUploadOutput{}
  128. req = c.newRequest(op, input, output)
  129. return
  130. }
  131. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  132. //
  133. // Completes a multipart upload by assembling previously uploaded parts.
  134. //
  135. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  136. // with awserr.Error's Code and Message methods to get detailed information about
  137. // the error.
  138. //
  139. // See the AWS API reference guide for Amazon Simple Storage Service's
  140. // API operation CompleteMultipartUpload for usage and error information.
  141. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  142. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  143. req, out := c.CompleteMultipartUploadRequest(input)
  144. return out, req.Send()
  145. }
  146. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  147. // the ability to pass a context and additional request options.
  148. //
  149. // See CompleteMultipartUpload for details on how to use this API operation.
  150. //
  151. // The context must be non-nil and will be used for request cancellation. If
  152. // the context is nil a panic will occur. In the future the SDK may create
  153. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  154. // for more information on using Contexts.
  155. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  156. req, out := c.CompleteMultipartUploadRequest(input)
  157. req.SetContext(ctx)
  158. req.ApplyOptions(opts...)
  159. return out, req.Send()
  160. }
  161. const opCopyObject = "CopyObject"
  162. // CopyObjectRequest generates a "aws/request.Request" representing the
  163. // client's request for the CopyObject operation. The "output" return
  164. // value can be used to capture response data after the request's "Send" method
  165. // is called.
  166. //
  167. // See CopyObject for usage and error information.
  168. //
  169. // Creating a request object using this method should be used when you want to inject
  170. // custom logic into the request's lifecycle using a custom handler, or if you want to
  171. // access properties on the request object before or after sending the request. If
  172. // you just want the service response, call the CopyObject method directly
  173. // instead.
  174. //
  175. // Note: You must call the "Send" method on the returned request object in order
  176. // to execute the request.
  177. //
  178. // // Example sending a request using the CopyObjectRequest method.
  179. // req, resp := client.CopyObjectRequest(params)
  180. //
  181. // err := req.Send()
  182. // if err == nil { // resp is now filled
  183. // fmt.Println(resp)
  184. // }
  185. //
  186. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  187. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  188. op := &request.Operation{
  189. Name: opCopyObject,
  190. HTTPMethod: "PUT",
  191. HTTPPath: "/{Bucket}/{Key+}",
  192. }
  193. if input == nil {
  194. input = &CopyObjectInput{}
  195. }
  196. output = &CopyObjectOutput{}
  197. req = c.newRequest(op, input, output)
  198. return
  199. }
  200. // CopyObject API operation for Amazon Simple Storage Service.
  201. //
  202. // Creates a copy of an object that is already stored in Amazon S3.
  203. //
  204. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  205. // with awserr.Error's Code and Message methods to get detailed information about
  206. // the error.
  207. //
  208. // See the AWS API reference guide for Amazon Simple Storage Service's
  209. // API operation CopyObject for usage and error information.
  210. //
  211. // Returned Error Codes:
  212. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  213. // The source object of the COPY operation is not in the active tier and is
  214. // only stored in Amazon Glacier.
  215. //
  216. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  217. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  218. req, out := c.CopyObjectRequest(input)
  219. return out, req.Send()
  220. }
  221. // CopyObjectWithContext is the same as CopyObject with the addition of
  222. // the ability to pass a context and additional request options.
  223. //
  224. // See CopyObject for details on how to use this API operation.
  225. //
  226. // The context must be non-nil and will be used for request cancellation. If
  227. // the context is nil a panic will occur. In the future the SDK may create
  228. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  229. // for more information on using Contexts.
  230. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  231. req, out := c.CopyObjectRequest(input)
  232. req.SetContext(ctx)
  233. req.ApplyOptions(opts...)
  234. return out, req.Send()
  235. }
  236. const opCreateBucket = "CreateBucket"
  237. // CreateBucketRequest generates a "aws/request.Request" representing the
  238. // client's request for the CreateBucket operation. The "output" return
  239. // value can be used to capture response data after the request's "Send" method
  240. // is called.
  241. //
  242. // See CreateBucket for usage and error information.
  243. //
  244. // Creating a request object using this method should be used when you want to inject
  245. // custom logic into the request's lifecycle using a custom handler, or if you want to
  246. // access properties on the request object before or after sending the request. If
  247. // you just want the service response, call the CreateBucket method directly
  248. // instead.
  249. //
  250. // Note: You must call the "Send" method on the returned request object in order
  251. // to execute the request.
  252. //
  253. // // Example sending a request using the CreateBucketRequest method.
  254. // req, resp := client.CreateBucketRequest(params)
  255. //
  256. // err := req.Send()
  257. // if err == nil { // resp is now filled
  258. // fmt.Println(resp)
  259. // }
  260. //
  261. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  262. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  263. op := &request.Operation{
  264. Name: opCreateBucket,
  265. HTTPMethod: "PUT",
  266. HTTPPath: "/{Bucket}",
  267. }
  268. if input == nil {
  269. input = &CreateBucketInput{}
  270. }
  271. output = &CreateBucketOutput{}
  272. req = c.newRequest(op, input, output)
  273. return
  274. }
  275. // CreateBucket API operation for Amazon Simple Storage Service.
  276. //
  277. // Creates a new bucket.
  278. //
  279. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  280. // with awserr.Error's Code and Message methods to get detailed information about
  281. // the error.
  282. //
  283. // See the AWS API reference guide for Amazon Simple Storage Service's
  284. // API operation CreateBucket for usage and error information.
  285. //
  286. // Returned Error Codes:
  287. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  288. // The requested bucket name is not available. The bucket namespace is shared
  289. // by all users of the system. Please select a different name and try again.
  290. //
  291. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  292. //
  293. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  294. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  295. req, out := c.CreateBucketRequest(input)
  296. return out, req.Send()
  297. }
  298. // CreateBucketWithContext is the same as CreateBucket with the addition of
  299. // the ability to pass a context and additional request options.
  300. //
  301. // See CreateBucket for details on how to use this API operation.
  302. //
  303. // The context must be non-nil and will be used for request cancellation. If
  304. // the context is nil a panic will occur. In the future the SDK may create
  305. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  306. // for more information on using Contexts.
  307. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  308. req, out := c.CreateBucketRequest(input)
  309. req.SetContext(ctx)
  310. req.ApplyOptions(opts...)
  311. return out, req.Send()
  312. }
  313. const opCreateMultipartUpload = "CreateMultipartUpload"
  314. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  315. // client's request for the CreateMultipartUpload operation. The "output" return
  316. // value can be used to capture response data after the request's "Send" method
  317. // is called.
  318. //
  319. // See CreateMultipartUpload for usage and error information.
  320. //
  321. // Creating a request object using this method should be used when you want to inject
  322. // custom logic into the request's lifecycle using a custom handler, or if you want to
  323. // access properties on the request object before or after sending the request. If
  324. // you just want the service response, call the CreateMultipartUpload method directly
  325. // instead.
  326. //
  327. // Note: You must call the "Send" method on the returned request object in order
  328. // to execute the request.
  329. //
  330. // // Example sending a request using the CreateMultipartUploadRequest method.
  331. // req, resp := client.CreateMultipartUploadRequest(params)
  332. //
  333. // err := req.Send()
  334. // if err == nil { // resp is now filled
  335. // fmt.Println(resp)
  336. // }
  337. //
  338. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  339. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  340. op := &request.Operation{
  341. Name: opCreateMultipartUpload,
  342. HTTPMethod: "POST",
  343. HTTPPath: "/{Bucket}/{Key+}?uploads",
  344. }
  345. if input == nil {
  346. input = &CreateMultipartUploadInput{}
  347. }
  348. output = &CreateMultipartUploadOutput{}
  349. req = c.newRequest(op, input, output)
  350. return
  351. }
  352. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  353. //
  354. // Initiates a multipart upload and returns an upload ID.
  355. //
  356. // Note: After you initiate multipart upload and upload one or more parts, you
  357. // must either complete or abort multipart upload in order to stop getting charged
  358. // for storage of the uploaded parts. Only after you either complete or abort
  359. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  360. // you for the parts storage.
  361. //
  362. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  363. // with awserr.Error's Code and Message methods to get detailed information about
  364. // the error.
  365. //
  366. // See the AWS API reference guide for Amazon Simple Storage Service's
  367. // API operation CreateMultipartUpload for usage and error information.
  368. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  369. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  370. req, out := c.CreateMultipartUploadRequest(input)
  371. return out, req.Send()
  372. }
  373. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  374. // the ability to pass a context and additional request options.
  375. //
  376. // See CreateMultipartUpload for details on how to use this API operation.
  377. //
  378. // The context must be non-nil and will be used for request cancellation. If
  379. // the context is nil a panic will occur. In the future the SDK may create
  380. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  381. // for more information on using Contexts.
  382. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  383. req, out := c.CreateMultipartUploadRequest(input)
  384. req.SetContext(ctx)
  385. req.ApplyOptions(opts...)
  386. return out, req.Send()
  387. }
  388. const opDeleteBucket = "DeleteBucket"
  389. // DeleteBucketRequest generates a "aws/request.Request" representing the
  390. // client's request for the DeleteBucket operation. The "output" return
  391. // value can be used to capture response data after the request's "Send" method
  392. // is called.
  393. //
  394. // See DeleteBucket for usage and error information.
  395. //
  396. // Creating a request object using this method should be used when you want to inject
  397. // custom logic into the request's lifecycle using a custom handler, or if you want to
  398. // access properties on the request object before or after sending the request. If
  399. // you just want the service response, call the DeleteBucket method directly
  400. // instead.
  401. //
  402. // Note: You must call the "Send" method on the returned request object in order
  403. // to execute the request.
  404. //
  405. // // Example sending a request using the DeleteBucketRequest method.
  406. // req, resp := client.DeleteBucketRequest(params)
  407. //
  408. // err := req.Send()
  409. // if err == nil { // resp is now filled
  410. // fmt.Println(resp)
  411. // }
  412. //
  413. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  414. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  415. op := &request.Operation{
  416. Name: opDeleteBucket,
  417. HTTPMethod: "DELETE",
  418. HTTPPath: "/{Bucket}",
  419. }
  420. if input == nil {
  421. input = &DeleteBucketInput{}
  422. }
  423. output = &DeleteBucketOutput{}
  424. req = c.newRequest(op, input, output)
  425. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  426. req.Handlers.Unmarshal.PushBackNamed(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. // Please also see 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 can be used to capture response data after the request's "Send" method
  464. // is called.
  465. //
  466. // See DeleteBucketAnalyticsConfiguration for usage and error information.
  467. //
  468. // Creating a request object using this method should be used when you want to inject
  469. // custom logic into the request's lifecycle using a custom handler, or if you want to
  470. // access properties on the request object before or after sending the request. If
  471. // you just want the service response, call the DeleteBucketAnalyticsConfiguration method directly
  472. // instead.
  473. //
  474. // Note: You must call the "Send" method on the returned request object in order
  475. // to execute the request.
  476. //
  477. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  478. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  479. //
  480. // err := req.Send()
  481. // if err == nil { // resp is now filled
  482. // fmt.Println(resp)
  483. // }
  484. //
  485. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  486. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  487. op := &request.Operation{
  488. Name: opDeleteBucketAnalyticsConfiguration,
  489. HTTPMethod: "DELETE",
  490. HTTPPath: "/{Bucket}?analytics",
  491. }
  492. if input == nil {
  493. input = &DeleteBucketAnalyticsConfigurationInput{}
  494. }
  495. output = &DeleteBucketAnalyticsConfigurationOutput{}
  496. req = c.newRequest(op, input, output)
  497. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  498. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  499. return
  500. }
  501. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  502. //
  503. // Deletes an analytics configuration for the bucket (specified by the analytics
  504. // configuration ID).
  505. //
  506. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  507. // with awserr.Error's Code and Message methods to get detailed information about
  508. // the error.
  509. //
  510. // See the AWS API reference guide for Amazon Simple Storage Service's
  511. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  512. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  513. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  514. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  515. return out, req.Send()
  516. }
  517. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  518. // the ability to pass a context and additional request options.
  519. //
  520. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  521. //
  522. // The context must be non-nil and will be used for request cancellation. If
  523. // the context is nil a panic will occur. In the future the SDK may create
  524. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  525. // for more information on using Contexts.
  526. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  527. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  528. req.SetContext(ctx)
  529. req.ApplyOptions(opts...)
  530. return out, req.Send()
  531. }
  532. const opDeleteBucketCors = "DeleteBucketCors"
  533. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  534. // client's request for the DeleteBucketCors operation. The "output" return
  535. // value can be used to capture response data after the request's "Send" method
  536. // is called.
  537. //
  538. // See DeleteBucketCors for usage and error information.
  539. //
  540. // Creating a request object using this method should be used when you want to inject
  541. // custom logic into the request's lifecycle using a custom handler, or if you want to
  542. // access properties on the request object before or after sending the request. If
  543. // you just want the service response, call the DeleteBucketCors method directly
  544. // instead.
  545. //
  546. // Note: You must call the "Send" method on the returned request object in order
  547. // to execute the request.
  548. //
  549. // // Example sending a request using the DeleteBucketCorsRequest method.
  550. // req, resp := client.DeleteBucketCorsRequest(params)
  551. //
  552. // err := req.Send()
  553. // if err == nil { // resp is now filled
  554. // fmt.Println(resp)
  555. // }
  556. //
  557. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  558. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  559. op := &request.Operation{
  560. Name: opDeleteBucketCors,
  561. HTTPMethod: "DELETE",
  562. HTTPPath: "/{Bucket}?cors",
  563. }
  564. if input == nil {
  565. input = &DeleteBucketCorsInput{}
  566. }
  567. output = &DeleteBucketCorsOutput{}
  568. req = c.newRequest(op, input, output)
  569. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  570. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  571. return
  572. }
  573. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  574. //
  575. // Deletes the cors configuration information set for the bucket.
  576. //
  577. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  578. // with awserr.Error's Code and Message methods to get detailed information about
  579. // the error.
  580. //
  581. // See the AWS API reference guide for Amazon Simple Storage Service's
  582. // API operation DeleteBucketCors for usage and error information.
  583. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  584. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  585. req, out := c.DeleteBucketCorsRequest(input)
  586. return out, req.Send()
  587. }
  588. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  589. // the ability to pass a context and additional request options.
  590. //
  591. // See DeleteBucketCors for details on how to use this API operation.
  592. //
  593. // The context must be non-nil and will be used for request cancellation. If
  594. // the context is nil a panic will occur. In the future the SDK may create
  595. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  596. // for more information on using Contexts.
  597. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  598. req, out := c.DeleteBucketCorsRequest(input)
  599. req.SetContext(ctx)
  600. req.ApplyOptions(opts...)
  601. return out, req.Send()
  602. }
  603. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  604. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  605. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  606. // value can be used to capture response data after the request's "Send" method
  607. // is called.
  608. //
  609. // See DeleteBucketInventoryConfiguration for usage and error information.
  610. //
  611. // Creating a request object using this method should be used when you want to inject
  612. // custom logic into the request's lifecycle using a custom handler, or if you want to
  613. // access properties on the request object before or after sending the request. If
  614. // you just want the service response, call the DeleteBucketInventoryConfiguration method directly
  615. // instead.
  616. //
  617. // Note: You must call the "Send" method on the returned request object in order
  618. // to execute the request.
  619. //
  620. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  621. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  622. //
  623. // err := req.Send()
  624. // if err == nil { // resp is now filled
  625. // fmt.Println(resp)
  626. // }
  627. //
  628. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  629. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  630. op := &request.Operation{
  631. Name: opDeleteBucketInventoryConfiguration,
  632. HTTPMethod: "DELETE",
  633. HTTPPath: "/{Bucket}?inventory",
  634. }
  635. if input == nil {
  636. input = &DeleteBucketInventoryConfigurationInput{}
  637. }
  638. output = &DeleteBucketInventoryConfigurationOutput{}
  639. req = c.newRequest(op, input, output)
  640. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  641. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  642. return
  643. }
  644. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  645. //
  646. // Deletes an inventory configuration (identified by the inventory ID) from
  647. // the bucket.
  648. //
  649. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  650. // with awserr.Error's Code and Message methods to get detailed information about
  651. // the error.
  652. //
  653. // See the AWS API reference guide for Amazon Simple Storage Service's
  654. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  655. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  656. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  657. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  658. return out, req.Send()
  659. }
  660. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  661. // the ability to pass a context and additional request options.
  662. //
  663. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  664. //
  665. // The context must be non-nil and will be used for request cancellation. If
  666. // the context is nil a panic will occur. In the future the SDK may create
  667. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  668. // for more information on using Contexts.
  669. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  670. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  671. req.SetContext(ctx)
  672. req.ApplyOptions(opts...)
  673. return out, req.Send()
  674. }
  675. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  676. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  677. // client's request for the DeleteBucketLifecycle operation. The "output" return
  678. // value can be used to capture response data after the request's "Send" method
  679. // is called.
  680. //
  681. // See DeleteBucketLifecycle for usage and error information.
  682. //
  683. // Creating a request object using this method should be used when you want to inject
  684. // custom logic into the request's lifecycle using a custom handler, or if you want to
  685. // access properties on the request object before or after sending the request. If
  686. // you just want the service response, call the DeleteBucketLifecycle method directly
  687. // instead.
  688. //
  689. // Note: You must call the "Send" method on the returned request object in order
  690. // to execute the request.
  691. //
  692. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  693. // req, resp := client.DeleteBucketLifecycleRequest(params)
  694. //
  695. // err := req.Send()
  696. // if err == nil { // resp is now filled
  697. // fmt.Println(resp)
  698. // }
  699. //
  700. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  701. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  702. op := &request.Operation{
  703. Name: opDeleteBucketLifecycle,
  704. HTTPMethod: "DELETE",
  705. HTTPPath: "/{Bucket}?lifecycle",
  706. }
  707. if input == nil {
  708. input = &DeleteBucketLifecycleInput{}
  709. }
  710. output = &DeleteBucketLifecycleOutput{}
  711. req = c.newRequest(op, input, output)
  712. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  713. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  714. return
  715. }
  716. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  717. //
  718. // Deletes the lifecycle configuration from the bucket.
  719. //
  720. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  721. // with awserr.Error's Code and Message methods to get detailed information about
  722. // the error.
  723. //
  724. // See the AWS API reference guide for Amazon Simple Storage Service's
  725. // API operation DeleteBucketLifecycle for usage and error information.
  726. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  727. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  728. req, out := c.DeleteBucketLifecycleRequest(input)
  729. return out, req.Send()
  730. }
  731. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  732. // the ability to pass a context and additional request options.
  733. //
  734. // See DeleteBucketLifecycle for details on how to use this API operation.
  735. //
  736. // The context must be non-nil and will be used for request cancellation. If
  737. // the context is nil a panic will occur. In the future the SDK may create
  738. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  739. // for more information on using Contexts.
  740. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  741. req, out := c.DeleteBucketLifecycleRequest(input)
  742. req.SetContext(ctx)
  743. req.ApplyOptions(opts...)
  744. return out, req.Send()
  745. }
  746. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  747. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  748. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  749. // value can be used to capture response data after the request's "Send" method
  750. // is called.
  751. //
  752. // See DeleteBucketMetricsConfiguration for usage and error information.
  753. //
  754. // Creating a request object using this method should be used when you want to inject
  755. // custom logic into the request's lifecycle using a custom handler, or if you want to
  756. // access properties on the request object before or after sending the request. If
  757. // you just want the service response, call the DeleteBucketMetricsConfiguration method directly
  758. // instead.
  759. //
  760. // Note: You must call the "Send" method on the returned request object in order
  761. // to execute the request.
  762. //
  763. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  764. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  765. //
  766. // err := req.Send()
  767. // if err == nil { // resp is now filled
  768. // fmt.Println(resp)
  769. // }
  770. //
  771. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  772. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  773. op := &request.Operation{
  774. Name: opDeleteBucketMetricsConfiguration,
  775. HTTPMethod: "DELETE",
  776. HTTPPath: "/{Bucket}?metrics",
  777. }
  778. if input == nil {
  779. input = &DeleteBucketMetricsConfigurationInput{}
  780. }
  781. output = &DeleteBucketMetricsConfigurationOutput{}
  782. req = c.newRequest(op, input, output)
  783. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  784. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  785. return
  786. }
  787. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  788. //
  789. // Deletes a metrics configuration (specified by the metrics configuration ID)
  790. // from the bucket.
  791. //
  792. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  793. // with awserr.Error's Code and Message methods to get detailed information about
  794. // the error.
  795. //
  796. // See the AWS API reference guide for Amazon Simple Storage Service's
  797. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  798. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  799. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  800. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  801. return out, req.Send()
  802. }
  803. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  804. // the ability to pass a context and additional request options.
  805. //
  806. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  807. //
  808. // The context must be non-nil and will be used for request cancellation. If
  809. // the context is nil a panic will occur. In the future the SDK may create
  810. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  811. // for more information on using Contexts.
  812. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  813. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  814. req.SetContext(ctx)
  815. req.ApplyOptions(opts...)
  816. return out, req.Send()
  817. }
  818. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  819. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  820. // client's request for the DeleteBucketPolicy operation. The "output" return
  821. // value can be used to capture response data after the request's "Send" method
  822. // is called.
  823. //
  824. // See DeleteBucketPolicy for usage and error information.
  825. //
  826. // Creating a request object using this method should be used when you want to inject
  827. // custom logic into the request's lifecycle using a custom handler, or if you want to
  828. // access properties on the request object before or after sending the request. If
  829. // you just want the service response, call the DeleteBucketPolicy method directly
  830. // instead.
  831. //
  832. // Note: You must call the "Send" method on the returned request object in order
  833. // to execute the request.
  834. //
  835. // // Example sending a request using the DeleteBucketPolicyRequest method.
  836. // req, resp := client.DeleteBucketPolicyRequest(params)
  837. //
  838. // err := req.Send()
  839. // if err == nil { // resp is now filled
  840. // fmt.Println(resp)
  841. // }
  842. //
  843. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  844. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  845. op := &request.Operation{
  846. Name: opDeleteBucketPolicy,
  847. HTTPMethod: "DELETE",
  848. HTTPPath: "/{Bucket}?policy",
  849. }
  850. if input == nil {
  851. input = &DeleteBucketPolicyInput{}
  852. }
  853. output = &DeleteBucketPolicyOutput{}
  854. req = c.newRequest(op, input, output)
  855. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  856. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  857. return
  858. }
  859. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  860. //
  861. // Deletes the policy from the bucket.
  862. //
  863. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  864. // with awserr.Error's Code and Message methods to get detailed information about
  865. // the error.
  866. //
  867. // See the AWS API reference guide for Amazon Simple Storage Service's
  868. // API operation DeleteBucketPolicy for usage and error information.
  869. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  870. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  871. req, out := c.DeleteBucketPolicyRequest(input)
  872. return out, req.Send()
  873. }
  874. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  875. // the ability to pass a context and additional request options.
  876. //
  877. // See DeleteBucketPolicy for details on how to use this API operation.
  878. //
  879. // The context must be non-nil and will be used for request cancellation. If
  880. // the context is nil a panic will occur. In the future the SDK may create
  881. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  882. // for more information on using Contexts.
  883. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  884. req, out := c.DeleteBucketPolicyRequest(input)
  885. req.SetContext(ctx)
  886. req.ApplyOptions(opts...)
  887. return out, req.Send()
  888. }
  889. const opDeleteBucketReplication = "DeleteBucketReplication"
  890. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  891. // client's request for the DeleteBucketReplication operation. The "output" return
  892. // value can be used to capture response data after the request's "Send" method
  893. // is called.
  894. //
  895. // See DeleteBucketReplication for usage and error information.
  896. //
  897. // Creating a request object using this method should be used when you want to inject
  898. // custom logic into the request's lifecycle using a custom handler, or if you want to
  899. // access properties on the request object before or after sending the request. If
  900. // you just want the service response, call the DeleteBucketReplication method directly
  901. // instead.
  902. //
  903. // Note: You must call the "Send" method on the returned request object in order
  904. // to execute the request.
  905. //
  906. // // Example sending a request using the DeleteBucketReplicationRequest method.
  907. // req, resp := client.DeleteBucketReplicationRequest(params)
  908. //
  909. // err := req.Send()
  910. // if err == nil { // resp is now filled
  911. // fmt.Println(resp)
  912. // }
  913. //
  914. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  915. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  916. op := &request.Operation{
  917. Name: opDeleteBucketReplication,
  918. HTTPMethod: "DELETE",
  919. HTTPPath: "/{Bucket}?replication",
  920. }
  921. if input == nil {
  922. input = &DeleteBucketReplicationInput{}
  923. }
  924. output = &DeleteBucketReplicationOutput{}
  925. req = c.newRequest(op, input, output)
  926. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  927. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  928. return
  929. }
  930. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  931. //
  932. // Deletes the replication configuration from the bucket.
  933. //
  934. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  935. // with awserr.Error's Code and Message methods to get detailed information about
  936. // the error.
  937. //
  938. // See the AWS API reference guide for Amazon Simple Storage Service's
  939. // API operation DeleteBucketReplication for usage and error information.
  940. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  941. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  942. req, out := c.DeleteBucketReplicationRequest(input)
  943. return out, req.Send()
  944. }
  945. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  946. // the ability to pass a context and additional request options.
  947. //
  948. // See DeleteBucketReplication for details on how to use this API operation.
  949. //
  950. // The context must be non-nil and will be used for request cancellation. If
  951. // the context is nil a panic will occur. In the future the SDK may create
  952. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  953. // for more information on using Contexts.
  954. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  955. req, out := c.DeleteBucketReplicationRequest(input)
  956. req.SetContext(ctx)
  957. req.ApplyOptions(opts...)
  958. return out, req.Send()
  959. }
  960. const opDeleteBucketTagging = "DeleteBucketTagging"
  961. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  962. // client's request for the DeleteBucketTagging operation. The "output" return
  963. // value can be used to capture response data after the request's "Send" method
  964. // is called.
  965. //
  966. // See DeleteBucketTagging for usage and error information.
  967. //
  968. // Creating a request object using this method should be used when you want to inject
  969. // custom logic into the request's lifecycle using a custom handler, or if you want to
  970. // access properties on the request object before or after sending the request. If
  971. // you just want the service response, call the DeleteBucketTagging method directly
  972. // instead.
  973. //
  974. // Note: You must call the "Send" method on the returned request object in order
  975. // to execute the request.
  976. //
  977. // // Example sending a request using the DeleteBucketTaggingRequest method.
  978. // req, resp := client.DeleteBucketTaggingRequest(params)
  979. //
  980. // err := req.Send()
  981. // if err == nil { // resp is now filled
  982. // fmt.Println(resp)
  983. // }
  984. //
  985. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  986. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  987. op := &request.Operation{
  988. Name: opDeleteBucketTagging,
  989. HTTPMethod: "DELETE",
  990. HTTPPath: "/{Bucket}?tagging",
  991. }
  992. if input == nil {
  993. input = &DeleteBucketTaggingInput{}
  994. }
  995. output = &DeleteBucketTaggingOutput{}
  996. req = c.newRequest(op, input, output)
  997. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  998. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  999. return
  1000. }
  1001. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1002. //
  1003. // Deletes the tags from the bucket.
  1004. //
  1005. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1006. // with awserr.Error's Code and Message methods to get detailed information about
  1007. // the error.
  1008. //
  1009. // See the AWS API reference guide for Amazon Simple Storage Service's
  1010. // API operation DeleteBucketTagging for usage and error information.
  1011. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1012. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1013. req, out := c.DeleteBucketTaggingRequest(input)
  1014. return out, req.Send()
  1015. }
  1016. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1017. // the ability to pass a context and additional request options.
  1018. //
  1019. // See DeleteBucketTagging for details on how to use this API operation.
  1020. //
  1021. // The context must be non-nil and will be used for request cancellation. If
  1022. // the context is nil a panic will occur. In the future the SDK may create
  1023. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1024. // for more information on using Contexts.
  1025. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1026. req, out := c.DeleteBucketTaggingRequest(input)
  1027. req.SetContext(ctx)
  1028. req.ApplyOptions(opts...)
  1029. return out, req.Send()
  1030. }
  1031. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1032. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1033. // client's request for the DeleteBucketWebsite operation. The "output" return
  1034. // value can be used to capture response data after the request's "Send" method
  1035. // is called.
  1036. //
  1037. // See DeleteBucketWebsite for usage and error information.
  1038. //
  1039. // Creating a request object using this method should be used when you want to inject
  1040. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1041. // access properties on the request object before or after sending the request. If
  1042. // you just want the service response, call the DeleteBucketWebsite method directly
  1043. // instead.
  1044. //
  1045. // Note: You must call the "Send" method on the returned request object in order
  1046. // to execute the request.
  1047. //
  1048. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1049. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1050. //
  1051. // err := req.Send()
  1052. // if err == nil { // resp is now filled
  1053. // fmt.Println(resp)
  1054. // }
  1055. //
  1056. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1057. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1058. op := &request.Operation{
  1059. Name: opDeleteBucketWebsite,
  1060. HTTPMethod: "DELETE",
  1061. HTTPPath: "/{Bucket}?website",
  1062. }
  1063. if input == nil {
  1064. input = &DeleteBucketWebsiteInput{}
  1065. }
  1066. output = &DeleteBucketWebsiteOutput{}
  1067. req = c.newRequest(op, input, output)
  1068. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1069. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1070. return
  1071. }
  1072. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1073. //
  1074. // This operation removes the website configuration from the bucket.
  1075. //
  1076. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1077. // with awserr.Error's Code and Message methods to get detailed information about
  1078. // the error.
  1079. //
  1080. // See the AWS API reference guide for Amazon Simple Storage Service's
  1081. // API operation DeleteBucketWebsite for usage and error information.
  1082. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1083. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1084. req, out := c.DeleteBucketWebsiteRequest(input)
  1085. return out, req.Send()
  1086. }
  1087. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1088. // the ability to pass a context and additional request options.
  1089. //
  1090. // See DeleteBucketWebsite for details on how to use this API operation.
  1091. //
  1092. // The context must be non-nil and will be used for request cancellation. If
  1093. // the context is nil a panic will occur. In the future the SDK may create
  1094. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1095. // for more information on using Contexts.
  1096. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1097. req, out := c.DeleteBucketWebsiteRequest(input)
  1098. req.SetContext(ctx)
  1099. req.ApplyOptions(opts...)
  1100. return out, req.Send()
  1101. }
  1102. const opDeleteObject = "DeleteObject"
  1103. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1104. // client's request for the DeleteObject operation. The "output" return
  1105. // value can be used to capture response data after the request's "Send" method
  1106. // is called.
  1107. //
  1108. // See DeleteObject for usage and error information.
  1109. //
  1110. // Creating a request object using this method should be used when you want to inject
  1111. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1112. // access properties on the request object before or after sending the request. If
  1113. // you just want the service response, call the DeleteObject method directly
  1114. // instead.
  1115. //
  1116. // Note: You must call the "Send" method on the returned request object in order
  1117. // to execute the request.
  1118. //
  1119. // // Example sending a request using the DeleteObjectRequest method.
  1120. // req, resp := client.DeleteObjectRequest(params)
  1121. //
  1122. // err := req.Send()
  1123. // if err == nil { // resp is now filled
  1124. // fmt.Println(resp)
  1125. // }
  1126. //
  1127. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1128. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1129. op := &request.Operation{
  1130. Name: opDeleteObject,
  1131. HTTPMethod: "DELETE",
  1132. HTTPPath: "/{Bucket}/{Key+}",
  1133. }
  1134. if input == nil {
  1135. input = &DeleteObjectInput{}
  1136. }
  1137. output = &DeleteObjectOutput{}
  1138. req = c.newRequest(op, input, output)
  1139. return
  1140. }
  1141. // DeleteObject API operation for Amazon Simple Storage Service.
  1142. //
  1143. // Removes the null version (if there is one) of an object and inserts a delete
  1144. // marker, which becomes the latest version of the object. If there isn't a
  1145. // null version, Amazon S3 does not remove any objects.
  1146. //
  1147. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1148. // with awserr.Error's Code and Message methods to get detailed information about
  1149. // the error.
  1150. //
  1151. // See the AWS API reference guide for Amazon Simple Storage Service's
  1152. // API operation DeleteObject for usage and error information.
  1153. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1154. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1155. req, out := c.DeleteObjectRequest(input)
  1156. return out, req.Send()
  1157. }
  1158. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1159. // the ability to pass a context and additional request options.
  1160. //
  1161. // See DeleteObject for details on how to use this API operation.
  1162. //
  1163. // The context must be non-nil and will be used for request cancellation. If
  1164. // the context is nil a panic will occur. In the future the SDK may create
  1165. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1166. // for more information on using Contexts.
  1167. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1168. req, out := c.DeleteObjectRequest(input)
  1169. req.SetContext(ctx)
  1170. req.ApplyOptions(opts...)
  1171. return out, req.Send()
  1172. }
  1173. const opDeleteObjectTagging = "DeleteObjectTagging"
  1174. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1175. // client's request for the DeleteObjectTagging operation. The "output" return
  1176. // value can be used to capture response data after the request's "Send" method
  1177. // is called.
  1178. //
  1179. // See DeleteObjectTagging for usage and error information.
  1180. //
  1181. // Creating a request object using this method should be used when you want to inject
  1182. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1183. // access properties on the request object before or after sending the request. If
  1184. // you just want the service response, call the DeleteObjectTagging method directly
  1185. // instead.
  1186. //
  1187. // Note: You must call the "Send" method on the returned request object in order
  1188. // to execute the request.
  1189. //
  1190. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1191. // req, resp := client.DeleteObjectTaggingRequest(params)
  1192. //
  1193. // err := req.Send()
  1194. // if err == nil { // resp is now filled
  1195. // fmt.Println(resp)
  1196. // }
  1197. //
  1198. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1199. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1200. op := &request.Operation{
  1201. Name: opDeleteObjectTagging,
  1202. HTTPMethod: "DELETE",
  1203. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1204. }
  1205. if input == nil {
  1206. input = &DeleteObjectTaggingInput{}
  1207. }
  1208. output = &DeleteObjectTaggingOutput{}
  1209. req = c.newRequest(op, input, output)
  1210. return
  1211. }
  1212. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1213. //
  1214. // Removes the tag-set from an existing object.
  1215. //
  1216. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1217. // with awserr.Error's Code and Message methods to get detailed information about
  1218. // the error.
  1219. //
  1220. // See the AWS API reference guide for Amazon Simple Storage Service's
  1221. // API operation DeleteObjectTagging for usage and error information.
  1222. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1223. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1224. req, out := c.DeleteObjectTaggingRequest(input)
  1225. return out, req.Send()
  1226. }
  1227. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1228. // the ability to pass a context and additional request options.
  1229. //
  1230. // See DeleteObjectTagging for details on how to use this API operation.
  1231. //
  1232. // The context must be non-nil and will be used for request cancellation. If
  1233. // the context is nil a panic will occur. In the future the SDK may create
  1234. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1235. // for more information on using Contexts.
  1236. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1237. req, out := c.DeleteObjectTaggingRequest(input)
  1238. req.SetContext(ctx)
  1239. req.ApplyOptions(opts...)
  1240. return out, req.Send()
  1241. }
  1242. const opDeleteObjects = "DeleteObjects"
  1243. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1244. // client's request for the DeleteObjects operation. The "output" return
  1245. // value can be used to capture response data after the request's "Send" method
  1246. // is called.
  1247. //
  1248. // See DeleteObjects for usage and error information.
  1249. //
  1250. // Creating a request object using this method should be used when you want to inject
  1251. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1252. // access properties on the request object before or after sending the request. If
  1253. // you just want the service response, call the DeleteObjects method directly
  1254. // instead.
  1255. //
  1256. // Note: You must call the "Send" method on the returned request object in order
  1257. // to execute the request.
  1258. //
  1259. // // Example sending a request using the DeleteObjectsRequest method.
  1260. // req, resp := client.DeleteObjectsRequest(params)
  1261. //
  1262. // err := req.Send()
  1263. // if err == nil { // resp is now filled
  1264. // fmt.Println(resp)
  1265. // }
  1266. //
  1267. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1268. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1269. op := &request.Operation{
  1270. Name: opDeleteObjects,
  1271. HTTPMethod: "POST",
  1272. HTTPPath: "/{Bucket}?delete",
  1273. }
  1274. if input == nil {
  1275. input = &DeleteObjectsInput{}
  1276. }
  1277. output = &DeleteObjectsOutput{}
  1278. req = c.newRequest(op, input, output)
  1279. return
  1280. }
  1281. // DeleteObjects API operation for Amazon Simple Storage Service.
  1282. //
  1283. // This operation enables you to delete multiple objects from a bucket using
  1284. // a single HTTP request. You may specify up to 1000 keys.
  1285. //
  1286. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1287. // with awserr.Error's Code and Message methods to get detailed information about
  1288. // the error.
  1289. //
  1290. // See the AWS API reference guide for Amazon Simple Storage Service's
  1291. // API operation DeleteObjects for usage and error information.
  1292. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1293. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1294. req, out := c.DeleteObjectsRequest(input)
  1295. return out, req.Send()
  1296. }
  1297. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1298. // the ability to pass a context and additional request options.
  1299. //
  1300. // See DeleteObjects for details on how to use this API operation.
  1301. //
  1302. // The context must be non-nil and will be used for request cancellation. If
  1303. // the context is nil a panic will occur. In the future the SDK may create
  1304. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1305. // for more information on using Contexts.
  1306. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1307. req, out := c.DeleteObjectsRequest(input)
  1308. req.SetContext(ctx)
  1309. req.ApplyOptions(opts...)
  1310. return out, req.Send()
  1311. }
  1312. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1313. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1314. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1315. // value can be used to capture response data after the request's "Send" method
  1316. // is called.
  1317. //
  1318. // See GetBucketAccelerateConfiguration for usage and error information.
  1319. //
  1320. // Creating a request object using this method should be used when you want to inject
  1321. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1322. // access properties on the request object before or after sending the request. If
  1323. // you just want the service response, call the GetBucketAccelerateConfiguration method directly
  1324. // instead.
  1325. //
  1326. // Note: You must call the "Send" method on the returned request object in order
  1327. // to execute the request.
  1328. //
  1329. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1330. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1331. //
  1332. // err := req.Send()
  1333. // if err == nil { // resp is now filled
  1334. // fmt.Println(resp)
  1335. // }
  1336. //
  1337. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1338. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1339. op := &request.Operation{
  1340. Name: opGetBucketAccelerateConfiguration,
  1341. HTTPMethod: "GET",
  1342. HTTPPath: "/{Bucket}?accelerate",
  1343. }
  1344. if input == nil {
  1345. input = &GetBucketAccelerateConfigurationInput{}
  1346. }
  1347. output = &GetBucketAccelerateConfigurationOutput{}
  1348. req = c.newRequest(op, input, output)
  1349. return
  1350. }
  1351. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1352. //
  1353. // Returns the accelerate configuration of a bucket.
  1354. //
  1355. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1356. // with awserr.Error's Code and Message methods to get detailed information about
  1357. // the error.
  1358. //
  1359. // See the AWS API reference guide for Amazon Simple Storage Service's
  1360. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1361. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1362. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1363. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1364. return out, req.Send()
  1365. }
  1366. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1367. // the ability to pass a context and additional request options.
  1368. //
  1369. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1370. //
  1371. // The context must be non-nil and will be used for request cancellation. If
  1372. // the context is nil a panic will occur. In the future the SDK may create
  1373. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1374. // for more information on using Contexts.
  1375. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1376. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1377. req.SetContext(ctx)
  1378. req.ApplyOptions(opts...)
  1379. return out, req.Send()
  1380. }
  1381. const opGetBucketAcl = "GetBucketAcl"
  1382. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1383. // client's request for the GetBucketAcl operation. The "output" return
  1384. // value can be used to capture response data after the request's "Send" method
  1385. // is called.
  1386. //
  1387. // See GetBucketAcl for usage and error information.
  1388. //
  1389. // Creating a request object using this method should be used when you want to inject
  1390. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1391. // access properties on the request object before or after sending the request. If
  1392. // you just want the service response, call the GetBucketAcl method directly
  1393. // instead.
  1394. //
  1395. // Note: You must call the "Send" method on the returned request object in order
  1396. // to execute the request.
  1397. //
  1398. // // Example sending a request using the GetBucketAclRequest method.
  1399. // req, resp := client.GetBucketAclRequest(params)
  1400. //
  1401. // err := req.Send()
  1402. // if err == nil { // resp is now filled
  1403. // fmt.Println(resp)
  1404. // }
  1405. //
  1406. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1407. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1408. op := &request.Operation{
  1409. Name: opGetBucketAcl,
  1410. HTTPMethod: "GET",
  1411. HTTPPath: "/{Bucket}?acl",
  1412. }
  1413. if input == nil {
  1414. input = &GetBucketAclInput{}
  1415. }
  1416. output = &GetBucketAclOutput{}
  1417. req = c.newRequest(op, input, output)
  1418. return
  1419. }
  1420. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1421. //
  1422. // Gets the access control policy for the bucket.
  1423. //
  1424. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1425. // with awserr.Error's Code and Message methods to get detailed information about
  1426. // the error.
  1427. //
  1428. // See the AWS API reference guide for Amazon Simple Storage Service's
  1429. // API operation GetBucketAcl for usage and error information.
  1430. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1431. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1432. req, out := c.GetBucketAclRequest(input)
  1433. return out, req.Send()
  1434. }
  1435. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1436. // the ability to pass a context and additional request options.
  1437. //
  1438. // See GetBucketAcl for details on how to use this API operation.
  1439. //
  1440. // The context must be non-nil and will be used for request cancellation. If
  1441. // the context is nil a panic will occur. In the future the SDK may create
  1442. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1443. // for more information on using Contexts.
  1444. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1445. req, out := c.GetBucketAclRequest(input)
  1446. req.SetContext(ctx)
  1447. req.ApplyOptions(opts...)
  1448. return out, req.Send()
  1449. }
  1450. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1451. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1452. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1453. // value can be used to capture response data after the request's "Send" method
  1454. // is called.
  1455. //
  1456. // See GetBucketAnalyticsConfiguration for usage and error information.
  1457. //
  1458. // Creating a request object using this method should be used when you want to inject
  1459. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1460. // access properties on the request object before or after sending the request. If
  1461. // you just want the service response, call the GetBucketAnalyticsConfiguration method directly
  1462. // instead.
  1463. //
  1464. // Note: You must call the "Send" method on the returned request object in order
  1465. // to execute the request.
  1466. //
  1467. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1468. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1469. //
  1470. // err := req.Send()
  1471. // if err == nil { // resp is now filled
  1472. // fmt.Println(resp)
  1473. // }
  1474. //
  1475. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1476. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1477. op := &request.Operation{
  1478. Name: opGetBucketAnalyticsConfiguration,
  1479. HTTPMethod: "GET",
  1480. HTTPPath: "/{Bucket}?analytics",
  1481. }
  1482. if input == nil {
  1483. input = &GetBucketAnalyticsConfigurationInput{}
  1484. }
  1485. output = &GetBucketAnalyticsConfigurationOutput{}
  1486. req = c.newRequest(op, input, output)
  1487. return
  1488. }
  1489. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1490. //
  1491. // Gets an analytics configuration for the bucket (specified by the analytics
  1492. // configuration ID).
  1493. //
  1494. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1495. // with awserr.Error's Code and Message methods to get detailed information about
  1496. // the error.
  1497. //
  1498. // See the AWS API reference guide for Amazon Simple Storage Service's
  1499. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1500. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1501. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1502. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1503. return out, req.Send()
  1504. }
  1505. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1506. // the ability to pass a context and additional request options.
  1507. //
  1508. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1509. //
  1510. // The context must be non-nil and will be used for request cancellation. If
  1511. // the context is nil a panic will occur. In the future the SDK may create
  1512. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1513. // for more information on using Contexts.
  1514. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1515. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1516. req.SetContext(ctx)
  1517. req.ApplyOptions(opts...)
  1518. return out, req.Send()
  1519. }
  1520. const opGetBucketCors = "GetBucketCors"
  1521. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1522. // client's request for the GetBucketCors operation. The "output" return
  1523. // value can be used to capture response data after the request's "Send" method
  1524. // is called.
  1525. //
  1526. // See GetBucketCors for usage and error information.
  1527. //
  1528. // Creating a request object using this method should be used when you want to inject
  1529. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1530. // access properties on the request object before or after sending the request. If
  1531. // you just want the service response, call the GetBucketCors method directly
  1532. // instead.
  1533. //
  1534. // Note: You must call the "Send" method on the returned request object in order
  1535. // to execute the request.
  1536. //
  1537. // // Example sending a request using the GetBucketCorsRequest method.
  1538. // req, resp := client.GetBucketCorsRequest(params)
  1539. //
  1540. // err := req.Send()
  1541. // if err == nil { // resp is now filled
  1542. // fmt.Println(resp)
  1543. // }
  1544. //
  1545. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1546. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1547. op := &request.Operation{
  1548. Name: opGetBucketCors,
  1549. HTTPMethod: "GET",
  1550. HTTPPath: "/{Bucket}?cors",
  1551. }
  1552. if input == nil {
  1553. input = &GetBucketCorsInput{}
  1554. }
  1555. output = &GetBucketCorsOutput{}
  1556. req = c.newRequest(op, input, output)
  1557. return
  1558. }
  1559. // GetBucketCors API operation for Amazon Simple Storage Service.
  1560. //
  1561. // Returns the cors configuration for the bucket.
  1562. //
  1563. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1564. // with awserr.Error's Code and Message methods to get detailed information about
  1565. // the error.
  1566. //
  1567. // See the AWS API reference guide for Amazon Simple Storage Service's
  1568. // API operation GetBucketCors for usage and error information.
  1569. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1570. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1571. req, out := c.GetBucketCorsRequest(input)
  1572. return out, req.Send()
  1573. }
  1574. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1575. // the ability to pass a context and additional request options.
  1576. //
  1577. // See GetBucketCors for details on how to use this API operation.
  1578. //
  1579. // The context must be non-nil and will be used for request cancellation. If
  1580. // the context is nil a panic will occur. In the future the SDK may create
  1581. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1582. // for more information on using Contexts.
  1583. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1584. req, out := c.GetBucketCorsRequest(input)
  1585. req.SetContext(ctx)
  1586. req.ApplyOptions(opts...)
  1587. return out, req.Send()
  1588. }
  1589. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1590. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1591. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1592. // value can be used to capture response data after the request's "Send" method
  1593. // is called.
  1594. //
  1595. // See GetBucketInventoryConfiguration for usage and error information.
  1596. //
  1597. // Creating a request object using this method should be used when you want to inject
  1598. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1599. // access properties on the request object before or after sending the request. If
  1600. // you just want the service response, call the GetBucketInventoryConfiguration method directly
  1601. // instead.
  1602. //
  1603. // Note: You must call the "Send" method on the returned request object in order
  1604. // to execute the request.
  1605. //
  1606. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1607. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1608. //
  1609. // err := req.Send()
  1610. // if err == nil { // resp is now filled
  1611. // fmt.Println(resp)
  1612. // }
  1613. //
  1614. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1615. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1616. op := &request.Operation{
  1617. Name: opGetBucketInventoryConfiguration,
  1618. HTTPMethod: "GET",
  1619. HTTPPath: "/{Bucket}?inventory",
  1620. }
  1621. if input == nil {
  1622. input = &GetBucketInventoryConfigurationInput{}
  1623. }
  1624. output = &GetBucketInventoryConfigurationOutput{}
  1625. req = c.newRequest(op, input, output)
  1626. return
  1627. }
  1628. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1629. //
  1630. // Returns an inventory configuration (identified by the inventory ID) from
  1631. // the bucket.
  1632. //
  1633. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1634. // with awserr.Error's Code and Message methods to get detailed information about
  1635. // the error.
  1636. //
  1637. // See the AWS API reference guide for Amazon Simple Storage Service's
  1638. // API operation GetBucketInventoryConfiguration for usage and error information.
  1639. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1640. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1641. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1642. return out, req.Send()
  1643. }
  1644. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1645. // the ability to pass a context and additional request options.
  1646. //
  1647. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1648. //
  1649. // The context must be non-nil and will be used for request cancellation. If
  1650. // the context is nil a panic will occur. In the future the SDK may create
  1651. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1652. // for more information on using Contexts.
  1653. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1654. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1655. req.SetContext(ctx)
  1656. req.ApplyOptions(opts...)
  1657. return out, req.Send()
  1658. }
  1659. const opGetBucketLifecycle = "GetBucketLifecycle"
  1660. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1661. // client's request for the GetBucketLifecycle operation. The "output" return
  1662. // value can be used to capture response data after the request's "Send" method
  1663. // is called.
  1664. //
  1665. // See GetBucketLifecycle for usage and error information.
  1666. //
  1667. // Creating a request object using this method should be used when you want to inject
  1668. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1669. // access properties on the request object before or after sending the request. If
  1670. // you just want the service response, call the GetBucketLifecycle method directly
  1671. // instead.
  1672. //
  1673. // Note: You must call the "Send" method on the returned request object in order
  1674. // to execute the request.
  1675. //
  1676. // // Example sending a request using the GetBucketLifecycleRequest method.
  1677. // req, resp := client.GetBucketLifecycleRequest(params)
  1678. //
  1679. // err := req.Send()
  1680. // if err == nil { // resp is now filled
  1681. // fmt.Println(resp)
  1682. // }
  1683. //
  1684. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1685. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1686. if c.Client.Config.Logger != nil {
  1687. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1688. }
  1689. op := &request.Operation{
  1690. Name: opGetBucketLifecycle,
  1691. HTTPMethod: "GET",
  1692. HTTPPath: "/{Bucket}?lifecycle",
  1693. }
  1694. if input == nil {
  1695. input = &GetBucketLifecycleInput{}
  1696. }
  1697. output = &GetBucketLifecycleOutput{}
  1698. req = c.newRequest(op, input, output)
  1699. return
  1700. }
  1701. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1702. //
  1703. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1704. //
  1705. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1706. // with awserr.Error's Code and Message methods to get detailed information about
  1707. // the error.
  1708. //
  1709. // See the AWS API reference guide for Amazon Simple Storage Service's
  1710. // API operation GetBucketLifecycle for usage and error information.
  1711. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1712. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1713. req, out := c.GetBucketLifecycleRequest(input)
  1714. return out, req.Send()
  1715. }
  1716. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1717. // the ability to pass a context and additional request options.
  1718. //
  1719. // See GetBucketLifecycle for details on how to use this API operation.
  1720. //
  1721. // The context must be non-nil and will be used for request cancellation. If
  1722. // the context is nil a panic will occur. In the future the SDK may create
  1723. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1724. // for more information on using Contexts.
  1725. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1726. req, out := c.GetBucketLifecycleRequest(input)
  1727. req.SetContext(ctx)
  1728. req.ApplyOptions(opts...)
  1729. return out, req.Send()
  1730. }
  1731. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1732. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1733. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1734. // value can be used to capture response data after the request's "Send" method
  1735. // is called.
  1736. //
  1737. // See GetBucketLifecycleConfiguration for usage and error information.
  1738. //
  1739. // Creating a request object using this method should be used when you want to inject
  1740. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1741. // access properties on the request object before or after sending the request. If
  1742. // you just want the service response, call the GetBucketLifecycleConfiguration method directly
  1743. // instead.
  1744. //
  1745. // Note: You must call the "Send" method on the returned request object in order
  1746. // to execute the request.
  1747. //
  1748. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1749. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1750. //
  1751. // err := req.Send()
  1752. // if err == nil { // resp is now filled
  1753. // fmt.Println(resp)
  1754. // }
  1755. //
  1756. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1757. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1758. op := &request.Operation{
  1759. Name: opGetBucketLifecycleConfiguration,
  1760. HTTPMethod: "GET",
  1761. HTTPPath: "/{Bucket}?lifecycle",
  1762. }
  1763. if input == nil {
  1764. input = &GetBucketLifecycleConfigurationInput{}
  1765. }
  1766. output = &GetBucketLifecycleConfigurationOutput{}
  1767. req = c.newRequest(op, input, output)
  1768. return
  1769. }
  1770. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1771. //
  1772. // Returns the lifecycle configuration information set on the bucket.
  1773. //
  1774. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1775. // with awserr.Error's Code and Message methods to get detailed information about
  1776. // the error.
  1777. //
  1778. // See the AWS API reference guide for Amazon Simple Storage Service's
  1779. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1780. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1781. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1782. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1783. return out, req.Send()
  1784. }
  1785. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1786. // the ability to pass a context and additional request options.
  1787. //
  1788. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1789. //
  1790. // The context must be non-nil and will be used for request cancellation. If
  1791. // the context is nil a panic will occur. In the future the SDK may create
  1792. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1793. // for more information on using Contexts.
  1794. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1795. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1796. req.SetContext(ctx)
  1797. req.ApplyOptions(opts...)
  1798. return out, req.Send()
  1799. }
  1800. const opGetBucketLocation = "GetBucketLocation"
  1801. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1802. // client's request for the GetBucketLocation operation. The "output" return
  1803. // value can be used to capture response data after the request's "Send" method
  1804. // is called.
  1805. //
  1806. // See GetBucketLocation for usage and error information.
  1807. //
  1808. // Creating a request object using this method should be used when you want to inject
  1809. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1810. // access properties on the request object before or after sending the request. If
  1811. // you just want the service response, call the GetBucketLocation method directly
  1812. // instead.
  1813. //
  1814. // Note: You must call the "Send" method on the returned request object in order
  1815. // to execute the request.
  1816. //
  1817. // // Example sending a request using the GetBucketLocationRequest method.
  1818. // req, resp := client.GetBucketLocationRequest(params)
  1819. //
  1820. // err := req.Send()
  1821. // if err == nil { // resp is now filled
  1822. // fmt.Println(resp)
  1823. // }
  1824. //
  1825. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1826. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1827. op := &request.Operation{
  1828. Name: opGetBucketLocation,
  1829. HTTPMethod: "GET",
  1830. HTTPPath: "/{Bucket}?location",
  1831. }
  1832. if input == nil {
  1833. input = &GetBucketLocationInput{}
  1834. }
  1835. output = &GetBucketLocationOutput{}
  1836. req = c.newRequest(op, input, output)
  1837. return
  1838. }
  1839. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1840. //
  1841. // Returns the region the bucket resides in.
  1842. //
  1843. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1844. // with awserr.Error's Code and Message methods to get detailed information about
  1845. // the error.
  1846. //
  1847. // See the AWS API reference guide for Amazon Simple Storage Service's
  1848. // API operation GetBucketLocation for usage and error information.
  1849. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1850. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1851. req, out := c.GetBucketLocationRequest(input)
  1852. return out, req.Send()
  1853. }
  1854. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  1855. // the ability to pass a context and additional request options.
  1856. //
  1857. // See GetBucketLocation for details on how to use this API operation.
  1858. //
  1859. // The context must be non-nil and will be used for request cancellation. If
  1860. // the context is nil a panic will occur. In the future the SDK may create
  1861. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1862. // for more information on using Contexts.
  1863. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  1864. req, out := c.GetBucketLocationRequest(input)
  1865. req.SetContext(ctx)
  1866. req.ApplyOptions(opts...)
  1867. return out, req.Send()
  1868. }
  1869. const opGetBucketLogging = "GetBucketLogging"
  1870. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1871. // client's request for the GetBucketLogging operation. The "output" return
  1872. // value can be used to capture response data after the request's "Send" method
  1873. // is called.
  1874. //
  1875. // See GetBucketLogging for usage and error information.
  1876. //
  1877. // Creating a request object using this method should be used when you want to inject
  1878. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1879. // access properties on the request object before or after sending the request. If
  1880. // you just want the service response, call the GetBucketLogging method directly
  1881. // instead.
  1882. //
  1883. // Note: You must call the "Send" method on the returned request object in order
  1884. // to execute the request.
  1885. //
  1886. // // Example sending a request using the GetBucketLoggingRequest method.
  1887. // req, resp := client.GetBucketLoggingRequest(params)
  1888. //
  1889. // err := req.Send()
  1890. // if err == nil { // resp is now filled
  1891. // fmt.Println(resp)
  1892. // }
  1893. //
  1894. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  1895. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  1896. op := &request.Operation{
  1897. Name: opGetBucketLogging,
  1898. HTTPMethod: "GET",
  1899. HTTPPath: "/{Bucket}?logging",
  1900. }
  1901. if input == nil {
  1902. input = &GetBucketLoggingInput{}
  1903. }
  1904. output = &GetBucketLoggingOutput{}
  1905. req = c.newRequest(op, input, output)
  1906. return
  1907. }
  1908. // GetBucketLogging API operation for Amazon Simple Storage Service.
  1909. //
  1910. // Returns the logging status of a bucket and the permissions users have to
  1911. // view and modify that status. To use GET, you must be the bucket owner.
  1912. //
  1913. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1914. // with awserr.Error's Code and Message methods to get detailed information about
  1915. // the error.
  1916. //
  1917. // See the AWS API reference guide for Amazon Simple Storage Service's
  1918. // API operation GetBucketLogging for usage and error information.
  1919. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  1920. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  1921. req, out := c.GetBucketLoggingRequest(input)
  1922. return out, req.Send()
  1923. }
  1924. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  1925. // the ability to pass a context and additional request options.
  1926. //
  1927. // See GetBucketLogging for details on how to use this API operation.
  1928. //
  1929. // The context must be non-nil and will be used for request cancellation. If
  1930. // the context is nil a panic will occur. In the future the SDK may create
  1931. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1932. // for more information on using Contexts.
  1933. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  1934. req, out := c.GetBucketLoggingRequest(input)
  1935. req.SetContext(ctx)
  1936. req.ApplyOptions(opts...)
  1937. return out, req.Send()
  1938. }
  1939. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  1940. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  1941. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  1942. // value can be used to capture response data after the request's "Send" method
  1943. // is called.
  1944. //
  1945. // See GetBucketMetricsConfiguration for usage and error information.
  1946. //
  1947. // Creating a request object using this method should be used when you want to inject
  1948. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1949. // access properties on the request object before or after sending the request. If
  1950. // you just want the service response, call the GetBucketMetricsConfiguration method directly
  1951. // instead.
  1952. //
  1953. // Note: You must call the "Send" method on the returned request object in order
  1954. // to execute the request.
  1955. //
  1956. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  1957. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  1958. //
  1959. // err := req.Send()
  1960. // if err == nil { // resp is now filled
  1961. // fmt.Println(resp)
  1962. // }
  1963. //
  1964. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  1965. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  1966. op := &request.Operation{
  1967. Name: opGetBucketMetricsConfiguration,
  1968. HTTPMethod: "GET",
  1969. HTTPPath: "/{Bucket}?metrics",
  1970. }
  1971. if input == nil {
  1972. input = &GetBucketMetricsConfigurationInput{}
  1973. }
  1974. output = &GetBucketMetricsConfigurationOutput{}
  1975. req = c.newRequest(op, input, output)
  1976. return
  1977. }
  1978. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  1979. //
  1980. // Gets a metrics configuration (specified by the metrics configuration ID)
  1981. // from the bucket.
  1982. //
  1983. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1984. // with awserr.Error's Code and Message methods to get detailed information about
  1985. // the error.
  1986. //
  1987. // See the AWS API reference guide for Amazon Simple Storage Service's
  1988. // API operation GetBucketMetricsConfiguration for usage and error information.
  1989. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  1990. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  1991. req, out := c.GetBucketMetricsConfigurationRequest(input)
  1992. return out, req.Send()
  1993. }
  1994. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  1995. // the ability to pass a context and additional request options.
  1996. //
  1997. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  1998. //
  1999. // The context must be non-nil and will be used for request cancellation. If
  2000. // the context is nil a panic will occur. In the future the SDK may create
  2001. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2002. // for more information on using Contexts.
  2003. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2004. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2005. req.SetContext(ctx)
  2006. req.ApplyOptions(opts...)
  2007. return out, req.Send()
  2008. }
  2009. const opGetBucketNotification = "GetBucketNotification"
  2010. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2011. // client's request for the GetBucketNotification operation. The "output" return
  2012. // value can be used to capture response data after the request's "Send" method
  2013. // is called.
  2014. //
  2015. // See GetBucketNotification for usage and error information.
  2016. //
  2017. // Creating a request object using this method should be used when you want to inject
  2018. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2019. // access properties on the request object before or after sending the request. If
  2020. // you just want the service response, call the GetBucketNotification method directly
  2021. // instead.
  2022. //
  2023. // Note: You must call the "Send" method on the returned request object in order
  2024. // to execute the request.
  2025. //
  2026. // // Example sending a request using the GetBucketNotificationRequest method.
  2027. // req, resp := client.GetBucketNotificationRequest(params)
  2028. //
  2029. // err := req.Send()
  2030. // if err == nil { // resp is now filled
  2031. // fmt.Println(resp)
  2032. // }
  2033. //
  2034. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2035. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2036. if c.Client.Config.Logger != nil {
  2037. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2038. }
  2039. op := &request.Operation{
  2040. Name: opGetBucketNotification,
  2041. HTTPMethod: "GET",
  2042. HTTPPath: "/{Bucket}?notification",
  2043. }
  2044. if input == nil {
  2045. input = &GetBucketNotificationConfigurationRequest{}
  2046. }
  2047. output = &NotificationConfigurationDeprecated{}
  2048. req = c.newRequest(op, input, output)
  2049. return
  2050. }
  2051. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2052. //
  2053. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2054. //
  2055. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2056. // with awserr.Error's Code and Message methods to get detailed information about
  2057. // the error.
  2058. //
  2059. // See the AWS API reference guide for Amazon Simple Storage Service's
  2060. // API operation GetBucketNotification for usage and error information.
  2061. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2062. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2063. req, out := c.GetBucketNotificationRequest(input)
  2064. return out, req.Send()
  2065. }
  2066. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2067. // the ability to pass a context and additional request options.
  2068. //
  2069. // See GetBucketNotification for details on how to use this API operation.
  2070. //
  2071. // The context must be non-nil and will be used for request cancellation. If
  2072. // the context is nil a panic will occur. In the future the SDK may create
  2073. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2074. // for more information on using Contexts.
  2075. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2076. req, out := c.GetBucketNotificationRequest(input)
  2077. req.SetContext(ctx)
  2078. req.ApplyOptions(opts...)
  2079. return out, req.Send()
  2080. }
  2081. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2082. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2083. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2084. // value can be used to capture response data after the request's "Send" method
  2085. // is called.
  2086. //
  2087. // See GetBucketNotificationConfiguration for usage and error information.
  2088. //
  2089. // Creating a request object using this method should be used when you want to inject
  2090. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2091. // access properties on the request object before or after sending the request. If
  2092. // you just want the service response, call the GetBucketNotificationConfiguration method directly
  2093. // instead.
  2094. //
  2095. // Note: You must call the "Send" method on the returned request object in order
  2096. // to execute the request.
  2097. //
  2098. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2099. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2100. //
  2101. // err := req.Send()
  2102. // if err == nil { // resp is now filled
  2103. // fmt.Println(resp)
  2104. // }
  2105. //
  2106. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2107. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2108. op := &request.Operation{
  2109. Name: opGetBucketNotificationConfiguration,
  2110. HTTPMethod: "GET",
  2111. HTTPPath: "/{Bucket}?notification",
  2112. }
  2113. if input == nil {
  2114. input = &GetBucketNotificationConfigurationRequest{}
  2115. }
  2116. output = &NotificationConfiguration{}
  2117. req = c.newRequest(op, input, output)
  2118. return
  2119. }
  2120. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2121. //
  2122. // Returns the notification configuration of a bucket.
  2123. //
  2124. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2125. // with awserr.Error's Code and Message methods to get detailed information about
  2126. // the error.
  2127. //
  2128. // See the AWS API reference guide for Amazon Simple Storage Service's
  2129. // API operation GetBucketNotificationConfiguration for usage and error information.
  2130. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2131. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2132. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2133. return out, req.Send()
  2134. }
  2135. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2136. // the ability to pass a context and additional request options.
  2137. //
  2138. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2139. //
  2140. // The context must be non-nil and will be used for request cancellation. If
  2141. // the context is nil a panic will occur. In the future the SDK may create
  2142. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2143. // for more information on using Contexts.
  2144. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2145. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2146. req.SetContext(ctx)
  2147. req.ApplyOptions(opts...)
  2148. return out, req.Send()
  2149. }
  2150. const opGetBucketPolicy = "GetBucketPolicy"
  2151. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2152. // client's request for the GetBucketPolicy operation. The "output" return
  2153. // value can be used to capture response data after the request's "Send" method
  2154. // is called.
  2155. //
  2156. // See GetBucketPolicy for usage and error information.
  2157. //
  2158. // Creating a request object using this method should be used when you want to inject
  2159. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2160. // access properties on the request object before or after sending the request. If
  2161. // you just want the service response, call the GetBucketPolicy method directly
  2162. // instead.
  2163. //
  2164. // Note: You must call the "Send" method on the returned request object in order
  2165. // to execute the request.
  2166. //
  2167. // // Example sending a request using the GetBucketPolicyRequest method.
  2168. // req, resp := client.GetBucketPolicyRequest(params)
  2169. //
  2170. // err := req.Send()
  2171. // if err == nil { // resp is now filled
  2172. // fmt.Println(resp)
  2173. // }
  2174. //
  2175. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2176. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2177. op := &request.Operation{
  2178. Name: opGetBucketPolicy,
  2179. HTTPMethod: "GET",
  2180. HTTPPath: "/{Bucket}?policy",
  2181. }
  2182. if input == nil {
  2183. input = &GetBucketPolicyInput{}
  2184. }
  2185. output = &GetBucketPolicyOutput{}
  2186. req = c.newRequest(op, input, output)
  2187. return
  2188. }
  2189. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2190. //
  2191. // Returns the policy of a specified bucket.
  2192. //
  2193. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2194. // with awserr.Error's Code and Message methods to get detailed information about
  2195. // the error.
  2196. //
  2197. // See the AWS API reference guide for Amazon Simple Storage Service's
  2198. // API operation GetBucketPolicy for usage and error information.
  2199. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2200. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2201. req, out := c.GetBucketPolicyRequest(input)
  2202. return out, req.Send()
  2203. }
  2204. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2205. // the ability to pass a context and additional request options.
  2206. //
  2207. // See GetBucketPolicy for details on how to use this API operation.
  2208. //
  2209. // The context must be non-nil and will be used for request cancellation. If
  2210. // the context is nil a panic will occur. In the future the SDK may create
  2211. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2212. // for more information on using Contexts.
  2213. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2214. req, out := c.GetBucketPolicyRequest(input)
  2215. req.SetContext(ctx)
  2216. req.ApplyOptions(opts...)
  2217. return out, req.Send()
  2218. }
  2219. const opGetBucketReplication = "GetBucketReplication"
  2220. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2221. // client's request for the GetBucketReplication operation. The "output" return
  2222. // value can be used to capture response data after the request's "Send" method
  2223. // is called.
  2224. //
  2225. // See GetBucketReplication for usage and error information.
  2226. //
  2227. // Creating a request object using this method should be used when you want to inject
  2228. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2229. // access properties on the request object before or after sending the request. If
  2230. // you just want the service response, call the GetBucketReplication method directly
  2231. // instead.
  2232. //
  2233. // Note: You must call the "Send" method on the returned request object in order
  2234. // to execute the request.
  2235. //
  2236. // // Example sending a request using the GetBucketReplicationRequest method.
  2237. // req, resp := client.GetBucketReplicationRequest(params)
  2238. //
  2239. // err := req.Send()
  2240. // if err == nil { // resp is now filled
  2241. // fmt.Println(resp)
  2242. // }
  2243. //
  2244. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2245. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2246. op := &request.Operation{
  2247. Name: opGetBucketReplication,
  2248. HTTPMethod: "GET",
  2249. HTTPPath: "/{Bucket}?replication",
  2250. }
  2251. if input == nil {
  2252. input = &GetBucketReplicationInput{}
  2253. }
  2254. output = &GetBucketReplicationOutput{}
  2255. req = c.newRequest(op, input, output)
  2256. return
  2257. }
  2258. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2259. //
  2260. // Returns the replication configuration of a bucket.
  2261. //
  2262. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2263. // with awserr.Error's Code and Message methods to get detailed information about
  2264. // the error.
  2265. //
  2266. // See the AWS API reference guide for Amazon Simple Storage Service's
  2267. // API operation GetBucketReplication for usage and error information.
  2268. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2269. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2270. req, out := c.GetBucketReplicationRequest(input)
  2271. return out, req.Send()
  2272. }
  2273. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2274. // the ability to pass a context and additional request options.
  2275. //
  2276. // See GetBucketReplication for details on how to use this API operation.
  2277. //
  2278. // The context must be non-nil and will be used for request cancellation. If
  2279. // the context is nil a panic will occur. In the future the SDK may create
  2280. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2281. // for more information on using Contexts.
  2282. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2283. req, out := c.GetBucketReplicationRequest(input)
  2284. req.SetContext(ctx)
  2285. req.ApplyOptions(opts...)
  2286. return out, req.Send()
  2287. }
  2288. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2289. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2290. // client's request for the GetBucketRequestPayment operation. The "output" return
  2291. // value can be used to capture response data after the request's "Send" method
  2292. // is called.
  2293. //
  2294. // See GetBucketRequestPayment for usage and error information.
  2295. //
  2296. // Creating a request object using this method should be used when you want to inject
  2297. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2298. // access properties on the request object before or after sending the request. If
  2299. // you just want the service response, call the GetBucketRequestPayment method directly
  2300. // instead.
  2301. //
  2302. // Note: You must call the "Send" method on the returned request object in order
  2303. // to execute the request.
  2304. //
  2305. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2306. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2307. //
  2308. // err := req.Send()
  2309. // if err == nil { // resp is now filled
  2310. // fmt.Println(resp)
  2311. // }
  2312. //
  2313. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2314. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2315. op := &request.Operation{
  2316. Name: opGetBucketRequestPayment,
  2317. HTTPMethod: "GET",
  2318. HTTPPath: "/{Bucket}?requestPayment",
  2319. }
  2320. if input == nil {
  2321. input = &GetBucketRequestPaymentInput{}
  2322. }
  2323. output = &GetBucketRequestPaymentOutput{}
  2324. req = c.newRequest(op, input, output)
  2325. return
  2326. }
  2327. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2328. //
  2329. // Returns the request payment configuration of a bucket.
  2330. //
  2331. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2332. // with awserr.Error's Code and Message methods to get detailed information about
  2333. // the error.
  2334. //
  2335. // See the AWS API reference guide for Amazon Simple Storage Service's
  2336. // API operation GetBucketRequestPayment for usage and error information.
  2337. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2338. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2339. req, out := c.GetBucketRequestPaymentRequest(input)
  2340. return out, req.Send()
  2341. }
  2342. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2343. // the ability to pass a context and additional request options.
  2344. //
  2345. // See GetBucketRequestPayment for details on how to use this API operation.
  2346. //
  2347. // The context must be non-nil and will be used for request cancellation. If
  2348. // the context is nil a panic will occur. In the future the SDK may create
  2349. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2350. // for more information on using Contexts.
  2351. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2352. req, out := c.GetBucketRequestPaymentRequest(input)
  2353. req.SetContext(ctx)
  2354. req.ApplyOptions(opts...)
  2355. return out, req.Send()
  2356. }
  2357. const opGetBucketTagging = "GetBucketTagging"
  2358. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2359. // client's request for the GetBucketTagging operation. The "output" return
  2360. // value can be used to capture response data after the request's "Send" method
  2361. // is called.
  2362. //
  2363. // See GetBucketTagging for usage and error information.
  2364. //
  2365. // Creating a request object using this method should be used when you want to inject
  2366. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2367. // access properties on the request object before or after sending the request. If
  2368. // you just want the service response, call the GetBucketTagging method directly
  2369. // instead.
  2370. //
  2371. // Note: You must call the "Send" method on the returned request object in order
  2372. // to execute the request.
  2373. //
  2374. // // Example sending a request using the GetBucketTaggingRequest method.
  2375. // req, resp := client.GetBucketTaggingRequest(params)
  2376. //
  2377. // err := req.Send()
  2378. // if err == nil { // resp is now filled
  2379. // fmt.Println(resp)
  2380. // }
  2381. //
  2382. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2383. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2384. op := &request.Operation{
  2385. Name: opGetBucketTagging,
  2386. HTTPMethod: "GET",
  2387. HTTPPath: "/{Bucket}?tagging",
  2388. }
  2389. if input == nil {
  2390. input = &GetBucketTaggingInput{}
  2391. }
  2392. output = &GetBucketTaggingOutput{}
  2393. req = c.newRequest(op, input, output)
  2394. return
  2395. }
  2396. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2397. //
  2398. // Returns the tag set associated with the bucket.
  2399. //
  2400. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2401. // with awserr.Error's Code and Message methods to get detailed information about
  2402. // the error.
  2403. //
  2404. // See the AWS API reference guide for Amazon Simple Storage Service's
  2405. // API operation GetBucketTagging for usage and error information.
  2406. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2407. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2408. req, out := c.GetBucketTaggingRequest(input)
  2409. return out, req.Send()
  2410. }
  2411. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2412. // the ability to pass a context and additional request options.
  2413. //
  2414. // See GetBucketTagging for details on how to use this API operation.
  2415. //
  2416. // The context must be non-nil and will be used for request cancellation. If
  2417. // the context is nil a panic will occur. In the future the SDK may create
  2418. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2419. // for more information on using Contexts.
  2420. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2421. req, out := c.GetBucketTaggingRequest(input)
  2422. req.SetContext(ctx)
  2423. req.ApplyOptions(opts...)
  2424. return out, req.Send()
  2425. }
  2426. const opGetBucketVersioning = "GetBucketVersioning"
  2427. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2428. // client's request for the GetBucketVersioning operation. The "output" return
  2429. // value can be used to capture response data after the request's "Send" method
  2430. // is called.
  2431. //
  2432. // See GetBucketVersioning for usage and error information.
  2433. //
  2434. // Creating a request object using this method should be used when you want to inject
  2435. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2436. // access properties on the request object before or after sending the request. If
  2437. // you just want the service response, call the GetBucketVersioning method directly
  2438. // instead.
  2439. //
  2440. // Note: You must call the "Send" method on the returned request object in order
  2441. // to execute the request.
  2442. //
  2443. // // Example sending a request using the GetBucketVersioningRequest method.
  2444. // req, resp := client.GetBucketVersioningRequest(params)
  2445. //
  2446. // err := req.Send()
  2447. // if err == nil { // resp is now filled
  2448. // fmt.Println(resp)
  2449. // }
  2450. //
  2451. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2452. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2453. op := &request.Operation{
  2454. Name: opGetBucketVersioning,
  2455. HTTPMethod: "GET",
  2456. HTTPPath: "/{Bucket}?versioning",
  2457. }
  2458. if input == nil {
  2459. input = &GetBucketVersioningInput{}
  2460. }
  2461. output = &GetBucketVersioningOutput{}
  2462. req = c.newRequest(op, input, output)
  2463. return
  2464. }
  2465. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2466. //
  2467. // Returns the versioning state of a bucket.
  2468. //
  2469. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2470. // with awserr.Error's Code and Message methods to get detailed information about
  2471. // the error.
  2472. //
  2473. // See the AWS API reference guide for Amazon Simple Storage Service's
  2474. // API operation GetBucketVersioning for usage and error information.
  2475. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2476. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2477. req, out := c.GetBucketVersioningRequest(input)
  2478. return out, req.Send()
  2479. }
  2480. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2481. // the ability to pass a context and additional request options.
  2482. //
  2483. // See GetBucketVersioning for details on how to use this API operation.
  2484. //
  2485. // The context must be non-nil and will be used for request cancellation. If
  2486. // the context is nil a panic will occur. In the future the SDK may create
  2487. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2488. // for more information on using Contexts.
  2489. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2490. req, out := c.GetBucketVersioningRequest(input)
  2491. req.SetContext(ctx)
  2492. req.ApplyOptions(opts...)
  2493. return out, req.Send()
  2494. }
  2495. const opGetBucketWebsite = "GetBucketWebsite"
  2496. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2497. // client's request for the GetBucketWebsite operation. The "output" return
  2498. // value can be used to capture response data after the request's "Send" method
  2499. // is called.
  2500. //
  2501. // See GetBucketWebsite for usage and error information.
  2502. //
  2503. // Creating a request object using this method should be used when you want to inject
  2504. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2505. // access properties on the request object before or after sending the request. If
  2506. // you just want the service response, call the GetBucketWebsite method directly
  2507. // instead.
  2508. //
  2509. // Note: You must call the "Send" method on the returned request object in order
  2510. // to execute the request.
  2511. //
  2512. // // Example sending a request using the GetBucketWebsiteRequest method.
  2513. // req, resp := client.GetBucketWebsiteRequest(params)
  2514. //
  2515. // err := req.Send()
  2516. // if err == nil { // resp is now filled
  2517. // fmt.Println(resp)
  2518. // }
  2519. //
  2520. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2521. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2522. op := &request.Operation{
  2523. Name: opGetBucketWebsite,
  2524. HTTPMethod: "GET",
  2525. HTTPPath: "/{Bucket}?website",
  2526. }
  2527. if input == nil {
  2528. input = &GetBucketWebsiteInput{}
  2529. }
  2530. output = &GetBucketWebsiteOutput{}
  2531. req = c.newRequest(op, input, output)
  2532. return
  2533. }
  2534. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2535. //
  2536. // Returns the website configuration for a bucket.
  2537. //
  2538. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2539. // with awserr.Error's Code and Message methods to get detailed information about
  2540. // the error.
  2541. //
  2542. // See the AWS API reference guide for Amazon Simple Storage Service's
  2543. // API operation GetBucketWebsite for usage and error information.
  2544. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2545. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2546. req, out := c.GetBucketWebsiteRequest(input)
  2547. return out, req.Send()
  2548. }
  2549. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2550. // the ability to pass a context and additional request options.
  2551. //
  2552. // See GetBucketWebsite for details on how to use this API operation.
  2553. //
  2554. // The context must be non-nil and will be used for request cancellation. If
  2555. // the context is nil a panic will occur. In the future the SDK may create
  2556. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2557. // for more information on using Contexts.
  2558. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2559. req, out := c.GetBucketWebsiteRequest(input)
  2560. req.SetContext(ctx)
  2561. req.ApplyOptions(opts...)
  2562. return out, req.Send()
  2563. }
  2564. const opGetObject = "GetObject"
  2565. // GetObjectRequest generates a "aws/request.Request" representing the
  2566. // client's request for the GetObject operation. The "output" return
  2567. // value can be used to capture response data after the request's "Send" method
  2568. // is called.
  2569. //
  2570. // See GetObject for usage and error information.
  2571. //
  2572. // Creating a request object using this method should be used when you want to inject
  2573. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2574. // access properties on the request object before or after sending the request. If
  2575. // you just want the service response, call the GetObject method directly
  2576. // instead.
  2577. //
  2578. // Note: You must call the "Send" method on the returned request object in order
  2579. // to execute the request.
  2580. //
  2581. // // Example sending a request using the GetObjectRequest method.
  2582. // req, resp := client.GetObjectRequest(params)
  2583. //
  2584. // err := req.Send()
  2585. // if err == nil { // resp is now filled
  2586. // fmt.Println(resp)
  2587. // }
  2588. //
  2589. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2590. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2591. op := &request.Operation{
  2592. Name: opGetObject,
  2593. HTTPMethod: "GET",
  2594. HTTPPath: "/{Bucket}/{Key+}",
  2595. }
  2596. if input == nil {
  2597. input = &GetObjectInput{}
  2598. }
  2599. output = &GetObjectOutput{}
  2600. req = c.newRequest(op, input, output)
  2601. return
  2602. }
  2603. // GetObject API operation for Amazon Simple Storage Service.
  2604. //
  2605. // Retrieves objects from Amazon S3.
  2606. //
  2607. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2608. // with awserr.Error's Code and Message methods to get detailed information about
  2609. // the error.
  2610. //
  2611. // See the AWS API reference guide for Amazon Simple Storage Service's
  2612. // API operation GetObject for usage and error information.
  2613. //
  2614. // Returned Error Codes:
  2615. // * ErrCodeNoSuchKey "NoSuchKey"
  2616. // The specified key does not exist.
  2617. //
  2618. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2619. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2620. req, out := c.GetObjectRequest(input)
  2621. return out, req.Send()
  2622. }
  2623. // GetObjectWithContext is the same as GetObject with the addition of
  2624. // the ability to pass a context and additional request options.
  2625. //
  2626. // See GetObject for details on how to use this API operation.
  2627. //
  2628. // The context must be non-nil and will be used for request cancellation. If
  2629. // the context is nil a panic will occur. In the future the SDK may create
  2630. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2631. // for more information on using Contexts.
  2632. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2633. req, out := c.GetObjectRequest(input)
  2634. req.SetContext(ctx)
  2635. req.ApplyOptions(opts...)
  2636. return out, req.Send()
  2637. }
  2638. const opGetObjectAcl = "GetObjectAcl"
  2639. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2640. // client's request for the GetObjectAcl operation. The "output" return
  2641. // value can be used to capture response data after the request's "Send" method
  2642. // is called.
  2643. //
  2644. // See GetObjectAcl for usage and error information.
  2645. //
  2646. // Creating a request object using this method should be used when you want to inject
  2647. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2648. // access properties on the request object before or after sending the request. If
  2649. // you just want the service response, call the GetObjectAcl method directly
  2650. // instead.
  2651. //
  2652. // Note: You must call the "Send" method on the returned request object in order
  2653. // to execute the request.
  2654. //
  2655. // // Example sending a request using the GetObjectAclRequest method.
  2656. // req, resp := client.GetObjectAclRequest(params)
  2657. //
  2658. // err := req.Send()
  2659. // if err == nil { // resp is now filled
  2660. // fmt.Println(resp)
  2661. // }
  2662. //
  2663. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2664. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2665. op := &request.Operation{
  2666. Name: opGetObjectAcl,
  2667. HTTPMethod: "GET",
  2668. HTTPPath: "/{Bucket}/{Key+}?acl",
  2669. }
  2670. if input == nil {
  2671. input = &GetObjectAclInput{}
  2672. }
  2673. output = &GetObjectAclOutput{}
  2674. req = c.newRequest(op, input, output)
  2675. return
  2676. }
  2677. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2678. //
  2679. // Returns the access control list (ACL) of an object.
  2680. //
  2681. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2682. // with awserr.Error's Code and Message methods to get detailed information about
  2683. // the error.
  2684. //
  2685. // See the AWS API reference guide for Amazon Simple Storage Service's
  2686. // API operation GetObjectAcl for usage and error information.
  2687. //
  2688. // Returned Error Codes:
  2689. // * ErrCodeNoSuchKey "NoSuchKey"
  2690. // The specified key does not exist.
  2691. //
  2692. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2693. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2694. req, out := c.GetObjectAclRequest(input)
  2695. return out, req.Send()
  2696. }
  2697. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2698. // the ability to pass a context and additional request options.
  2699. //
  2700. // See GetObjectAcl for details on how to use this API operation.
  2701. //
  2702. // The context must be non-nil and will be used for request cancellation. If
  2703. // the context is nil a panic will occur. In the future the SDK may create
  2704. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2705. // for more information on using Contexts.
  2706. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2707. req, out := c.GetObjectAclRequest(input)
  2708. req.SetContext(ctx)
  2709. req.ApplyOptions(opts...)
  2710. return out, req.Send()
  2711. }
  2712. const opGetObjectTagging = "GetObjectTagging"
  2713. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  2714. // client's request for the GetObjectTagging operation. The "output" return
  2715. // value can be used to capture response data after the request's "Send" method
  2716. // is called.
  2717. //
  2718. // See GetObjectTagging for usage and error information.
  2719. //
  2720. // Creating a request object using this method should be used when you want to inject
  2721. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2722. // access properties on the request object before or after sending the request. If
  2723. // you just want the service response, call the GetObjectTagging method directly
  2724. // instead.
  2725. //
  2726. // Note: You must call the "Send" method on the returned request object in order
  2727. // to execute the request.
  2728. //
  2729. // // Example sending a request using the GetObjectTaggingRequest method.
  2730. // req, resp := client.GetObjectTaggingRequest(params)
  2731. //
  2732. // err := req.Send()
  2733. // if err == nil { // resp is now filled
  2734. // fmt.Println(resp)
  2735. // }
  2736. //
  2737. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2738. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  2739. op := &request.Operation{
  2740. Name: opGetObjectTagging,
  2741. HTTPMethod: "GET",
  2742. HTTPPath: "/{Bucket}/{Key+}?tagging",
  2743. }
  2744. if input == nil {
  2745. input = &GetObjectTaggingInput{}
  2746. }
  2747. output = &GetObjectTaggingOutput{}
  2748. req = c.newRequest(op, input, output)
  2749. return
  2750. }
  2751. // GetObjectTagging API operation for Amazon Simple Storage Service.
  2752. //
  2753. // Returns the tag-set of an object.
  2754. //
  2755. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2756. // with awserr.Error's Code and Message methods to get detailed information about
  2757. // the error.
  2758. //
  2759. // See the AWS API reference guide for Amazon Simple Storage Service's
  2760. // API operation GetObjectTagging for usage and error information.
  2761. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2762. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  2763. req, out := c.GetObjectTaggingRequest(input)
  2764. return out, req.Send()
  2765. }
  2766. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  2767. // the ability to pass a context and additional request options.
  2768. //
  2769. // See GetObjectTagging for details on how to use this API operation.
  2770. //
  2771. // The context must be non-nil and will be used for request cancellation. If
  2772. // the context is nil a panic will occur. In the future the SDK may create
  2773. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2774. // for more information on using Contexts.
  2775. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  2776. req, out := c.GetObjectTaggingRequest(input)
  2777. req.SetContext(ctx)
  2778. req.ApplyOptions(opts...)
  2779. return out, req.Send()
  2780. }
  2781. const opGetObjectTorrent = "GetObjectTorrent"
  2782. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  2783. // client's request for the GetObjectTorrent operation. The "output" return
  2784. // value can be used to capture response data after the request's "Send" method
  2785. // is called.
  2786. //
  2787. // See GetObjectTorrent for usage and error information.
  2788. //
  2789. // Creating a request object using this method should be used when you want to inject
  2790. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2791. // access properties on the request object before or after sending the request. If
  2792. // you just want the service response, call the GetObjectTorrent method directly
  2793. // instead.
  2794. //
  2795. // Note: You must call the "Send" method on the returned request object in order
  2796. // to execute the request.
  2797. //
  2798. // // Example sending a request using the GetObjectTorrentRequest method.
  2799. // req, resp := client.GetObjectTorrentRequest(params)
  2800. //
  2801. // err := req.Send()
  2802. // if err == nil { // resp is now filled
  2803. // fmt.Println(resp)
  2804. // }
  2805. //
  2806. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2807. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  2808. op := &request.Operation{
  2809. Name: opGetObjectTorrent,
  2810. HTTPMethod: "GET",
  2811. HTTPPath: "/{Bucket}/{Key+}?torrent",
  2812. }
  2813. if input == nil {
  2814. input = &GetObjectTorrentInput{}
  2815. }
  2816. output = &GetObjectTorrentOutput{}
  2817. req = c.newRequest(op, input, output)
  2818. return
  2819. }
  2820. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  2821. //
  2822. // Return torrent files from a bucket.
  2823. //
  2824. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2825. // with awserr.Error's Code and Message methods to get detailed information about
  2826. // the error.
  2827. //
  2828. // See the AWS API reference guide for Amazon Simple Storage Service's
  2829. // API operation GetObjectTorrent for usage and error information.
  2830. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2831. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  2832. req, out := c.GetObjectTorrentRequest(input)
  2833. return out, req.Send()
  2834. }
  2835. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  2836. // the ability to pass a context and additional request options.
  2837. //
  2838. // See GetObjectTorrent for details on how to use this API operation.
  2839. //
  2840. // The context must be non-nil and will be used for request cancellation. If
  2841. // the context is nil a panic will occur. In the future the SDK may create
  2842. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2843. // for more information on using Contexts.
  2844. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  2845. req, out := c.GetObjectTorrentRequest(input)
  2846. req.SetContext(ctx)
  2847. req.ApplyOptions(opts...)
  2848. return out, req.Send()
  2849. }
  2850. const opHeadBucket = "HeadBucket"
  2851. // HeadBucketRequest generates a "aws/request.Request" representing the
  2852. // client's request for the HeadBucket operation. The "output" return
  2853. // value can be used to capture response data after the request's "Send" method
  2854. // is called.
  2855. //
  2856. // See HeadBucket for usage and error information.
  2857. //
  2858. // Creating a request object using this method should be used when you want to inject
  2859. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2860. // access properties on the request object before or after sending the request. If
  2861. // you just want the service response, call the HeadBucket method directly
  2862. // instead.
  2863. //
  2864. // Note: You must call the "Send" method on the returned request object in order
  2865. // to execute the request.
  2866. //
  2867. // // Example sending a request using the HeadBucketRequest method.
  2868. // req, resp := client.HeadBucketRequest(params)
  2869. //
  2870. // err := req.Send()
  2871. // if err == nil { // resp is now filled
  2872. // fmt.Println(resp)
  2873. // }
  2874. //
  2875. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2876. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  2877. op := &request.Operation{
  2878. Name: opHeadBucket,
  2879. HTTPMethod: "HEAD",
  2880. HTTPPath: "/{Bucket}",
  2881. }
  2882. if input == nil {
  2883. input = &HeadBucketInput{}
  2884. }
  2885. output = &HeadBucketOutput{}
  2886. req = c.newRequest(op, input, output)
  2887. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2888. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2889. return
  2890. }
  2891. // HeadBucket API operation for Amazon Simple Storage Service.
  2892. //
  2893. // This operation is useful to determine if a bucket exists and you have permission
  2894. // to access it.
  2895. //
  2896. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2897. // with awserr.Error's Code and Message methods to get detailed information about
  2898. // the error.
  2899. //
  2900. // See the AWS API reference guide for Amazon Simple Storage Service's
  2901. // API operation HeadBucket for usage and error information.
  2902. //
  2903. // Returned Error Codes:
  2904. // * ErrCodeNoSuchBucket "NoSuchBucket"
  2905. // The specified bucket does not exist.
  2906. //
  2907. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2908. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  2909. req, out := c.HeadBucketRequest(input)
  2910. return out, req.Send()
  2911. }
  2912. // HeadBucketWithContext is the same as HeadBucket with the addition of
  2913. // the ability to pass a context and additional request options.
  2914. //
  2915. // See HeadBucket for details on how to use this API operation.
  2916. //
  2917. // The context must be non-nil and will be used for request cancellation. If
  2918. // the context is nil a panic will occur. In the future the SDK may create
  2919. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2920. // for more information on using Contexts.
  2921. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  2922. req, out := c.HeadBucketRequest(input)
  2923. req.SetContext(ctx)
  2924. req.ApplyOptions(opts...)
  2925. return out, req.Send()
  2926. }
  2927. const opHeadObject = "HeadObject"
  2928. // HeadObjectRequest generates a "aws/request.Request" representing the
  2929. // client's request for the HeadObject operation. The "output" return
  2930. // value can be used to capture response data after the request's "Send" method
  2931. // is called.
  2932. //
  2933. // See HeadObject for usage and error information.
  2934. //
  2935. // Creating a request object using this method should be used when you want to inject
  2936. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2937. // access properties on the request object before or after sending the request. If
  2938. // you just want the service response, call the HeadObject method directly
  2939. // instead.
  2940. //
  2941. // Note: You must call the "Send" method on the returned request object in order
  2942. // to execute the request.
  2943. //
  2944. // // Example sending a request using the HeadObjectRequest method.
  2945. // req, resp := client.HeadObjectRequest(params)
  2946. //
  2947. // err := req.Send()
  2948. // if err == nil { // resp is now filled
  2949. // fmt.Println(resp)
  2950. // }
  2951. //
  2952. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  2953. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  2954. op := &request.Operation{
  2955. Name: opHeadObject,
  2956. HTTPMethod: "HEAD",
  2957. HTTPPath: "/{Bucket}/{Key+}",
  2958. }
  2959. if input == nil {
  2960. input = &HeadObjectInput{}
  2961. }
  2962. output = &HeadObjectOutput{}
  2963. req = c.newRequest(op, input, output)
  2964. return
  2965. }
  2966. // HeadObject API operation for Amazon Simple Storage Service.
  2967. //
  2968. // The HEAD operation retrieves metadata from an object without returning the
  2969. // object itself. This operation is useful if you're only interested in an object's
  2970. // metadata. To use HEAD, you must have READ access to the object.
  2971. //
  2972. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2973. // with awserr.Error's Code and Message methods to get detailed information about
  2974. // the error.
  2975. //
  2976. // See the AWS API reference guide for Amazon Simple Storage Service's
  2977. // API operation HeadObject for usage and error information.
  2978. //
  2979. // Returned Error Codes:
  2980. // * ErrCodeNoSuchKey "NoSuchKey"
  2981. // The specified key does not exist.
  2982. //
  2983. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  2984. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  2985. req, out := c.HeadObjectRequest(input)
  2986. return out, req.Send()
  2987. }
  2988. // HeadObjectWithContext is the same as HeadObject with the addition of
  2989. // the ability to pass a context and additional request options.
  2990. //
  2991. // See HeadObject for details on how to use this API operation.
  2992. //
  2993. // The context must be non-nil and will be used for request cancellation. If
  2994. // the context is nil a panic will occur. In the future the SDK may create
  2995. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2996. // for more information on using Contexts.
  2997. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  2998. req, out := c.HeadObjectRequest(input)
  2999. req.SetContext(ctx)
  3000. req.ApplyOptions(opts...)
  3001. return out, req.Send()
  3002. }
  3003. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3004. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3005. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3006. // value can be used to capture response data after the request's "Send" method
  3007. // is called.
  3008. //
  3009. // See ListBucketAnalyticsConfigurations for usage and error information.
  3010. //
  3011. // Creating a request object using this method should be used when you want to inject
  3012. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3013. // access properties on the request object before or after sending the request. If
  3014. // you just want the service response, call the ListBucketAnalyticsConfigurations method directly
  3015. // instead.
  3016. //
  3017. // Note: You must call the "Send" method on the returned request object in order
  3018. // to execute the request.
  3019. //
  3020. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3021. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3022. //
  3023. // err := req.Send()
  3024. // if err == nil { // resp is now filled
  3025. // fmt.Println(resp)
  3026. // }
  3027. //
  3028. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3029. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3030. op := &request.Operation{
  3031. Name: opListBucketAnalyticsConfigurations,
  3032. HTTPMethod: "GET",
  3033. HTTPPath: "/{Bucket}?analytics",
  3034. }
  3035. if input == nil {
  3036. input = &ListBucketAnalyticsConfigurationsInput{}
  3037. }
  3038. output = &ListBucketAnalyticsConfigurationsOutput{}
  3039. req = c.newRequest(op, input, output)
  3040. return
  3041. }
  3042. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3043. //
  3044. // Lists the analytics configurations for the bucket.
  3045. //
  3046. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3047. // with awserr.Error's Code and Message methods to get detailed information about
  3048. // the error.
  3049. //
  3050. // See the AWS API reference guide for Amazon Simple Storage Service's
  3051. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3052. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3053. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3054. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3055. return out, req.Send()
  3056. }
  3057. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3058. // the ability to pass a context and additional request options.
  3059. //
  3060. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3061. //
  3062. // The context must be non-nil and will be used for request cancellation. If
  3063. // the context is nil a panic will occur. In the future the SDK may create
  3064. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3065. // for more information on using Contexts.
  3066. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3067. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3068. req.SetContext(ctx)
  3069. req.ApplyOptions(opts...)
  3070. return out, req.Send()
  3071. }
  3072. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3073. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3074. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3075. // value can be used to capture response data after the request's "Send" method
  3076. // is called.
  3077. //
  3078. // See ListBucketInventoryConfigurations for usage and error information.
  3079. //
  3080. // Creating a request object using this method should be used when you want to inject
  3081. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3082. // access properties on the request object before or after sending the request. If
  3083. // you just want the service response, call the ListBucketInventoryConfigurations method directly
  3084. // instead.
  3085. //
  3086. // Note: You must call the "Send" method on the returned request object in order
  3087. // to execute the request.
  3088. //
  3089. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3090. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3091. //
  3092. // err := req.Send()
  3093. // if err == nil { // resp is now filled
  3094. // fmt.Println(resp)
  3095. // }
  3096. //
  3097. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3098. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3099. op := &request.Operation{
  3100. Name: opListBucketInventoryConfigurations,
  3101. HTTPMethod: "GET",
  3102. HTTPPath: "/{Bucket}?inventory",
  3103. }
  3104. if input == nil {
  3105. input = &ListBucketInventoryConfigurationsInput{}
  3106. }
  3107. output = &ListBucketInventoryConfigurationsOutput{}
  3108. req = c.newRequest(op, input, output)
  3109. return
  3110. }
  3111. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3112. //
  3113. // Returns a list of inventory configurations for the bucket.
  3114. //
  3115. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3116. // with awserr.Error's Code and Message methods to get detailed information about
  3117. // the error.
  3118. //
  3119. // See the AWS API reference guide for Amazon Simple Storage Service's
  3120. // API operation ListBucketInventoryConfigurations for usage and error information.
  3121. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3122. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3123. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3124. return out, req.Send()
  3125. }
  3126. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3127. // the ability to pass a context and additional request options.
  3128. //
  3129. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3130. //
  3131. // The context must be non-nil and will be used for request cancellation. If
  3132. // the context is nil a panic will occur. In the future the SDK may create
  3133. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3134. // for more information on using Contexts.
  3135. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3136. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3137. req.SetContext(ctx)
  3138. req.ApplyOptions(opts...)
  3139. return out, req.Send()
  3140. }
  3141. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3142. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3143. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3144. // value can be used to capture response data after the request's "Send" method
  3145. // is called.
  3146. //
  3147. // See ListBucketMetricsConfigurations for usage and error information.
  3148. //
  3149. // Creating a request object using this method should be used when you want to inject
  3150. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3151. // access properties on the request object before or after sending the request. If
  3152. // you just want the service response, call the ListBucketMetricsConfigurations method directly
  3153. // instead.
  3154. //
  3155. // Note: You must call the "Send" method on the returned request object in order
  3156. // to execute the request.
  3157. //
  3158. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3159. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3160. //
  3161. // err := req.Send()
  3162. // if err == nil { // resp is now filled
  3163. // fmt.Println(resp)
  3164. // }
  3165. //
  3166. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3167. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3168. op := &request.Operation{
  3169. Name: opListBucketMetricsConfigurations,
  3170. HTTPMethod: "GET",
  3171. HTTPPath: "/{Bucket}?metrics",
  3172. }
  3173. if input == nil {
  3174. input = &ListBucketMetricsConfigurationsInput{}
  3175. }
  3176. output = &ListBucketMetricsConfigurationsOutput{}
  3177. req = c.newRequest(op, input, output)
  3178. return
  3179. }
  3180. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3181. //
  3182. // Lists the metrics configurations for the bucket.
  3183. //
  3184. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3185. // with awserr.Error's Code and Message methods to get detailed information about
  3186. // the error.
  3187. //
  3188. // See the AWS API reference guide for Amazon Simple Storage Service's
  3189. // API operation ListBucketMetricsConfigurations for usage and error information.
  3190. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3191. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3192. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3193. return out, req.Send()
  3194. }
  3195. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3196. // the ability to pass a context and additional request options.
  3197. //
  3198. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3199. //
  3200. // The context must be non-nil and will be used for request cancellation. If
  3201. // the context is nil a panic will occur. In the future the SDK may create
  3202. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3203. // for more information on using Contexts.
  3204. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3205. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3206. req.SetContext(ctx)
  3207. req.ApplyOptions(opts...)
  3208. return out, req.Send()
  3209. }
  3210. const opListBuckets = "ListBuckets"
  3211. // ListBucketsRequest generates a "aws/request.Request" representing the
  3212. // client's request for the ListBuckets operation. The "output" return
  3213. // value can be used to capture response data after the request's "Send" method
  3214. // is called.
  3215. //
  3216. // See ListBuckets for usage and error information.
  3217. //
  3218. // Creating a request object using this method should be used when you want to inject
  3219. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3220. // access properties on the request object before or after sending the request. If
  3221. // you just want the service response, call the ListBuckets method directly
  3222. // instead.
  3223. //
  3224. // Note: You must call the "Send" method on the returned request object in order
  3225. // to execute the request.
  3226. //
  3227. // // Example sending a request using the ListBucketsRequest method.
  3228. // req, resp := client.ListBucketsRequest(params)
  3229. //
  3230. // err := req.Send()
  3231. // if err == nil { // resp is now filled
  3232. // fmt.Println(resp)
  3233. // }
  3234. //
  3235. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3236. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3237. op := &request.Operation{
  3238. Name: opListBuckets,
  3239. HTTPMethod: "GET",
  3240. HTTPPath: "/",
  3241. }
  3242. if input == nil {
  3243. input = &ListBucketsInput{}
  3244. }
  3245. output = &ListBucketsOutput{}
  3246. req = c.newRequest(op, input, output)
  3247. return
  3248. }
  3249. // ListBuckets API operation for Amazon Simple Storage Service.
  3250. //
  3251. // Returns a list of all buckets owned by the authenticated sender of the request.
  3252. //
  3253. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3254. // with awserr.Error's Code and Message methods to get detailed information about
  3255. // the error.
  3256. //
  3257. // See the AWS API reference guide for Amazon Simple Storage Service's
  3258. // API operation ListBuckets for usage and error information.
  3259. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3260. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3261. req, out := c.ListBucketsRequest(input)
  3262. return out, req.Send()
  3263. }
  3264. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3265. // the ability to pass a context and additional request options.
  3266. //
  3267. // See ListBuckets for details on how to use this API operation.
  3268. //
  3269. // The context must be non-nil and will be used for request cancellation. If
  3270. // the context is nil a panic will occur. In the future the SDK may create
  3271. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3272. // for more information on using Contexts.
  3273. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3274. req, out := c.ListBucketsRequest(input)
  3275. req.SetContext(ctx)
  3276. req.ApplyOptions(opts...)
  3277. return out, req.Send()
  3278. }
  3279. const opListMultipartUploads = "ListMultipartUploads"
  3280. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3281. // client's request for the ListMultipartUploads operation. The "output" return
  3282. // value can be used to capture response data after the request's "Send" method
  3283. // is called.
  3284. //
  3285. // See ListMultipartUploads for usage and error information.
  3286. //
  3287. // Creating a request object using this method should be used when you want to inject
  3288. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3289. // access properties on the request object before or after sending the request. If
  3290. // you just want the service response, call the ListMultipartUploads method directly
  3291. // instead.
  3292. //
  3293. // Note: You must call the "Send" method on the returned request object in order
  3294. // to execute the request.
  3295. //
  3296. // // Example sending a request using the ListMultipartUploadsRequest method.
  3297. // req, resp := client.ListMultipartUploadsRequest(params)
  3298. //
  3299. // err := req.Send()
  3300. // if err == nil { // resp is now filled
  3301. // fmt.Println(resp)
  3302. // }
  3303. //
  3304. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3305. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3306. op := &request.Operation{
  3307. Name: opListMultipartUploads,
  3308. HTTPMethod: "GET",
  3309. HTTPPath: "/{Bucket}?uploads",
  3310. Paginator: &request.Paginator{
  3311. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3312. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3313. LimitToken: "MaxUploads",
  3314. TruncationToken: "IsTruncated",
  3315. },
  3316. }
  3317. if input == nil {
  3318. input = &ListMultipartUploadsInput{}
  3319. }
  3320. output = &ListMultipartUploadsOutput{}
  3321. req = c.newRequest(op, input, output)
  3322. return
  3323. }
  3324. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3325. //
  3326. // This operation lists in-progress multipart uploads.
  3327. //
  3328. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3329. // with awserr.Error's Code and Message methods to get detailed information about
  3330. // the error.
  3331. //
  3332. // See the AWS API reference guide for Amazon Simple Storage Service's
  3333. // API operation ListMultipartUploads for usage and error information.
  3334. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3335. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3336. req, out := c.ListMultipartUploadsRequest(input)
  3337. return out, req.Send()
  3338. }
  3339. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3340. // the ability to pass a context and additional request options.
  3341. //
  3342. // See ListMultipartUploads for details on how to use this API operation.
  3343. //
  3344. // The context must be non-nil and will be used for request cancellation. If
  3345. // the context is nil a panic will occur. In the future the SDK may create
  3346. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3347. // for more information on using Contexts.
  3348. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3349. req, out := c.ListMultipartUploadsRequest(input)
  3350. req.SetContext(ctx)
  3351. req.ApplyOptions(opts...)
  3352. return out, req.Send()
  3353. }
  3354. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3355. // calling the "fn" function with the response data for each page. To stop
  3356. // iterating, return false from the fn function.
  3357. //
  3358. // See ListMultipartUploads method for more information on how to use this operation.
  3359. //
  3360. // Note: This operation can generate multiple requests to a service.
  3361. //
  3362. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3363. // pageNum := 0
  3364. // err := client.ListMultipartUploadsPages(params,
  3365. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3366. // pageNum++
  3367. // fmt.Println(page)
  3368. // return pageNum <= 3
  3369. // })
  3370. //
  3371. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3372. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3373. }
  3374. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3375. // it takes a Context and allows setting request options on the pages.
  3376. //
  3377. // The context must be non-nil and will be used for request cancellation. If
  3378. // the context is nil a panic will occur. In the future the SDK may create
  3379. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3380. // for more information on using Contexts.
  3381. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3382. p := request.Pagination{
  3383. NewRequest: func() (*request.Request, error) {
  3384. var inCpy *ListMultipartUploadsInput
  3385. if input != nil {
  3386. tmp := *input
  3387. inCpy = &tmp
  3388. }
  3389. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3390. req.SetContext(ctx)
  3391. req.ApplyOptions(opts...)
  3392. return req, nil
  3393. },
  3394. }
  3395. cont := true
  3396. for p.Next() && cont {
  3397. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3398. }
  3399. return p.Err()
  3400. }
  3401. const opListObjectVersions = "ListObjectVersions"
  3402. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3403. // client's request for the ListObjectVersions operation. The "output" return
  3404. // value can be used to capture response data after the request's "Send" method
  3405. // is called.
  3406. //
  3407. // See ListObjectVersions for usage and error information.
  3408. //
  3409. // Creating a request object using this method should be used when you want to inject
  3410. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3411. // access properties on the request object before or after sending the request. If
  3412. // you just want the service response, call the ListObjectVersions method directly
  3413. // instead.
  3414. //
  3415. // Note: You must call the "Send" method on the returned request object in order
  3416. // to execute the request.
  3417. //
  3418. // // Example sending a request using the ListObjectVersionsRequest method.
  3419. // req, resp := client.ListObjectVersionsRequest(params)
  3420. //
  3421. // err := req.Send()
  3422. // if err == nil { // resp is now filled
  3423. // fmt.Println(resp)
  3424. // }
  3425. //
  3426. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3427. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3428. op := &request.Operation{
  3429. Name: opListObjectVersions,
  3430. HTTPMethod: "GET",
  3431. HTTPPath: "/{Bucket}?versions",
  3432. Paginator: &request.Paginator{
  3433. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3434. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3435. LimitToken: "MaxKeys",
  3436. TruncationToken: "IsTruncated",
  3437. },
  3438. }
  3439. if input == nil {
  3440. input = &ListObjectVersionsInput{}
  3441. }
  3442. output = &ListObjectVersionsOutput{}
  3443. req = c.newRequest(op, input, output)
  3444. return
  3445. }
  3446. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3447. //
  3448. // Returns metadata about all of the versions of objects in a bucket.
  3449. //
  3450. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3451. // with awserr.Error's Code and Message methods to get detailed information about
  3452. // the error.
  3453. //
  3454. // See the AWS API reference guide for Amazon Simple Storage Service's
  3455. // API operation ListObjectVersions for usage and error information.
  3456. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3457. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3458. req, out := c.ListObjectVersionsRequest(input)
  3459. return out, req.Send()
  3460. }
  3461. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3462. // the ability to pass a context and additional request options.
  3463. //
  3464. // See ListObjectVersions for details on how to use this API operation.
  3465. //
  3466. // The context must be non-nil and will be used for request cancellation. If
  3467. // the context is nil a panic will occur. In the future the SDK may create
  3468. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3469. // for more information on using Contexts.
  3470. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3471. req, out := c.ListObjectVersionsRequest(input)
  3472. req.SetContext(ctx)
  3473. req.ApplyOptions(opts...)
  3474. return out, req.Send()
  3475. }
  3476. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3477. // calling the "fn" function with the response data for each page. To stop
  3478. // iterating, return false from the fn function.
  3479. //
  3480. // See ListObjectVersions method for more information on how to use this operation.
  3481. //
  3482. // Note: This operation can generate multiple requests to a service.
  3483. //
  3484. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3485. // pageNum := 0
  3486. // err := client.ListObjectVersionsPages(params,
  3487. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  3488. // pageNum++
  3489. // fmt.Println(page)
  3490. // return pageNum <= 3
  3491. // })
  3492. //
  3493. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  3494. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  3495. }
  3496. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  3497. // it takes a Context and allows setting request options on the pages.
  3498. //
  3499. // The context must be non-nil and will be used for request cancellation. If
  3500. // the context is nil a panic will occur. In the future the SDK may create
  3501. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3502. // for more information on using Contexts.
  3503. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  3504. p := request.Pagination{
  3505. NewRequest: func() (*request.Request, error) {
  3506. var inCpy *ListObjectVersionsInput
  3507. if input != nil {
  3508. tmp := *input
  3509. inCpy = &tmp
  3510. }
  3511. req, _ := c.ListObjectVersionsRequest(inCpy)
  3512. req.SetContext(ctx)
  3513. req.ApplyOptions(opts...)
  3514. return req, nil
  3515. },
  3516. }
  3517. cont := true
  3518. for p.Next() && cont {
  3519. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  3520. }
  3521. return p.Err()
  3522. }
  3523. const opListObjects = "ListObjects"
  3524. // ListObjectsRequest generates a "aws/request.Request" representing the
  3525. // client's request for the ListObjects operation. The "output" return
  3526. // value can be used to capture response data after the request's "Send" method
  3527. // is called.
  3528. //
  3529. // See ListObjects for usage and error information.
  3530. //
  3531. // Creating a request object using this method should be used when you want to inject
  3532. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3533. // access properties on the request object before or after sending the request. If
  3534. // you just want the service response, call the ListObjects method directly
  3535. // instead.
  3536. //
  3537. // Note: You must call the "Send" method on the returned request object in order
  3538. // to execute the request.
  3539. //
  3540. // // Example sending a request using the ListObjectsRequest method.
  3541. // req, resp := client.ListObjectsRequest(params)
  3542. //
  3543. // err := req.Send()
  3544. // if err == nil { // resp is now filled
  3545. // fmt.Println(resp)
  3546. // }
  3547. //
  3548. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3549. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  3550. op := &request.Operation{
  3551. Name: opListObjects,
  3552. HTTPMethod: "GET",
  3553. HTTPPath: "/{Bucket}",
  3554. Paginator: &request.Paginator{
  3555. InputTokens: []string{"Marker"},
  3556. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  3557. LimitToken: "MaxKeys",
  3558. TruncationToken: "IsTruncated",
  3559. },
  3560. }
  3561. if input == nil {
  3562. input = &ListObjectsInput{}
  3563. }
  3564. output = &ListObjectsOutput{}
  3565. req = c.newRequest(op, input, output)
  3566. return
  3567. }
  3568. // ListObjects API operation for Amazon Simple Storage Service.
  3569. //
  3570. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3571. // the request parameters as selection criteria to return a subset of the objects
  3572. // in a bucket.
  3573. //
  3574. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3575. // with awserr.Error's Code and Message methods to get detailed information about
  3576. // the error.
  3577. //
  3578. // See the AWS API reference guide for Amazon Simple Storage Service's
  3579. // API operation ListObjects for usage and error information.
  3580. //
  3581. // Returned Error Codes:
  3582. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3583. // The specified bucket does not exist.
  3584. //
  3585. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3586. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  3587. req, out := c.ListObjectsRequest(input)
  3588. return out, req.Send()
  3589. }
  3590. // ListObjectsWithContext is the same as ListObjects with the addition of
  3591. // the ability to pass a context and additional request options.
  3592. //
  3593. // See ListObjects for details on how to use this API operation.
  3594. //
  3595. // The context must be non-nil and will be used for request cancellation. If
  3596. // the context is nil a panic will occur. In the future the SDK may create
  3597. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3598. // for more information on using Contexts.
  3599. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  3600. req, out := c.ListObjectsRequest(input)
  3601. req.SetContext(ctx)
  3602. req.ApplyOptions(opts...)
  3603. return out, req.Send()
  3604. }
  3605. // ListObjectsPages iterates over the pages of a ListObjects operation,
  3606. // calling the "fn" function with the response data for each page. To stop
  3607. // iterating, return false from the fn function.
  3608. //
  3609. // See ListObjects method for more information on how to use this operation.
  3610. //
  3611. // Note: This operation can generate multiple requests to a service.
  3612. //
  3613. // // Example iterating over at most 3 pages of a ListObjects operation.
  3614. // pageNum := 0
  3615. // err := client.ListObjectsPages(params,
  3616. // func(page *ListObjectsOutput, lastPage bool) bool {
  3617. // pageNum++
  3618. // fmt.Println(page)
  3619. // return pageNum <= 3
  3620. // })
  3621. //
  3622. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  3623. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  3624. }
  3625. // ListObjectsPagesWithContext same as ListObjectsPages except
  3626. // it takes a Context and allows setting request options on the pages.
  3627. //
  3628. // The context must be non-nil and will be used for request cancellation. If
  3629. // the context is nil a panic will occur. In the future the SDK may create
  3630. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3631. // for more information on using Contexts.
  3632. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  3633. p := request.Pagination{
  3634. NewRequest: func() (*request.Request, error) {
  3635. var inCpy *ListObjectsInput
  3636. if input != nil {
  3637. tmp := *input
  3638. inCpy = &tmp
  3639. }
  3640. req, _ := c.ListObjectsRequest(inCpy)
  3641. req.SetContext(ctx)
  3642. req.ApplyOptions(opts...)
  3643. return req, nil
  3644. },
  3645. }
  3646. cont := true
  3647. for p.Next() && cont {
  3648. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  3649. }
  3650. return p.Err()
  3651. }
  3652. const opListObjectsV2 = "ListObjectsV2"
  3653. // ListObjectsV2Request generates a "aws/request.Request" representing the
  3654. // client's request for the ListObjectsV2 operation. The "output" return
  3655. // value can be used to capture response data after the request's "Send" method
  3656. // is called.
  3657. //
  3658. // See ListObjectsV2 for usage and error information.
  3659. //
  3660. // Creating a request object using this method should be used when you want to inject
  3661. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3662. // access properties on the request object before or after sending the request. If
  3663. // you just want the service response, call the ListObjectsV2 method directly
  3664. // instead.
  3665. //
  3666. // Note: You must call the "Send" method on the returned request object in order
  3667. // to execute the request.
  3668. //
  3669. // // Example sending a request using the ListObjectsV2Request method.
  3670. // req, resp := client.ListObjectsV2Request(params)
  3671. //
  3672. // err := req.Send()
  3673. // if err == nil { // resp is now filled
  3674. // fmt.Println(resp)
  3675. // }
  3676. //
  3677. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3678. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  3679. op := &request.Operation{
  3680. Name: opListObjectsV2,
  3681. HTTPMethod: "GET",
  3682. HTTPPath: "/{Bucket}?list-type=2",
  3683. Paginator: &request.Paginator{
  3684. InputTokens: []string{"ContinuationToken"},
  3685. OutputTokens: []string{"NextContinuationToken"},
  3686. LimitToken: "MaxKeys",
  3687. TruncationToken: "",
  3688. },
  3689. }
  3690. if input == nil {
  3691. input = &ListObjectsV2Input{}
  3692. }
  3693. output = &ListObjectsV2Output{}
  3694. req = c.newRequest(op, input, output)
  3695. return
  3696. }
  3697. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  3698. //
  3699. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3700. // the request parameters as selection criteria to return a subset of the objects
  3701. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  3702. // you use this revised API for new application development.
  3703. //
  3704. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3705. // with awserr.Error's Code and Message methods to get detailed information about
  3706. // the error.
  3707. //
  3708. // See the AWS API reference guide for Amazon Simple Storage Service's
  3709. // API operation ListObjectsV2 for usage and error information.
  3710. //
  3711. // Returned Error Codes:
  3712. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3713. // The specified bucket does not exist.
  3714. //
  3715. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3716. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  3717. req, out := c.ListObjectsV2Request(input)
  3718. return out, req.Send()
  3719. }
  3720. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  3721. // the ability to pass a context and additional request options.
  3722. //
  3723. // See ListObjectsV2 for details on how to use this API operation.
  3724. //
  3725. // The context must be non-nil and will be used for request cancellation. If
  3726. // the context is nil a panic will occur. In the future the SDK may create
  3727. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3728. // for more information on using Contexts.
  3729. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  3730. req, out := c.ListObjectsV2Request(input)
  3731. req.SetContext(ctx)
  3732. req.ApplyOptions(opts...)
  3733. return out, req.Send()
  3734. }
  3735. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  3736. // calling the "fn" function with the response data for each page. To stop
  3737. // iterating, return false from the fn function.
  3738. //
  3739. // See ListObjectsV2 method for more information on how to use this operation.
  3740. //
  3741. // Note: This operation can generate multiple requests to a service.
  3742. //
  3743. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  3744. // pageNum := 0
  3745. // err := client.ListObjectsV2Pages(params,
  3746. // func(page *ListObjectsV2Output, lastPage bool) bool {
  3747. // pageNum++
  3748. // fmt.Println(page)
  3749. // return pageNum <= 3
  3750. // })
  3751. //
  3752. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  3753. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  3754. }
  3755. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  3756. // it takes a Context and allows setting request options on the pages.
  3757. //
  3758. // The context must be non-nil and will be used for request cancellation. If
  3759. // the context is nil a panic will occur. In the future the SDK may create
  3760. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3761. // for more information on using Contexts.
  3762. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  3763. p := request.Pagination{
  3764. NewRequest: func() (*request.Request, error) {
  3765. var inCpy *ListObjectsV2Input
  3766. if input != nil {
  3767. tmp := *input
  3768. inCpy = &tmp
  3769. }
  3770. req, _ := c.ListObjectsV2Request(inCpy)
  3771. req.SetContext(ctx)
  3772. req.ApplyOptions(opts...)
  3773. return req, nil
  3774. },
  3775. }
  3776. cont := true
  3777. for p.Next() && cont {
  3778. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  3779. }
  3780. return p.Err()
  3781. }
  3782. const opListParts = "ListParts"
  3783. // ListPartsRequest generates a "aws/request.Request" representing the
  3784. // client's request for the ListParts operation. The "output" return
  3785. // value can be used to capture response data after the request's "Send" method
  3786. // is called.
  3787. //
  3788. // See ListParts for usage and error information.
  3789. //
  3790. // Creating a request object using this method should be used when you want to inject
  3791. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3792. // access properties on the request object before or after sending the request. If
  3793. // you just want the service response, call the ListParts method directly
  3794. // instead.
  3795. //
  3796. // Note: You must call the "Send" method on the returned request object in order
  3797. // to execute the request.
  3798. //
  3799. // // Example sending a request using the ListPartsRequest method.
  3800. // req, resp := client.ListPartsRequest(params)
  3801. //
  3802. // err := req.Send()
  3803. // if err == nil { // resp is now filled
  3804. // fmt.Println(resp)
  3805. // }
  3806. //
  3807. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3808. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  3809. op := &request.Operation{
  3810. Name: opListParts,
  3811. HTTPMethod: "GET",
  3812. HTTPPath: "/{Bucket}/{Key+}",
  3813. Paginator: &request.Paginator{
  3814. InputTokens: []string{"PartNumberMarker"},
  3815. OutputTokens: []string{"NextPartNumberMarker"},
  3816. LimitToken: "MaxParts",
  3817. TruncationToken: "IsTruncated",
  3818. },
  3819. }
  3820. if input == nil {
  3821. input = &ListPartsInput{}
  3822. }
  3823. output = &ListPartsOutput{}
  3824. req = c.newRequest(op, input, output)
  3825. return
  3826. }
  3827. // ListParts API operation for Amazon Simple Storage Service.
  3828. //
  3829. // Lists the parts that have been uploaded for a specific multipart upload.
  3830. //
  3831. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3832. // with awserr.Error's Code and Message methods to get detailed information about
  3833. // the error.
  3834. //
  3835. // See the AWS API reference guide for Amazon Simple Storage Service's
  3836. // API operation ListParts for usage and error information.
  3837. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3838. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  3839. req, out := c.ListPartsRequest(input)
  3840. return out, req.Send()
  3841. }
  3842. // ListPartsWithContext is the same as ListParts with the addition of
  3843. // the ability to pass a context and additional request options.
  3844. //
  3845. // See ListParts for details on how to use this API operation.
  3846. //
  3847. // The context must be non-nil and will be used for request cancellation. If
  3848. // the context is nil a panic will occur. In the future the SDK may create
  3849. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3850. // for more information on using Contexts.
  3851. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  3852. req, out := c.ListPartsRequest(input)
  3853. req.SetContext(ctx)
  3854. req.ApplyOptions(opts...)
  3855. return out, req.Send()
  3856. }
  3857. // ListPartsPages iterates over the pages of a ListParts operation,
  3858. // calling the "fn" function with the response data for each page. To stop
  3859. // iterating, return false from the fn function.
  3860. //
  3861. // See ListParts method for more information on how to use this operation.
  3862. //
  3863. // Note: This operation can generate multiple requests to a service.
  3864. //
  3865. // // Example iterating over at most 3 pages of a ListParts operation.
  3866. // pageNum := 0
  3867. // err := client.ListPartsPages(params,
  3868. // func(page *ListPartsOutput, lastPage bool) bool {
  3869. // pageNum++
  3870. // fmt.Println(page)
  3871. // return pageNum <= 3
  3872. // })
  3873. //
  3874. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  3875. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  3876. }
  3877. // ListPartsPagesWithContext same as ListPartsPages except
  3878. // it takes a Context and allows setting request options on the pages.
  3879. //
  3880. // The context must be non-nil and will be used for request cancellation. If
  3881. // the context is nil a panic will occur. In the future the SDK may create
  3882. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3883. // for more information on using Contexts.
  3884. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  3885. p := request.Pagination{
  3886. NewRequest: func() (*request.Request, error) {
  3887. var inCpy *ListPartsInput
  3888. if input != nil {
  3889. tmp := *input
  3890. inCpy = &tmp
  3891. }
  3892. req, _ := c.ListPartsRequest(inCpy)
  3893. req.SetContext(ctx)
  3894. req.ApplyOptions(opts...)
  3895. return req, nil
  3896. },
  3897. }
  3898. cont := true
  3899. for p.Next() && cont {
  3900. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  3901. }
  3902. return p.Err()
  3903. }
  3904. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  3905. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  3906. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  3907. // value can be used to capture response data after the request's "Send" method
  3908. // is called.
  3909. //
  3910. // See PutBucketAccelerateConfiguration for usage and error information.
  3911. //
  3912. // Creating a request object using this method should be used when you want to inject
  3913. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3914. // access properties on the request object before or after sending the request. If
  3915. // you just want the service response, call the PutBucketAccelerateConfiguration method directly
  3916. // instead.
  3917. //
  3918. // Note: You must call the "Send" method on the returned request object in order
  3919. // to execute the request.
  3920. //
  3921. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  3922. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  3923. //
  3924. // err := req.Send()
  3925. // if err == nil { // resp is now filled
  3926. // fmt.Println(resp)
  3927. // }
  3928. //
  3929. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  3930. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  3931. op := &request.Operation{
  3932. Name: opPutBucketAccelerateConfiguration,
  3933. HTTPMethod: "PUT",
  3934. HTTPPath: "/{Bucket}?accelerate",
  3935. }
  3936. if input == nil {
  3937. input = &PutBucketAccelerateConfigurationInput{}
  3938. }
  3939. output = &PutBucketAccelerateConfigurationOutput{}
  3940. req = c.newRequest(op, input, output)
  3941. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3942. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3943. return
  3944. }
  3945. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  3946. //
  3947. // Sets the accelerate configuration of an existing bucket.
  3948. //
  3949. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3950. // with awserr.Error's Code and Message methods to get detailed information about
  3951. // the error.
  3952. //
  3953. // See the AWS API reference guide for Amazon Simple Storage Service's
  3954. // API operation PutBucketAccelerateConfiguration for usage and error information.
  3955. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  3956. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  3957. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  3958. return out, req.Send()
  3959. }
  3960. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  3961. // the ability to pass a context and additional request options.
  3962. //
  3963. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  3964. //
  3965. // The context must be non-nil and will be used for request cancellation. If
  3966. // the context is nil a panic will occur. In the future the SDK may create
  3967. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3968. // for more information on using Contexts.
  3969. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  3970. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  3971. req.SetContext(ctx)
  3972. req.ApplyOptions(opts...)
  3973. return out, req.Send()
  3974. }
  3975. const opPutBucketAcl = "PutBucketAcl"
  3976. // PutBucketAclRequest generates a "aws/request.Request" representing the
  3977. // client's request for the PutBucketAcl operation. The "output" return
  3978. // value can be used to capture response data after the request's "Send" method
  3979. // is called.
  3980. //
  3981. // See PutBucketAcl for usage and error information.
  3982. //
  3983. // Creating a request object using this method should be used when you want to inject
  3984. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3985. // access properties on the request object before or after sending the request. If
  3986. // you just want the service response, call the PutBucketAcl method directly
  3987. // instead.
  3988. //
  3989. // Note: You must call the "Send" method on the returned request object in order
  3990. // to execute the request.
  3991. //
  3992. // // Example sending a request using the PutBucketAclRequest method.
  3993. // req, resp := client.PutBucketAclRequest(params)
  3994. //
  3995. // err := req.Send()
  3996. // if err == nil { // resp is now filled
  3997. // fmt.Println(resp)
  3998. // }
  3999. //
  4000. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4001. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4002. op := &request.Operation{
  4003. Name: opPutBucketAcl,
  4004. HTTPMethod: "PUT",
  4005. HTTPPath: "/{Bucket}?acl",
  4006. }
  4007. if input == nil {
  4008. input = &PutBucketAclInput{}
  4009. }
  4010. output = &PutBucketAclOutput{}
  4011. req = c.newRequest(op, input, output)
  4012. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4013. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4014. return
  4015. }
  4016. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4017. //
  4018. // Sets the permissions on a bucket using access control lists (ACL).
  4019. //
  4020. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4021. // with awserr.Error's Code and Message methods to get detailed information about
  4022. // the error.
  4023. //
  4024. // See the AWS API reference guide for Amazon Simple Storage Service's
  4025. // API operation PutBucketAcl for usage and error information.
  4026. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4027. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4028. req, out := c.PutBucketAclRequest(input)
  4029. return out, req.Send()
  4030. }
  4031. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4032. // the ability to pass a context and additional request options.
  4033. //
  4034. // See PutBucketAcl for details on how to use this API operation.
  4035. //
  4036. // The context must be non-nil and will be used for request cancellation. If
  4037. // the context is nil a panic will occur. In the future the SDK may create
  4038. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4039. // for more information on using Contexts.
  4040. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4041. req, out := c.PutBucketAclRequest(input)
  4042. req.SetContext(ctx)
  4043. req.ApplyOptions(opts...)
  4044. return out, req.Send()
  4045. }
  4046. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4047. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4048. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4049. // value can be used to capture response data after the request's "Send" method
  4050. // is called.
  4051. //
  4052. // See PutBucketAnalyticsConfiguration for usage and error information.
  4053. //
  4054. // Creating a request object using this method should be used when you want to inject
  4055. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4056. // access properties on the request object before or after sending the request. If
  4057. // you just want the service response, call the PutBucketAnalyticsConfiguration method directly
  4058. // instead.
  4059. //
  4060. // Note: You must call the "Send" method on the returned request object in order
  4061. // to execute the request.
  4062. //
  4063. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4064. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4065. //
  4066. // err := req.Send()
  4067. // if err == nil { // resp is now filled
  4068. // fmt.Println(resp)
  4069. // }
  4070. //
  4071. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4072. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4073. op := &request.Operation{
  4074. Name: opPutBucketAnalyticsConfiguration,
  4075. HTTPMethod: "PUT",
  4076. HTTPPath: "/{Bucket}?analytics",
  4077. }
  4078. if input == nil {
  4079. input = &PutBucketAnalyticsConfigurationInput{}
  4080. }
  4081. output = &PutBucketAnalyticsConfigurationOutput{}
  4082. req = c.newRequest(op, input, output)
  4083. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4084. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4085. return
  4086. }
  4087. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4088. //
  4089. // Sets an analytics configuration for the bucket (specified by the analytics
  4090. // configuration ID).
  4091. //
  4092. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4093. // with awserr.Error's Code and Message methods to get detailed information about
  4094. // the error.
  4095. //
  4096. // See the AWS API reference guide for Amazon Simple Storage Service's
  4097. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4098. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4099. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4100. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4101. return out, req.Send()
  4102. }
  4103. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4104. // the ability to pass a context and additional request options.
  4105. //
  4106. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4107. //
  4108. // The context must be non-nil and will be used for request cancellation. If
  4109. // the context is nil a panic will occur. In the future the SDK may create
  4110. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4111. // for more information on using Contexts.
  4112. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4113. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4114. req.SetContext(ctx)
  4115. req.ApplyOptions(opts...)
  4116. return out, req.Send()
  4117. }
  4118. const opPutBucketCors = "PutBucketCors"
  4119. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4120. // client's request for the PutBucketCors operation. The "output" return
  4121. // value can be used to capture response data after the request's "Send" method
  4122. // is called.
  4123. //
  4124. // See PutBucketCors for usage and error information.
  4125. //
  4126. // Creating a request object using this method should be used when you want to inject
  4127. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4128. // access properties on the request object before or after sending the request. If
  4129. // you just want the service response, call the PutBucketCors method directly
  4130. // instead.
  4131. //
  4132. // Note: You must call the "Send" method on the returned request object in order
  4133. // to execute the request.
  4134. //
  4135. // // Example sending a request using the PutBucketCorsRequest method.
  4136. // req, resp := client.PutBucketCorsRequest(params)
  4137. //
  4138. // err := req.Send()
  4139. // if err == nil { // resp is now filled
  4140. // fmt.Println(resp)
  4141. // }
  4142. //
  4143. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4144. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4145. op := &request.Operation{
  4146. Name: opPutBucketCors,
  4147. HTTPMethod: "PUT",
  4148. HTTPPath: "/{Bucket}?cors",
  4149. }
  4150. if input == nil {
  4151. input = &PutBucketCorsInput{}
  4152. }
  4153. output = &PutBucketCorsOutput{}
  4154. req = c.newRequest(op, input, output)
  4155. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4156. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4157. return
  4158. }
  4159. // PutBucketCors API operation for Amazon Simple Storage Service.
  4160. //
  4161. // Sets the cors configuration for a bucket.
  4162. //
  4163. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4164. // with awserr.Error's Code and Message methods to get detailed information about
  4165. // the error.
  4166. //
  4167. // See the AWS API reference guide for Amazon Simple Storage Service's
  4168. // API operation PutBucketCors for usage and error information.
  4169. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4170. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4171. req, out := c.PutBucketCorsRequest(input)
  4172. return out, req.Send()
  4173. }
  4174. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4175. // the ability to pass a context and additional request options.
  4176. //
  4177. // See PutBucketCors for details on how to use this API operation.
  4178. //
  4179. // The context must be non-nil and will be used for request cancellation. If
  4180. // the context is nil a panic will occur. In the future the SDK may create
  4181. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4182. // for more information on using Contexts.
  4183. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4184. req, out := c.PutBucketCorsRequest(input)
  4185. req.SetContext(ctx)
  4186. req.ApplyOptions(opts...)
  4187. return out, req.Send()
  4188. }
  4189. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4190. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4191. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4192. // value can be used to capture response data after the request's "Send" method
  4193. // is called.
  4194. //
  4195. // See PutBucketInventoryConfiguration for usage and error information.
  4196. //
  4197. // Creating a request object using this method should be used when you want to inject
  4198. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4199. // access properties on the request object before or after sending the request. If
  4200. // you just want the service response, call the PutBucketInventoryConfiguration method directly
  4201. // instead.
  4202. //
  4203. // Note: You must call the "Send" method on the returned request object in order
  4204. // to execute the request.
  4205. //
  4206. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4207. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4208. //
  4209. // err := req.Send()
  4210. // if err == nil { // resp is now filled
  4211. // fmt.Println(resp)
  4212. // }
  4213. //
  4214. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4215. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4216. op := &request.Operation{
  4217. Name: opPutBucketInventoryConfiguration,
  4218. HTTPMethod: "PUT",
  4219. HTTPPath: "/{Bucket}?inventory",
  4220. }
  4221. if input == nil {
  4222. input = &PutBucketInventoryConfigurationInput{}
  4223. }
  4224. output = &PutBucketInventoryConfigurationOutput{}
  4225. req = c.newRequest(op, input, output)
  4226. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4227. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4228. return
  4229. }
  4230. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4231. //
  4232. // Adds an inventory configuration (identified by the inventory ID) from the
  4233. // bucket.
  4234. //
  4235. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4236. // with awserr.Error's Code and Message methods to get detailed information about
  4237. // the error.
  4238. //
  4239. // See the AWS API reference guide for Amazon Simple Storage Service's
  4240. // API operation PutBucketInventoryConfiguration for usage and error information.
  4241. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4242. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4243. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4244. return out, req.Send()
  4245. }
  4246. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4247. // the ability to pass a context and additional request options.
  4248. //
  4249. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4250. //
  4251. // The context must be non-nil and will be used for request cancellation. If
  4252. // the context is nil a panic will occur. In the future the SDK may create
  4253. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4254. // for more information on using Contexts.
  4255. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4256. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4257. req.SetContext(ctx)
  4258. req.ApplyOptions(opts...)
  4259. return out, req.Send()
  4260. }
  4261. const opPutBucketLifecycle = "PutBucketLifecycle"
  4262. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4263. // client's request for the PutBucketLifecycle operation. The "output" return
  4264. // value can be used to capture response data after the request's "Send" method
  4265. // is called.
  4266. //
  4267. // See PutBucketLifecycle for usage and error information.
  4268. //
  4269. // Creating a request object using this method should be used when you want to inject
  4270. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4271. // access properties on the request object before or after sending the request. If
  4272. // you just want the service response, call the PutBucketLifecycle method directly
  4273. // instead.
  4274. //
  4275. // Note: You must call the "Send" method on the returned request object in order
  4276. // to execute the request.
  4277. //
  4278. // // Example sending a request using the PutBucketLifecycleRequest method.
  4279. // req, resp := client.PutBucketLifecycleRequest(params)
  4280. //
  4281. // err := req.Send()
  4282. // if err == nil { // resp is now filled
  4283. // fmt.Println(resp)
  4284. // }
  4285. //
  4286. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4287. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4288. if c.Client.Config.Logger != nil {
  4289. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4290. }
  4291. op := &request.Operation{
  4292. Name: opPutBucketLifecycle,
  4293. HTTPMethod: "PUT",
  4294. HTTPPath: "/{Bucket}?lifecycle",
  4295. }
  4296. if input == nil {
  4297. input = &PutBucketLifecycleInput{}
  4298. }
  4299. output = &PutBucketLifecycleOutput{}
  4300. req = c.newRequest(op, input, output)
  4301. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4302. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4303. return
  4304. }
  4305. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4306. //
  4307. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4308. //
  4309. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4310. // with awserr.Error's Code and Message methods to get detailed information about
  4311. // the error.
  4312. //
  4313. // See the AWS API reference guide for Amazon Simple Storage Service's
  4314. // API operation PutBucketLifecycle for usage and error information.
  4315. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4316. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4317. req, out := c.PutBucketLifecycleRequest(input)
  4318. return out, req.Send()
  4319. }
  4320. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4321. // the ability to pass a context and additional request options.
  4322. //
  4323. // See PutBucketLifecycle for details on how to use this API operation.
  4324. //
  4325. // The context must be non-nil and will be used for request cancellation. If
  4326. // the context is nil a panic will occur. In the future the SDK may create
  4327. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4328. // for more information on using Contexts.
  4329. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4330. req, out := c.PutBucketLifecycleRequest(input)
  4331. req.SetContext(ctx)
  4332. req.ApplyOptions(opts...)
  4333. return out, req.Send()
  4334. }
  4335. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4336. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4337. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4338. // value can be used to capture response data after the request's "Send" method
  4339. // is called.
  4340. //
  4341. // See PutBucketLifecycleConfiguration for usage and error information.
  4342. //
  4343. // Creating a request object using this method should be used when you want to inject
  4344. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4345. // access properties on the request object before or after sending the request. If
  4346. // you just want the service response, call the PutBucketLifecycleConfiguration method directly
  4347. // instead.
  4348. //
  4349. // Note: You must call the "Send" method on the returned request object in order
  4350. // to execute the request.
  4351. //
  4352. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4353. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4354. //
  4355. // err := req.Send()
  4356. // if err == nil { // resp is now filled
  4357. // fmt.Println(resp)
  4358. // }
  4359. //
  4360. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4361. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4362. op := &request.Operation{
  4363. Name: opPutBucketLifecycleConfiguration,
  4364. HTTPMethod: "PUT",
  4365. HTTPPath: "/{Bucket}?lifecycle",
  4366. }
  4367. if input == nil {
  4368. input = &PutBucketLifecycleConfigurationInput{}
  4369. }
  4370. output = &PutBucketLifecycleConfigurationOutput{}
  4371. req = c.newRequest(op, input, output)
  4372. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4373. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4374. return
  4375. }
  4376. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4377. //
  4378. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4379. // exists, it replaces it.
  4380. //
  4381. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4382. // with awserr.Error's Code and Message methods to get detailed information about
  4383. // the error.
  4384. //
  4385. // See the AWS API reference guide for Amazon Simple Storage Service's
  4386. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4387. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4388. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4389. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4390. return out, req.Send()
  4391. }
  4392. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4393. // the ability to pass a context and additional request options.
  4394. //
  4395. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4396. //
  4397. // The context must be non-nil and will be used for request cancellation. If
  4398. // the context is nil a panic will occur. In the future the SDK may create
  4399. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4400. // for more information on using Contexts.
  4401. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4402. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4403. req.SetContext(ctx)
  4404. req.ApplyOptions(opts...)
  4405. return out, req.Send()
  4406. }
  4407. const opPutBucketLogging = "PutBucketLogging"
  4408. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4409. // client's request for the PutBucketLogging operation. The "output" return
  4410. // value can be used to capture response data after the request's "Send" method
  4411. // is called.
  4412. //
  4413. // See PutBucketLogging for usage and error information.
  4414. //
  4415. // Creating a request object using this method should be used when you want to inject
  4416. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4417. // access properties on the request object before or after sending the request. If
  4418. // you just want the service response, call the PutBucketLogging method directly
  4419. // instead.
  4420. //
  4421. // Note: You must call the "Send" method on the returned request object in order
  4422. // to execute the request.
  4423. //
  4424. // // Example sending a request using the PutBucketLoggingRequest method.
  4425. // req, resp := client.PutBucketLoggingRequest(params)
  4426. //
  4427. // err := req.Send()
  4428. // if err == nil { // resp is now filled
  4429. // fmt.Println(resp)
  4430. // }
  4431. //
  4432. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4433. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  4434. op := &request.Operation{
  4435. Name: opPutBucketLogging,
  4436. HTTPMethod: "PUT",
  4437. HTTPPath: "/{Bucket}?logging",
  4438. }
  4439. if input == nil {
  4440. input = &PutBucketLoggingInput{}
  4441. }
  4442. output = &PutBucketLoggingOutput{}
  4443. req = c.newRequest(op, input, output)
  4444. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4445. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4446. return
  4447. }
  4448. // PutBucketLogging API operation for Amazon Simple Storage Service.
  4449. //
  4450. // Set the logging parameters for a bucket and to specify permissions for who
  4451. // can view and modify the logging parameters. To set the logging status of
  4452. // a bucket, you must be the bucket owner.
  4453. //
  4454. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4455. // with awserr.Error's Code and Message methods to get detailed information about
  4456. // the error.
  4457. //
  4458. // See the AWS API reference guide for Amazon Simple Storage Service's
  4459. // API operation PutBucketLogging for usage and error information.
  4460. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4461. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  4462. req, out := c.PutBucketLoggingRequest(input)
  4463. return out, req.Send()
  4464. }
  4465. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  4466. // the ability to pass a context and additional request options.
  4467. //
  4468. // See PutBucketLogging for details on how to use this API operation.
  4469. //
  4470. // The context must be non-nil and will be used for request cancellation. If
  4471. // the context is nil a panic will occur. In the future the SDK may create
  4472. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4473. // for more information on using Contexts.
  4474. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  4475. req, out := c.PutBucketLoggingRequest(input)
  4476. req.SetContext(ctx)
  4477. req.ApplyOptions(opts...)
  4478. return out, req.Send()
  4479. }
  4480. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  4481. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  4482. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  4483. // value can be used to capture response data after the request's "Send" method
  4484. // is called.
  4485. //
  4486. // See PutBucketMetricsConfiguration for usage and error information.
  4487. //
  4488. // Creating a request object using this method should be used when you want to inject
  4489. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4490. // access properties on the request object before or after sending the request. If
  4491. // you just want the service response, call the PutBucketMetricsConfiguration method directly
  4492. // instead.
  4493. //
  4494. // Note: You must call the "Send" method on the returned request object in order
  4495. // to execute the request.
  4496. //
  4497. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  4498. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  4499. //
  4500. // err := req.Send()
  4501. // if err == nil { // resp is now filled
  4502. // fmt.Println(resp)
  4503. // }
  4504. //
  4505. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4506. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  4507. op := &request.Operation{
  4508. Name: opPutBucketMetricsConfiguration,
  4509. HTTPMethod: "PUT",
  4510. HTTPPath: "/{Bucket}?metrics",
  4511. }
  4512. if input == nil {
  4513. input = &PutBucketMetricsConfigurationInput{}
  4514. }
  4515. output = &PutBucketMetricsConfigurationOutput{}
  4516. req = c.newRequest(op, input, output)
  4517. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4518. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4519. return
  4520. }
  4521. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  4522. //
  4523. // Sets a metrics configuration (specified by the metrics configuration ID)
  4524. // for the bucket.
  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 PutBucketMetricsConfiguration for usage and error information.
  4532. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4533. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  4534. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4535. return out, req.Send()
  4536. }
  4537. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  4538. // the ability to pass a context and additional request options.
  4539. //
  4540. // See PutBucketMetricsConfiguration 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) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  4547. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4548. req.SetContext(ctx)
  4549. req.ApplyOptions(opts...)
  4550. return out, req.Send()
  4551. }
  4552. const opPutBucketNotification = "PutBucketNotification"
  4553. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  4554. // client's request for the PutBucketNotification operation. The "output" return
  4555. // value can be used to capture response data after the request's "Send" method
  4556. // is called.
  4557. //
  4558. // See PutBucketNotification for usage and error information.
  4559. //
  4560. // Creating a request object using this method should be used when you want to inject
  4561. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4562. // access properties on the request object before or after sending the request. If
  4563. // you just want the service response, call the PutBucketNotification method directly
  4564. // instead.
  4565. //
  4566. // Note: You must call the "Send" method on the returned request object in order
  4567. // to execute the request.
  4568. //
  4569. // // Example sending a request using the PutBucketNotificationRequest method.
  4570. // req, resp := client.PutBucketNotificationRequest(params)
  4571. //
  4572. // err := req.Send()
  4573. // if err == nil { // resp is now filled
  4574. // fmt.Println(resp)
  4575. // }
  4576. //
  4577. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4578. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  4579. if c.Client.Config.Logger != nil {
  4580. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  4581. }
  4582. op := &request.Operation{
  4583. Name: opPutBucketNotification,
  4584. HTTPMethod: "PUT",
  4585. HTTPPath: "/{Bucket}?notification",
  4586. }
  4587. if input == nil {
  4588. input = &PutBucketNotificationInput{}
  4589. }
  4590. output = &PutBucketNotificationOutput{}
  4591. req = c.newRequest(op, input, output)
  4592. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4593. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4594. return
  4595. }
  4596. // PutBucketNotification API operation for Amazon Simple Storage Service.
  4597. //
  4598. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  4599. //
  4600. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4601. // with awserr.Error's Code and Message methods to get detailed information about
  4602. // the error.
  4603. //
  4604. // See the AWS API reference guide for Amazon Simple Storage Service's
  4605. // API operation PutBucketNotification for usage and error information.
  4606. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4607. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  4608. req, out := c.PutBucketNotificationRequest(input)
  4609. return out, req.Send()
  4610. }
  4611. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  4612. // the ability to pass a context and additional request options.
  4613. //
  4614. // See PutBucketNotification for details on how to use this API operation.
  4615. //
  4616. // The context must be non-nil and will be used for request cancellation. If
  4617. // the context is nil a panic will occur. In the future the SDK may create
  4618. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4619. // for more information on using Contexts.
  4620. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  4621. req, out := c.PutBucketNotificationRequest(input)
  4622. req.SetContext(ctx)
  4623. req.ApplyOptions(opts...)
  4624. return out, req.Send()
  4625. }
  4626. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  4627. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  4628. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  4629. // value can be used to capture response data after the request's "Send" method
  4630. // is called.
  4631. //
  4632. // See PutBucketNotificationConfiguration for usage and error information.
  4633. //
  4634. // Creating a request object using this method should be used when you want to inject
  4635. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4636. // access properties on the request object before or after sending the request. If
  4637. // you just want the service response, call the PutBucketNotificationConfiguration method directly
  4638. // instead.
  4639. //
  4640. // Note: You must call the "Send" method on the returned request object in order
  4641. // to execute the request.
  4642. //
  4643. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  4644. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  4645. //
  4646. // err := req.Send()
  4647. // if err == nil { // resp is now filled
  4648. // fmt.Println(resp)
  4649. // }
  4650. //
  4651. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4652. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  4653. op := &request.Operation{
  4654. Name: opPutBucketNotificationConfiguration,
  4655. HTTPMethod: "PUT",
  4656. HTTPPath: "/{Bucket}?notification",
  4657. }
  4658. if input == nil {
  4659. input = &PutBucketNotificationConfigurationInput{}
  4660. }
  4661. output = &PutBucketNotificationConfigurationOutput{}
  4662. req = c.newRequest(op, input, output)
  4663. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4664. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4665. return
  4666. }
  4667. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  4668. //
  4669. // Enables notifications of specified events for a bucket.
  4670. //
  4671. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4672. // with awserr.Error's Code and Message methods to get detailed information about
  4673. // the error.
  4674. //
  4675. // See the AWS API reference guide for Amazon Simple Storage Service's
  4676. // API operation PutBucketNotificationConfiguration for usage and error information.
  4677. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4678. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  4679. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4680. return out, req.Send()
  4681. }
  4682. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  4683. // the ability to pass a context and additional request options.
  4684. //
  4685. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  4686. //
  4687. // The context must be non-nil and will be used for request cancellation. If
  4688. // the context is nil a panic will occur. In the future the SDK may create
  4689. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4690. // for more information on using Contexts.
  4691. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  4692. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4693. req.SetContext(ctx)
  4694. req.ApplyOptions(opts...)
  4695. return out, req.Send()
  4696. }
  4697. const opPutBucketPolicy = "PutBucketPolicy"
  4698. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  4699. // client's request for the PutBucketPolicy operation. The "output" return
  4700. // value can be used to capture response data after the request's "Send" method
  4701. // is called.
  4702. //
  4703. // See PutBucketPolicy for usage and error information.
  4704. //
  4705. // Creating a request object using this method should be used when you want to inject
  4706. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4707. // access properties on the request object before or after sending the request. If
  4708. // you just want the service response, call the PutBucketPolicy method directly
  4709. // instead.
  4710. //
  4711. // Note: You must call the "Send" method on the returned request object in order
  4712. // to execute the request.
  4713. //
  4714. // // Example sending a request using the PutBucketPolicyRequest method.
  4715. // req, resp := client.PutBucketPolicyRequest(params)
  4716. //
  4717. // err := req.Send()
  4718. // if err == nil { // resp is now filled
  4719. // fmt.Println(resp)
  4720. // }
  4721. //
  4722. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4723. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  4724. op := &request.Operation{
  4725. Name: opPutBucketPolicy,
  4726. HTTPMethod: "PUT",
  4727. HTTPPath: "/{Bucket}?policy",
  4728. }
  4729. if input == nil {
  4730. input = &PutBucketPolicyInput{}
  4731. }
  4732. output = &PutBucketPolicyOutput{}
  4733. req = c.newRequest(op, input, output)
  4734. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4735. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4736. return
  4737. }
  4738. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  4739. //
  4740. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  4741. // in this request completely replaces it.
  4742. //
  4743. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4744. // with awserr.Error's Code and Message methods to get detailed information about
  4745. // the error.
  4746. //
  4747. // See the AWS API reference guide for Amazon Simple Storage Service's
  4748. // API operation PutBucketPolicy for usage and error information.
  4749. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4750. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  4751. req, out := c.PutBucketPolicyRequest(input)
  4752. return out, req.Send()
  4753. }
  4754. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  4755. // the ability to pass a context and additional request options.
  4756. //
  4757. // See PutBucketPolicy for details on how to use this API operation.
  4758. //
  4759. // The context must be non-nil and will be used for request cancellation. If
  4760. // the context is nil a panic will occur. In the future the SDK may create
  4761. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4762. // for more information on using Contexts.
  4763. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  4764. req, out := c.PutBucketPolicyRequest(input)
  4765. req.SetContext(ctx)
  4766. req.ApplyOptions(opts...)
  4767. return out, req.Send()
  4768. }
  4769. const opPutBucketReplication = "PutBucketReplication"
  4770. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  4771. // client's request for the PutBucketReplication operation. The "output" return
  4772. // value can be used to capture response data after the request's "Send" method
  4773. // is called.
  4774. //
  4775. // See PutBucketReplication for usage and error information.
  4776. //
  4777. // Creating a request object using this method should be used when you want to inject
  4778. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4779. // access properties on the request object before or after sending the request. If
  4780. // you just want the service response, call the PutBucketReplication method directly
  4781. // instead.
  4782. //
  4783. // Note: You must call the "Send" method on the returned request object in order
  4784. // to execute the request.
  4785. //
  4786. // // Example sending a request using the PutBucketReplicationRequest method.
  4787. // req, resp := client.PutBucketReplicationRequest(params)
  4788. //
  4789. // err := req.Send()
  4790. // if err == nil { // resp is now filled
  4791. // fmt.Println(resp)
  4792. // }
  4793. //
  4794. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4795. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  4796. op := &request.Operation{
  4797. Name: opPutBucketReplication,
  4798. HTTPMethod: "PUT",
  4799. HTTPPath: "/{Bucket}?replication",
  4800. }
  4801. if input == nil {
  4802. input = &PutBucketReplicationInput{}
  4803. }
  4804. output = &PutBucketReplicationOutput{}
  4805. req = c.newRequest(op, input, output)
  4806. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4807. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4808. return
  4809. }
  4810. // PutBucketReplication API operation for Amazon Simple Storage Service.
  4811. //
  4812. // Creates a new replication configuration (or replaces an existing one, if
  4813. // present).
  4814. //
  4815. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4816. // with awserr.Error's Code and Message methods to get detailed information about
  4817. // the error.
  4818. //
  4819. // See the AWS API reference guide for Amazon Simple Storage Service's
  4820. // API operation PutBucketReplication for usage and error information.
  4821. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4822. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  4823. req, out := c.PutBucketReplicationRequest(input)
  4824. return out, req.Send()
  4825. }
  4826. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  4827. // the ability to pass a context and additional request options.
  4828. //
  4829. // See PutBucketReplication for details on how to use this API operation.
  4830. //
  4831. // The context must be non-nil and will be used for request cancellation. If
  4832. // the context is nil a panic will occur. In the future the SDK may create
  4833. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4834. // for more information on using Contexts.
  4835. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  4836. req, out := c.PutBucketReplicationRequest(input)
  4837. req.SetContext(ctx)
  4838. req.ApplyOptions(opts...)
  4839. return out, req.Send()
  4840. }
  4841. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  4842. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  4843. // client's request for the PutBucketRequestPayment operation. The "output" return
  4844. // value can be used to capture response data after the request's "Send" method
  4845. // is called.
  4846. //
  4847. // See PutBucketRequestPayment for usage and error information.
  4848. //
  4849. // Creating a request object using this method should be used when you want to inject
  4850. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4851. // access properties on the request object before or after sending the request. If
  4852. // you just want the service response, call the PutBucketRequestPayment method directly
  4853. // instead.
  4854. //
  4855. // Note: You must call the "Send" method on the returned request object in order
  4856. // to execute the request.
  4857. //
  4858. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  4859. // req, resp := client.PutBucketRequestPaymentRequest(params)
  4860. //
  4861. // err := req.Send()
  4862. // if err == nil { // resp is now filled
  4863. // fmt.Println(resp)
  4864. // }
  4865. //
  4866. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  4867. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  4868. op := &request.Operation{
  4869. Name: opPutBucketRequestPayment,
  4870. HTTPMethod: "PUT",
  4871. HTTPPath: "/{Bucket}?requestPayment",
  4872. }
  4873. if input == nil {
  4874. input = &PutBucketRequestPaymentInput{}
  4875. }
  4876. output = &PutBucketRequestPaymentOutput{}
  4877. req = c.newRequest(op, input, output)
  4878. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4879. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4880. return
  4881. }
  4882. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  4883. //
  4884. // Sets the request payment configuration for a bucket. By default, the bucket
  4885. // owner pays for downloads from the bucket. This configuration parameter enables
  4886. // the bucket owner (only) to specify that the person requesting the download
  4887. // will be charged for the download. Documentation on requester pays buckets
  4888. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  4889. //
  4890. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4891. // with awserr.Error's Code and Message methods to get detailed information about
  4892. // the error.
  4893. //
  4894. // See the AWS API reference guide for Amazon Simple Storage Service's
  4895. // API operation PutBucketRequestPayment for usage and error information.
  4896. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  4897. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  4898. req, out := c.PutBucketRequestPaymentRequest(input)
  4899. return out, req.Send()
  4900. }
  4901. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  4902. // the ability to pass a context and additional request options.
  4903. //
  4904. // See PutBucketRequestPayment for details on how to use this API operation.
  4905. //
  4906. // The context must be non-nil and will be used for request cancellation. If
  4907. // the context is nil a panic will occur. In the future the SDK may create
  4908. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4909. // for more information on using Contexts.
  4910. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  4911. req, out := c.PutBucketRequestPaymentRequest(input)
  4912. req.SetContext(ctx)
  4913. req.ApplyOptions(opts...)
  4914. return out, req.Send()
  4915. }
  4916. const opPutBucketTagging = "PutBucketTagging"
  4917. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  4918. // client's request for the PutBucketTagging operation. The "output" return
  4919. // value can be used to capture response data after the request's "Send" method
  4920. // is called.
  4921. //
  4922. // See PutBucketTagging for usage and error information.
  4923. //
  4924. // Creating a request object using this method should be used when you want to inject
  4925. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4926. // access properties on the request object before or after sending the request. If
  4927. // you just want the service response, call the PutBucketTagging method directly
  4928. // instead.
  4929. //
  4930. // Note: You must call the "Send" method on the returned request object in order
  4931. // to execute the request.
  4932. //
  4933. // // Example sending a request using the PutBucketTaggingRequest method.
  4934. // req, resp := client.PutBucketTaggingRequest(params)
  4935. //
  4936. // err := req.Send()
  4937. // if err == nil { // resp is now filled
  4938. // fmt.Println(resp)
  4939. // }
  4940. //
  4941. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  4942. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  4943. op := &request.Operation{
  4944. Name: opPutBucketTagging,
  4945. HTTPMethod: "PUT",
  4946. HTTPPath: "/{Bucket}?tagging",
  4947. }
  4948. if input == nil {
  4949. input = &PutBucketTaggingInput{}
  4950. }
  4951. output = &PutBucketTaggingOutput{}
  4952. req = c.newRequest(op, input, output)
  4953. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4954. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4955. return
  4956. }
  4957. // PutBucketTagging API operation for Amazon Simple Storage Service.
  4958. //
  4959. // Sets the tags for a bucket.
  4960. //
  4961. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4962. // with awserr.Error's Code and Message methods to get detailed information about
  4963. // the error.
  4964. //
  4965. // See the AWS API reference guide for Amazon Simple Storage Service's
  4966. // API operation PutBucketTagging for usage and error information.
  4967. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  4968. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  4969. req, out := c.PutBucketTaggingRequest(input)
  4970. return out, req.Send()
  4971. }
  4972. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  4973. // the ability to pass a context and additional request options.
  4974. //
  4975. // See PutBucketTagging for details on how to use this API operation.
  4976. //
  4977. // The context must be non-nil and will be used for request cancellation. If
  4978. // the context is nil a panic will occur. In the future the SDK may create
  4979. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4980. // for more information on using Contexts.
  4981. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  4982. req, out := c.PutBucketTaggingRequest(input)
  4983. req.SetContext(ctx)
  4984. req.ApplyOptions(opts...)
  4985. return out, req.Send()
  4986. }
  4987. const opPutBucketVersioning = "PutBucketVersioning"
  4988. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  4989. // client's request for the PutBucketVersioning operation. The "output" return
  4990. // value can be used to capture response data after the request's "Send" method
  4991. // is called.
  4992. //
  4993. // See PutBucketVersioning for usage and error information.
  4994. //
  4995. // Creating a request object using this method should be used when you want to inject
  4996. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4997. // access properties on the request object before or after sending the request. If
  4998. // you just want the service response, call the PutBucketVersioning method directly
  4999. // instead.
  5000. //
  5001. // Note: You must call the "Send" method on the returned request object in order
  5002. // to execute the request.
  5003. //
  5004. // // Example sending a request using the PutBucketVersioningRequest method.
  5005. // req, resp := client.PutBucketVersioningRequest(params)
  5006. //
  5007. // err := req.Send()
  5008. // if err == nil { // resp is now filled
  5009. // fmt.Println(resp)
  5010. // }
  5011. //
  5012. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5013. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5014. op := &request.Operation{
  5015. Name: opPutBucketVersioning,
  5016. HTTPMethod: "PUT",
  5017. HTTPPath: "/{Bucket}?versioning",
  5018. }
  5019. if input == nil {
  5020. input = &PutBucketVersioningInput{}
  5021. }
  5022. output = &PutBucketVersioningOutput{}
  5023. req = c.newRequest(op, input, output)
  5024. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5025. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5026. return
  5027. }
  5028. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5029. //
  5030. // Sets the versioning state of an existing bucket. To set the versioning state,
  5031. // you must be the bucket owner.
  5032. //
  5033. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5034. // with awserr.Error's Code and Message methods to get detailed information about
  5035. // the error.
  5036. //
  5037. // See the AWS API reference guide for Amazon Simple Storage Service's
  5038. // API operation PutBucketVersioning for usage and error information.
  5039. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5040. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5041. req, out := c.PutBucketVersioningRequest(input)
  5042. return out, req.Send()
  5043. }
  5044. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5045. // the ability to pass a context and additional request options.
  5046. //
  5047. // See PutBucketVersioning for details on how to use this API operation.
  5048. //
  5049. // The context must be non-nil and will be used for request cancellation. If
  5050. // the context is nil a panic will occur. In the future the SDK may create
  5051. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5052. // for more information on using Contexts.
  5053. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5054. req, out := c.PutBucketVersioningRequest(input)
  5055. req.SetContext(ctx)
  5056. req.ApplyOptions(opts...)
  5057. return out, req.Send()
  5058. }
  5059. const opPutBucketWebsite = "PutBucketWebsite"
  5060. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5061. // client's request for the PutBucketWebsite operation. The "output" return
  5062. // value can be used to capture response data after the request's "Send" method
  5063. // is called.
  5064. //
  5065. // See PutBucketWebsite for usage and error information.
  5066. //
  5067. // Creating a request object using this method should be used when you want to inject
  5068. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5069. // access properties on the request object before or after sending the request. If
  5070. // you just want the service response, call the PutBucketWebsite method directly
  5071. // instead.
  5072. //
  5073. // Note: You must call the "Send" method on the returned request object in order
  5074. // to execute the request.
  5075. //
  5076. // // Example sending a request using the PutBucketWebsiteRequest method.
  5077. // req, resp := client.PutBucketWebsiteRequest(params)
  5078. //
  5079. // err := req.Send()
  5080. // if err == nil { // resp is now filled
  5081. // fmt.Println(resp)
  5082. // }
  5083. //
  5084. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5085. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5086. op := &request.Operation{
  5087. Name: opPutBucketWebsite,
  5088. HTTPMethod: "PUT",
  5089. HTTPPath: "/{Bucket}?website",
  5090. }
  5091. if input == nil {
  5092. input = &PutBucketWebsiteInput{}
  5093. }
  5094. output = &PutBucketWebsiteOutput{}
  5095. req = c.newRequest(op, input, output)
  5096. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5097. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5098. return
  5099. }
  5100. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5101. //
  5102. // Set the website configuration for a bucket.
  5103. //
  5104. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5105. // with awserr.Error's Code and Message methods to get detailed information about
  5106. // the error.
  5107. //
  5108. // See the AWS API reference guide for Amazon Simple Storage Service's
  5109. // API operation PutBucketWebsite for usage and error information.
  5110. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5111. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5112. req, out := c.PutBucketWebsiteRequest(input)
  5113. return out, req.Send()
  5114. }
  5115. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5116. // the ability to pass a context and additional request options.
  5117. //
  5118. // See PutBucketWebsite for details on how to use this API operation.
  5119. //
  5120. // The context must be non-nil and will be used for request cancellation. If
  5121. // the context is nil a panic will occur. In the future the SDK may create
  5122. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5123. // for more information on using Contexts.
  5124. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5125. req, out := c.PutBucketWebsiteRequest(input)
  5126. req.SetContext(ctx)
  5127. req.ApplyOptions(opts...)
  5128. return out, req.Send()
  5129. }
  5130. const opPutObject = "PutObject"
  5131. // PutObjectRequest generates a "aws/request.Request" representing the
  5132. // client's request for the PutObject operation. The "output" return
  5133. // value can be used to capture response data after the request's "Send" method
  5134. // is called.
  5135. //
  5136. // See PutObject for usage and error information.
  5137. //
  5138. // Creating a request object using this method should be used when you want to inject
  5139. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5140. // access properties on the request object before or after sending the request. If
  5141. // you just want the service response, call the PutObject method directly
  5142. // instead.
  5143. //
  5144. // Note: You must call the "Send" method on the returned request object in order
  5145. // to execute the request.
  5146. //
  5147. // // Example sending a request using the PutObjectRequest method.
  5148. // req, resp := client.PutObjectRequest(params)
  5149. //
  5150. // err := req.Send()
  5151. // if err == nil { // resp is now filled
  5152. // fmt.Println(resp)
  5153. // }
  5154. //
  5155. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5156. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5157. op := &request.Operation{
  5158. Name: opPutObject,
  5159. HTTPMethod: "PUT",
  5160. HTTPPath: "/{Bucket}/{Key+}",
  5161. }
  5162. if input == nil {
  5163. input = &PutObjectInput{}
  5164. }
  5165. output = &PutObjectOutput{}
  5166. req = c.newRequest(op, input, output)
  5167. return
  5168. }
  5169. // PutObject API operation for Amazon Simple Storage Service.
  5170. //
  5171. // Adds an object to a bucket.
  5172. //
  5173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5174. // with awserr.Error's Code and Message methods to get detailed information about
  5175. // the error.
  5176. //
  5177. // See the AWS API reference guide for Amazon Simple Storage Service's
  5178. // API operation PutObject for usage and error information.
  5179. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5180. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5181. req, out := c.PutObjectRequest(input)
  5182. return out, req.Send()
  5183. }
  5184. // PutObjectWithContext is the same as PutObject with the addition of
  5185. // the ability to pass a context and additional request options.
  5186. //
  5187. // See PutObject for details on how to use this API operation.
  5188. //
  5189. // The context must be non-nil and will be used for request cancellation. If
  5190. // the context is nil a panic will occur. In the future the SDK may create
  5191. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5192. // for more information on using Contexts.
  5193. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5194. req, out := c.PutObjectRequest(input)
  5195. req.SetContext(ctx)
  5196. req.ApplyOptions(opts...)
  5197. return out, req.Send()
  5198. }
  5199. const opPutObjectAcl = "PutObjectAcl"
  5200. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5201. // client's request for the PutObjectAcl operation. The "output" return
  5202. // value can be used to capture response data after the request's "Send" method
  5203. // is called.
  5204. //
  5205. // See PutObjectAcl for usage and error information.
  5206. //
  5207. // Creating a request object using this method should be used when you want to inject
  5208. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5209. // access properties on the request object before or after sending the request. If
  5210. // you just want the service response, call the PutObjectAcl method directly
  5211. // instead.
  5212. //
  5213. // Note: You must call the "Send" method on the returned request object in order
  5214. // to execute the request.
  5215. //
  5216. // // Example sending a request using the PutObjectAclRequest method.
  5217. // req, resp := client.PutObjectAclRequest(params)
  5218. //
  5219. // err := req.Send()
  5220. // if err == nil { // resp is now filled
  5221. // fmt.Println(resp)
  5222. // }
  5223. //
  5224. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5225. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5226. op := &request.Operation{
  5227. Name: opPutObjectAcl,
  5228. HTTPMethod: "PUT",
  5229. HTTPPath: "/{Bucket}/{Key+}?acl",
  5230. }
  5231. if input == nil {
  5232. input = &PutObjectAclInput{}
  5233. }
  5234. output = &PutObjectAclOutput{}
  5235. req = c.newRequest(op, input, output)
  5236. return
  5237. }
  5238. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5239. //
  5240. // uses the acl subresource to set the access control list (ACL) permissions
  5241. // for an object that already exists in a bucket
  5242. //
  5243. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5244. // with awserr.Error's Code and Message methods to get detailed information about
  5245. // the error.
  5246. //
  5247. // See the AWS API reference guide for Amazon Simple Storage Service's
  5248. // API operation PutObjectAcl for usage and error information.
  5249. //
  5250. // Returned Error Codes:
  5251. // * ErrCodeNoSuchKey "NoSuchKey"
  5252. // The specified key does not exist.
  5253. //
  5254. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5255. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5256. req, out := c.PutObjectAclRequest(input)
  5257. return out, req.Send()
  5258. }
  5259. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5260. // the ability to pass a context and additional request options.
  5261. //
  5262. // See PutObjectAcl for details on how to use this API operation.
  5263. //
  5264. // The context must be non-nil and will be used for request cancellation. If
  5265. // the context is nil a panic will occur. In the future the SDK may create
  5266. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5267. // for more information on using Contexts.
  5268. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5269. req, out := c.PutObjectAclRequest(input)
  5270. req.SetContext(ctx)
  5271. req.ApplyOptions(opts...)
  5272. return out, req.Send()
  5273. }
  5274. const opPutObjectTagging = "PutObjectTagging"
  5275. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  5276. // client's request for the PutObjectTagging operation. The "output" return
  5277. // value can be used to capture response data after the request's "Send" method
  5278. // is called.
  5279. //
  5280. // See PutObjectTagging for usage and error information.
  5281. //
  5282. // Creating a request object using this method should be used when you want to inject
  5283. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5284. // access properties on the request object before or after sending the request. If
  5285. // you just want the service response, call the PutObjectTagging method directly
  5286. // instead.
  5287. //
  5288. // Note: You must call the "Send" method on the returned request object in order
  5289. // to execute the request.
  5290. //
  5291. // // Example sending a request using the PutObjectTaggingRequest method.
  5292. // req, resp := client.PutObjectTaggingRequest(params)
  5293. //
  5294. // err := req.Send()
  5295. // if err == nil { // resp is now filled
  5296. // fmt.Println(resp)
  5297. // }
  5298. //
  5299. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5300. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  5301. op := &request.Operation{
  5302. Name: opPutObjectTagging,
  5303. HTTPMethod: "PUT",
  5304. HTTPPath: "/{Bucket}/{Key+}?tagging",
  5305. }
  5306. if input == nil {
  5307. input = &PutObjectTaggingInput{}
  5308. }
  5309. output = &PutObjectTaggingOutput{}
  5310. req = c.newRequest(op, input, output)
  5311. return
  5312. }
  5313. // PutObjectTagging API operation for Amazon Simple Storage Service.
  5314. //
  5315. // Sets the supplied tag-set to an object that already exists in a bucket
  5316. //
  5317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5318. // with awserr.Error's Code and Message methods to get detailed information about
  5319. // the error.
  5320. //
  5321. // See the AWS API reference guide for Amazon Simple Storage Service's
  5322. // API operation PutObjectTagging for usage and error information.
  5323. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5324. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  5325. req, out := c.PutObjectTaggingRequest(input)
  5326. return out, req.Send()
  5327. }
  5328. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  5329. // the ability to pass a context and additional request options.
  5330. //
  5331. // See PutObjectTagging for details on how to use this API operation.
  5332. //
  5333. // The context must be non-nil and will be used for request cancellation. If
  5334. // the context is nil a panic will occur. In the future the SDK may create
  5335. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5336. // for more information on using Contexts.
  5337. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  5338. req, out := c.PutObjectTaggingRequest(input)
  5339. req.SetContext(ctx)
  5340. req.ApplyOptions(opts...)
  5341. return out, req.Send()
  5342. }
  5343. const opRestoreObject = "RestoreObject"
  5344. // RestoreObjectRequest generates a "aws/request.Request" representing the
  5345. // client's request for the RestoreObject operation. The "output" return
  5346. // value can be used to capture response data after the request's "Send" method
  5347. // is called.
  5348. //
  5349. // See RestoreObject for usage and error information.
  5350. //
  5351. // Creating a request object using this method should be used when you want to inject
  5352. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5353. // access properties on the request object before or after sending the request. If
  5354. // you just want the service response, call the RestoreObject method directly
  5355. // instead.
  5356. //
  5357. // Note: You must call the "Send" method on the returned request object in order
  5358. // to execute the request.
  5359. //
  5360. // // Example sending a request using the RestoreObjectRequest method.
  5361. // req, resp := client.RestoreObjectRequest(params)
  5362. //
  5363. // err := req.Send()
  5364. // if err == nil { // resp is now filled
  5365. // fmt.Println(resp)
  5366. // }
  5367. //
  5368. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5369. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  5370. op := &request.Operation{
  5371. Name: opRestoreObject,
  5372. HTTPMethod: "POST",
  5373. HTTPPath: "/{Bucket}/{Key+}?restore",
  5374. }
  5375. if input == nil {
  5376. input = &RestoreObjectInput{}
  5377. }
  5378. output = &RestoreObjectOutput{}
  5379. req = c.newRequest(op, input, output)
  5380. return
  5381. }
  5382. // RestoreObject API operation for Amazon Simple Storage Service.
  5383. //
  5384. // Restores an archived copy of an object back into Amazon S3
  5385. //
  5386. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5387. // with awserr.Error's Code and Message methods to get detailed information about
  5388. // the error.
  5389. //
  5390. // See the AWS API reference guide for Amazon Simple Storage Service's
  5391. // API operation RestoreObject for usage and error information.
  5392. //
  5393. // Returned Error Codes:
  5394. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  5395. // This operation is not allowed against this storage tier
  5396. //
  5397. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5398. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  5399. req, out := c.RestoreObjectRequest(input)
  5400. return out, req.Send()
  5401. }
  5402. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  5403. // the ability to pass a context and additional request options.
  5404. //
  5405. // See RestoreObject for details on how to use this API operation.
  5406. //
  5407. // The context must be non-nil and will be used for request cancellation. If
  5408. // the context is nil a panic will occur. In the future the SDK may create
  5409. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5410. // for more information on using Contexts.
  5411. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  5412. req, out := c.RestoreObjectRequest(input)
  5413. req.SetContext(ctx)
  5414. req.ApplyOptions(opts...)
  5415. return out, req.Send()
  5416. }
  5417. const opUploadPart = "UploadPart"
  5418. // UploadPartRequest generates a "aws/request.Request" representing the
  5419. // client's request for the UploadPart operation. The "output" return
  5420. // value can be used to capture response data after the request's "Send" method
  5421. // is called.
  5422. //
  5423. // See UploadPart for usage and error information.
  5424. //
  5425. // Creating a request object using this method should be used when you want to inject
  5426. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5427. // access properties on the request object before or after sending the request. If
  5428. // you just want the service response, call the UploadPart method directly
  5429. // instead.
  5430. //
  5431. // Note: You must call the "Send" method on the returned request object in order
  5432. // to execute the request.
  5433. //
  5434. // // Example sending a request using the UploadPartRequest method.
  5435. // req, resp := client.UploadPartRequest(params)
  5436. //
  5437. // err := req.Send()
  5438. // if err == nil { // resp is now filled
  5439. // fmt.Println(resp)
  5440. // }
  5441. //
  5442. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5443. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  5444. op := &request.Operation{
  5445. Name: opUploadPart,
  5446. HTTPMethod: "PUT",
  5447. HTTPPath: "/{Bucket}/{Key+}",
  5448. }
  5449. if input == nil {
  5450. input = &UploadPartInput{}
  5451. }
  5452. output = &UploadPartOutput{}
  5453. req = c.newRequest(op, input, output)
  5454. return
  5455. }
  5456. // UploadPart API operation for Amazon Simple Storage Service.
  5457. //
  5458. // Uploads a part in a multipart upload.
  5459. //
  5460. // Note: After you initiate multipart upload and upload one or more parts, you
  5461. // must either complete or abort multipart upload in order to stop getting charged
  5462. // for storage of the uploaded parts. Only after you either complete or abort
  5463. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  5464. // you for the parts storage.
  5465. //
  5466. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5467. // with awserr.Error's Code and Message methods to get detailed information about
  5468. // the error.
  5469. //
  5470. // See the AWS API reference guide for Amazon Simple Storage Service's
  5471. // API operation UploadPart for usage and error information.
  5472. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5473. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  5474. req, out := c.UploadPartRequest(input)
  5475. return out, req.Send()
  5476. }
  5477. // UploadPartWithContext is the same as UploadPart with the addition of
  5478. // the ability to pass a context and additional request options.
  5479. //
  5480. // See UploadPart for details on how to use this API operation.
  5481. //
  5482. // The context must be non-nil and will be used for request cancellation. If
  5483. // the context is nil a panic will occur. In the future the SDK may create
  5484. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5485. // for more information on using Contexts.
  5486. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  5487. req, out := c.UploadPartRequest(input)
  5488. req.SetContext(ctx)
  5489. req.ApplyOptions(opts...)
  5490. return out, req.Send()
  5491. }
  5492. const opUploadPartCopy = "UploadPartCopy"
  5493. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  5494. // client's request for the UploadPartCopy operation. The "output" return
  5495. // value can be used to capture response data after the request's "Send" method
  5496. // is called.
  5497. //
  5498. // See UploadPartCopy for usage and error information.
  5499. //
  5500. // Creating a request object using this method should be used when you want to inject
  5501. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5502. // access properties on the request object before or after sending the request. If
  5503. // you just want the service response, call the UploadPartCopy method directly
  5504. // instead.
  5505. //
  5506. // Note: You must call the "Send" method on the returned request object in order
  5507. // to execute the request.
  5508. //
  5509. // // Example sending a request using the UploadPartCopyRequest method.
  5510. // req, resp := client.UploadPartCopyRequest(params)
  5511. //
  5512. // err := req.Send()
  5513. // if err == nil { // resp is now filled
  5514. // fmt.Println(resp)
  5515. // }
  5516. //
  5517. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5518. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  5519. op := &request.Operation{
  5520. Name: opUploadPartCopy,
  5521. HTTPMethod: "PUT",
  5522. HTTPPath: "/{Bucket}/{Key+}",
  5523. }
  5524. if input == nil {
  5525. input = &UploadPartCopyInput{}
  5526. }
  5527. output = &UploadPartCopyOutput{}
  5528. req = c.newRequest(op, input, output)
  5529. return
  5530. }
  5531. // UploadPartCopy API operation for Amazon Simple Storage Service.
  5532. //
  5533. // Uploads a part by copying data from an existing object as data source.
  5534. //
  5535. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5536. // with awserr.Error's Code and Message methods to get detailed information about
  5537. // the error.
  5538. //
  5539. // See the AWS API reference guide for Amazon Simple Storage Service's
  5540. // API operation UploadPartCopy for usage and error information.
  5541. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5542. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  5543. req, out := c.UploadPartCopyRequest(input)
  5544. return out, req.Send()
  5545. }
  5546. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  5547. // the ability to pass a context and additional request options.
  5548. //
  5549. // See UploadPartCopy for details on how to use this API operation.
  5550. //
  5551. // The context must be non-nil and will be used for request cancellation. If
  5552. // the context is nil a panic will occur. In the future the SDK may create
  5553. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5554. // for more information on using Contexts.
  5555. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  5556. req, out := c.UploadPartCopyRequest(input)
  5557. req.SetContext(ctx)
  5558. req.ApplyOptions(opts...)
  5559. return out, req.Send()
  5560. }
  5561. // Specifies the days since the initiation of an Incomplete Multipart Upload
  5562. // that Lifecycle will wait before permanently removing all parts of the upload.
  5563. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortIncompleteMultipartUpload
  5564. type AbortIncompleteMultipartUpload struct {
  5565. _ struct{} `type:"structure"`
  5566. // Indicates the number of days that must pass since initiation for Lifecycle
  5567. // to abort an Incomplete Multipart Upload.
  5568. DaysAfterInitiation *int64 `type:"integer"`
  5569. }
  5570. // String returns the string representation
  5571. func (s AbortIncompleteMultipartUpload) String() string {
  5572. return awsutil.Prettify(s)
  5573. }
  5574. // GoString returns the string representation
  5575. func (s AbortIncompleteMultipartUpload) GoString() string {
  5576. return s.String()
  5577. }
  5578. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  5579. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  5580. s.DaysAfterInitiation = &v
  5581. return s
  5582. }
  5583. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadRequest
  5584. type AbortMultipartUploadInput struct {
  5585. _ struct{} `type:"structure"`
  5586. // Bucket is a required field
  5587. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5588. // Key is a required field
  5589. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5590. // Confirms that the requester knows that she or he will be charged for the
  5591. // request. Bucket owners need not specify this parameter in their requests.
  5592. // Documentation on downloading objects from requester pays buckets can be found
  5593. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5594. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5595. // UploadId is a required field
  5596. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  5597. }
  5598. // String returns the string representation
  5599. func (s AbortMultipartUploadInput) String() string {
  5600. return awsutil.Prettify(s)
  5601. }
  5602. // GoString returns the string representation
  5603. func (s AbortMultipartUploadInput) GoString() string {
  5604. return s.String()
  5605. }
  5606. // Validate inspects the fields of the type to determine if they are valid.
  5607. func (s *AbortMultipartUploadInput) Validate() error {
  5608. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  5609. if s.Bucket == nil {
  5610. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5611. }
  5612. if s.Key == nil {
  5613. invalidParams.Add(request.NewErrParamRequired("Key"))
  5614. }
  5615. if s.Key != nil && len(*s.Key) < 1 {
  5616. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5617. }
  5618. if s.UploadId == nil {
  5619. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  5620. }
  5621. if invalidParams.Len() > 0 {
  5622. return invalidParams
  5623. }
  5624. return nil
  5625. }
  5626. // SetBucket sets the Bucket field's value.
  5627. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  5628. s.Bucket = &v
  5629. return s
  5630. }
  5631. // SetKey sets the Key field's value.
  5632. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  5633. s.Key = &v
  5634. return s
  5635. }
  5636. // SetRequestPayer sets the RequestPayer field's value.
  5637. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  5638. s.RequestPayer = &v
  5639. return s
  5640. }
  5641. // SetUploadId sets the UploadId field's value.
  5642. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  5643. s.UploadId = &v
  5644. return s
  5645. }
  5646. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadOutput
  5647. type AbortMultipartUploadOutput struct {
  5648. _ struct{} `type:"structure"`
  5649. // If present, indicates that the requester was successfully charged for the
  5650. // request.
  5651. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5652. }
  5653. // String returns the string representation
  5654. func (s AbortMultipartUploadOutput) String() string {
  5655. return awsutil.Prettify(s)
  5656. }
  5657. // GoString returns the string representation
  5658. func (s AbortMultipartUploadOutput) GoString() string {
  5659. return s.String()
  5660. }
  5661. // SetRequestCharged sets the RequestCharged field's value.
  5662. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  5663. s.RequestCharged = &v
  5664. return s
  5665. }
  5666. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccelerateConfiguration
  5667. type AccelerateConfiguration struct {
  5668. _ struct{} `type:"structure"`
  5669. // The accelerate configuration of the bucket.
  5670. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  5671. }
  5672. // String returns the string representation
  5673. func (s AccelerateConfiguration) String() string {
  5674. return awsutil.Prettify(s)
  5675. }
  5676. // GoString returns the string representation
  5677. func (s AccelerateConfiguration) GoString() string {
  5678. return s.String()
  5679. }
  5680. // SetStatus sets the Status field's value.
  5681. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  5682. s.Status = &v
  5683. return s
  5684. }
  5685. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlPolicy
  5686. type AccessControlPolicy struct {
  5687. _ struct{} `type:"structure"`
  5688. // A list of grants.
  5689. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5690. Owner *Owner `type:"structure"`
  5691. }
  5692. // String returns the string representation
  5693. func (s AccessControlPolicy) String() string {
  5694. return awsutil.Prettify(s)
  5695. }
  5696. // GoString returns the string representation
  5697. func (s AccessControlPolicy) GoString() string {
  5698. return s.String()
  5699. }
  5700. // Validate inspects the fields of the type to determine if they are valid.
  5701. func (s *AccessControlPolicy) Validate() error {
  5702. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  5703. if s.Grants != nil {
  5704. for i, v := range s.Grants {
  5705. if v == nil {
  5706. continue
  5707. }
  5708. if err := v.Validate(); err != nil {
  5709. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  5710. }
  5711. }
  5712. }
  5713. if invalidParams.Len() > 0 {
  5714. return invalidParams
  5715. }
  5716. return nil
  5717. }
  5718. // SetGrants sets the Grants field's value.
  5719. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  5720. s.Grants = v
  5721. return s
  5722. }
  5723. // SetOwner sets the Owner field's value.
  5724. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  5725. s.Owner = v
  5726. return s
  5727. }
  5728. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator
  5729. type AnalyticsAndOperator struct {
  5730. _ struct{} `type:"structure"`
  5731. // The prefix to use when evaluating an AND predicate.
  5732. Prefix *string `type:"string"`
  5733. // The list of tags to use when evaluating an AND predicate.
  5734. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  5735. }
  5736. // String returns the string representation
  5737. func (s AnalyticsAndOperator) String() string {
  5738. return awsutil.Prettify(s)
  5739. }
  5740. // GoString returns the string representation
  5741. func (s AnalyticsAndOperator) GoString() string {
  5742. return s.String()
  5743. }
  5744. // Validate inspects the fields of the type to determine if they are valid.
  5745. func (s *AnalyticsAndOperator) Validate() error {
  5746. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  5747. if s.Tags != nil {
  5748. for i, v := range s.Tags {
  5749. if v == nil {
  5750. continue
  5751. }
  5752. if err := v.Validate(); err != nil {
  5753. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5754. }
  5755. }
  5756. }
  5757. if invalidParams.Len() > 0 {
  5758. return invalidParams
  5759. }
  5760. return nil
  5761. }
  5762. // SetPrefix sets the Prefix field's value.
  5763. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  5764. s.Prefix = &v
  5765. return s
  5766. }
  5767. // SetTags sets the Tags field's value.
  5768. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  5769. s.Tags = v
  5770. return s
  5771. }
  5772. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsConfiguration
  5773. type AnalyticsConfiguration struct {
  5774. _ struct{} `type:"structure"`
  5775. // The filter used to describe a set of objects for analyses. A filter must
  5776. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  5777. // If no filter is provided, all objects will be considered in any analysis.
  5778. Filter *AnalyticsFilter `type:"structure"`
  5779. // The identifier used to represent an analytics configuration.
  5780. //
  5781. // Id is a required field
  5782. Id *string `type:"string" required:"true"`
  5783. // If present, it indicates that data related to access patterns will be collected
  5784. // and made available to analyze the tradeoffs between different storage classes.
  5785. //
  5786. // StorageClassAnalysis is a required field
  5787. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  5788. }
  5789. // String returns the string representation
  5790. func (s AnalyticsConfiguration) String() string {
  5791. return awsutil.Prettify(s)
  5792. }
  5793. // GoString returns the string representation
  5794. func (s AnalyticsConfiguration) GoString() string {
  5795. return s.String()
  5796. }
  5797. // Validate inspects the fields of the type to determine if they are valid.
  5798. func (s *AnalyticsConfiguration) Validate() error {
  5799. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  5800. if s.Id == nil {
  5801. invalidParams.Add(request.NewErrParamRequired("Id"))
  5802. }
  5803. if s.StorageClassAnalysis == nil {
  5804. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  5805. }
  5806. if s.Filter != nil {
  5807. if err := s.Filter.Validate(); err != nil {
  5808. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  5809. }
  5810. }
  5811. if s.StorageClassAnalysis != nil {
  5812. if err := s.StorageClassAnalysis.Validate(); err != nil {
  5813. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  5814. }
  5815. }
  5816. if invalidParams.Len() > 0 {
  5817. return invalidParams
  5818. }
  5819. return nil
  5820. }
  5821. // SetFilter sets the Filter field's value.
  5822. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  5823. s.Filter = v
  5824. return s
  5825. }
  5826. // SetId sets the Id field's value.
  5827. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  5828. s.Id = &v
  5829. return s
  5830. }
  5831. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  5832. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  5833. s.StorageClassAnalysis = v
  5834. return s
  5835. }
  5836. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsExportDestination
  5837. type AnalyticsExportDestination struct {
  5838. _ struct{} `type:"structure"`
  5839. // A destination signifying output to an S3 bucket.
  5840. //
  5841. // S3BucketDestination is a required field
  5842. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  5843. }
  5844. // String returns the string representation
  5845. func (s AnalyticsExportDestination) String() string {
  5846. return awsutil.Prettify(s)
  5847. }
  5848. // GoString returns the string representation
  5849. func (s AnalyticsExportDestination) GoString() string {
  5850. return s.String()
  5851. }
  5852. // Validate inspects the fields of the type to determine if they are valid.
  5853. func (s *AnalyticsExportDestination) Validate() error {
  5854. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  5855. if s.S3BucketDestination == nil {
  5856. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  5857. }
  5858. if s.S3BucketDestination != nil {
  5859. if err := s.S3BucketDestination.Validate(); err != nil {
  5860. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  5861. }
  5862. }
  5863. if invalidParams.Len() > 0 {
  5864. return invalidParams
  5865. }
  5866. return nil
  5867. }
  5868. // SetS3BucketDestination sets the S3BucketDestination field's value.
  5869. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  5870. s.S3BucketDestination = v
  5871. return s
  5872. }
  5873. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsFilter
  5874. type AnalyticsFilter struct {
  5875. _ struct{} `type:"structure"`
  5876. // A conjunction (logical AND) of predicates, which is used in evaluating an
  5877. // analytics filter. The operator must have at least two predicates.
  5878. And *AnalyticsAndOperator `type:"structure"`
  5879. // The prefix to use when evaluating an analytics filter.
  5880. Prefix *string `type:"string"`
  5881. // The tag to use when evaluating an analytics filter.
  5882. Tag *Tag `type:"structure"`
  5883. }
  5884. // String returns the string representation
  5885. func (s AnalyticsFilter) String() string {
  5886. return awsutil.Prettify(s)
  5887. }
  5888. // GoString returns the string representation
  5889. func (s AnalyticsFilter) GoString() string {
  5890. return s.String()
  5891. }
  5892. // Validate inspects the fields of the type to determine if they are valid.
  5893. func (s *AnalyticsFilter) Validate() error {
  5894. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  5895. if s.And != nil {
  5896. if err := s.And.Validate(); err != nil {
  5897. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  5898. }
  5899. }
  5900. if s.Tag != nil {
  5901. if err := s.Tag.Validate(); err != nil {
  5902. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  5903. }
  5904. }
  5905. if invalidParams.Len() > 0 {
  5906. return invalidParams
  5907. }
  5908. return nil
  5909. }
  5910. // SetAnd sets the And field's value.
  5911. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  5912. s.And = v
  5913. return s
  5914. }
  5915. // SetPrefix sets the Prefix field's value.
  5916. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  5917. s.Prefix = &v
  5918. return s
  5919. }
  5920. // SetTag sets the Tag field's value.
  5921. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  5922. s.Tag = v
  5923. return s
  5924. }
  5925. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsS3BucketDestination
  5926. type AnalyticsS3BucketDestination struct {
  5927. _ struct{} `type:"structure"`
  5928. // The Amazon resource name (ARN) of the bucket to which data is exported.
  5929. //
  5930. // Bucket is a required field
  5931. Bucket *string `type:"string" required:"true"`
  5932. // The account ID that owns the destination bucket. If no account ID is provided,
  5933. // the owner will not be validated prior to exporting data.
  5934. BucketAccountId *string `type:"string"`
  5935. // The file format used when exporting data to Amazon S3.
  5936. //
  5937. // Format is a required field
  5938. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  5939. // The prefix to use when exporting data. The exported data begins with this
  5940. // prefix.
  5941. Prefix *string `type:"string"`
  5942. }
  5943. // String returns the string representation
  5944. func (s AnalyticsS3BucketDestination) String() string {
  5945. return awsutil.Prettify(s)
  5946. }
  5947. // GoString returns the string representation
  5948. func (s AnalyticsS3BucketDestination) GoString() string {
  5949. return s.String()
  5950. }
  5951. // Validate inspects the fields of the type to determine if they are valid.
  5952. func (s *AnalyticsS3BucketDestination) Validate() error {
  5953. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  5954. if s.Bucket == nil {
  5955. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5956. }
  5957. if s.Format == nil {
  5958. invalidParams.Add(request.NewErrParamRequired("Format"))
  5959. }
  5960. if invalidParams.Len() > 0 {
  5961. return invalidParams
  5962. }
  5963. return nil
  5964. }
  5965. // SetBucket sets the Bucket field's value.
  5966. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  5967. s.Bucket = &v
  5968. return s
  5969. }
  5970. // SetBucketAccountId sets the BucketAccountId field's value.
  5971. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  5972. s.BucketAccountId = &v
  5973. return s
  5974. }
  5975. // SetFormat sets the Format field's value.
  5976. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  5977. s.Format = &v
  5978. return s
  5979. }
  5980. // SetPrefix sets the Prefix field's value.
  5981. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  5982. s.Prefix = &v
  5983. return s
  5984. }
  5985. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Bucket
  5986. type Bucket struct {
  5987. _ struct{} `type:"structure"`
  5988. // Date the bucket was created.
  5989. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5990. // The name of the bucket.
  5991. Name *string `type:"string"`
  5992. }
  5993. // String returns the string representation
  5994. func (s Bucket) String() string {
  5995. return awsutil.Prettify(s)
  5996. }
  5997. // GoString returns the string representation
  5998. func (s Bucket) GoString() string {
  5999. return s.String()
  6000. }
  6001. // SetCreationDate sets the CreationDate field's value.
  6002. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6003. s.CreationDate = &v
  6004. return s
  6005. }
  6006. // SetName sets the Name field's value.
  6007. func (s *Bucket) SetName(v string) *Bucket {
  6008. s.Name = &v
  6009. return s
  6010. }
  6011. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration
  6012. type BucketLifecycleConfiguration struct {
  6013. _ struct{} `type:"structure"`
  6014. // Rules is a required field
  6015. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6016. }
  6017. // String returns the string representation
  6018. func (s BucketLifecycleConfiguration) String() string {
  6019. return awsutil.Prettify(s)
  6020. }
  6021. // GoString returns the string representation
  6022. func (s BucketLifecycleConfiguration) GoString() string {
  6023. return s.String()
  6024. }
  6025. // Validate inspects the fields of the type to determine if they are valid.
  6026. func (s *BucketLifecycleConfiguration) Validate() error {
  6027. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6028. if s.Rules == nil {
  6029. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6030. }
  6031. if s.Rules != nil {
  6032. for i, v := range s.Rules {
  6033. if v == nil {
  6034. continue
  6035. }
  6036. if err := v.Validate(); err != nil {
  6037. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6038. }
  6039. }
  6040. }
  6041. if invalidParams.Len() > 0 {
  6042. return invalidParams
  6043. }
  6044. return nil
  6045. }
  6046. // SetRules sets the Rules field's value.
  6047. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6048. s.Rules = v
  6049. return s
  6050. }
  6051. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLoggingStatus
  6052. type BucketLoggingStatus struct {
  6053. _ struct{} `type:"structure"`
  6054. LoggingEnabled *LoggingEnabled `type:"structure"`
  6055. }
  6056. // String returns the string representation
  6057. func (s BucketLoggingStatus) String() string {
  6058. return awsutil.Prettify(s)
  6059. }
  6060. // GoString returns the string representation
  6061. func (s BucketLoggingStatus) GoString() string {
  6062. return s.String()
  6063. }
  6064. // Validate inspects the fields of the type to determine if they are valid.
  6065. func (s *BucketLoggingStatus) Validate() error {
  6066. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  6067. if s.LoggingEnabled != nil {
  6068. if err := s.LoggingEnabled.Validate(); err != nil {
  6069. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  6070. }
  6071. }
  6072. if invalidParams.Len() > 0 {
  6073. return invalidParams
  6074. }
  6075. return nil
  6076. }
  6077. // SetLoggingEnabled sets the LoggingEnabled field's value.
  6078. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  6079. s.LoggingEnabled = v
  6080. return s
  6081. }
  6082. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSConfiguration
  6083. type CORSConfiguration struct {
  6084. _ struct{} `type:"structure"`
  6085. // CORSRules is a required field
  6086. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  6087. }
  6088. // String returns the string representation
  6089. func (s CORSConfiguration) String() string {
  6090. return awsutil.Prettify(s)
  6091. }
  6092. // GoString returns the string representation
  6093. func (s CORSConfiguration) GoString() string {
  6094. return s.String()
  6095. }
  6096. // Validate inspects the fields of the type to determine if they are valid.
  6097. func (s *CORSConfiguration) Validate() error {
  6098. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  6099. if s.CORSRules == nil {
  6100. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  6101. }
  6102. if s.CORSRules != nil {
  6103. for i, v := range s.CORSRules {
  6104. if v == nil {
  6105. continue
  6106. }
  6107. if err := v.Validate(); err != nil {
  6108. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  6109. }
  6110. }
  6111. }
  6112. if invalidParams.Len() > 0 {
  6113. return invalidParams
  6114. }
  6115. return nil
  6116. }
  6117. // SetCORSRules sets the CORSRules field's value.
  6118. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  6119. s.CORSRules = v
  6120. return s
  6121. }
  6122. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSRule
  6123. type CORSRule struct {
  6124. _ struct{} `type:"structure"`
  6125. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  6126. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  6127. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  6128. // to execute.
  6129. //
  6130. // AllowedMethods is a required field
  6131. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  6132. // One or more origins you want customers to be able to access the bucket from.
  6133. //
  6134. // AllowedOrigins is a required field
  6135. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  6136. // One or more headers in the response that you want customers to be able to
  6137. // access from their applications (for example, from a JavaScript XMLHttpRequest
  6138. // object).
  6139. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  6140. // The time in seconds that your browser is to cache the preflight response
  6141. // for the specified resource.
  6142. MaxAgeSeconds *int64 `type:"integer"`
  6143. }
  6144. // String returns the string representation
  6145. func (s CORSRule) String() string {
  6146. return awsutil.Prettify(s)
  6147. }
  6148. // GoString returns the string representation
  6149. func (s CORSRule) GoString() string {
  6150. return s.String()
  6151. }
  6152. // Validate inspects the fields of the type to determine if they are valid.
  6153. func (s *CORSRule) Validate() error {
  6154. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  6155. if s.AllowedMethods == nil {
  6156. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  6157. }
  6158. if s.AllowedOrigins == nil {
  6159. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  6160. }
  6161. if invalidParams.Len() > 0 {
  6162. return invalidParams
  6163. }
  6164. return nil
  6165. }
  6166. // SetAllowedHeaders sets the AllowedHeaders field's value.
  6167. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  6168. s.AllowedHeaders = v
  6169. return s
  6170. }
  6171. // SetAllowedMethods sets the AllowedMethods field's value.
  6172. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  6173. s.AllowedMethods = v
  6174. return s
  6175. }
  6176. // SetAllowedOrigins sets the AllowedOrigins field's value.
  6177. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  6178. s.AllowedOrigins = v
  6179. return s
  6180. }
  6181. // SetExposeHeaders sets the ExposeHeaders field's value.
  6182. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  6183. s.ExposeHeaders = v
  6184. return s
  6185. }
  6186. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  6187. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  6188. s.MaxAgeSeconds = &v
  6189. return s
  6190. }
  6191. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration
  6192. type CloudFunctionConfiguration struct {
  6193. _ struct{} `type:"structure"`
  6194. CloudFunction *string `type:"string"`
  6195. // Bucket event for which to send notifications.
  6196. Event *string `deprecated:"true" type:"string" enum:"Event"`
  6197. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  6198. // Optional unique identifier for configurations in a notification configuration.
  6199. // If you don't provide one, Amazon S3 will assign an ID.
  6200. Id *string `type:"string"`
  6201. InvocationRole *string `type:"string"`
  6202. }
  6203. // String returns the string representation
  6204. func (s CloudFunctionConfiguration) String() string {
  6205. return awsutil.Prettify(s)
  6206. }
  6207. // GoString returns the string representation
  6208. func (s CloudFunctionConfiguration) GoString() string {
  6209. return s.String()
  6210. }
  6211. // SetCloudFunction sets the CloudFunction field's value.
  6212. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  6213. s.CloudFunction = &v
  6214. return s
  6215. }
  6216. // SetEvent sets the Event field's value.
  6217. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  6218. s.Event = &v
  6219. return s
  6220. }
  6221. // SetEvents sets the Events field's value.
  6222. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  6223. s.Events = v
  6224. return s
  6225. }
  6226. // SetId sets the Id field's value.
  6227. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  6228. s.Id = &v
  6229. return s
  6230. }
  6231. // SetInvocationRole sets the InvocationRole field's value.
  6232. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  6233. s.InvocationRole = &v
  6234. return s
  6235. }
  6236. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CommonPrefix
  6237. type CommonPrefix struct {
  6238. _ struct{} `type:"structure"`
  6239. Prefix *string `type:"string"`
  6240. }
  6241. // String returns the string representation
  6242. func (s CommonPrefix) String() string {
  6243. return awsutil.Prettify(s)
  6244. }
  6245. // GoString returns the string representation
  6246. func (s CommonPrefix) GoString() string {
  6247. return s.String()
  6248. }
  6249. // SetPrefix sets the Prefix field's value.
  6250. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  6251. s.Prefix = &v
  6252. return s
  6253. }
  6254. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadRequest
  6255. type CompleteMultipartUploadInput struct {
  6256. _ struct{} `type:"structure" payload:"MultipartUpload"`
  6257. // Bucket is a required field
  6258. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6259. // Key is a required field
  6260. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6261. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure"`
  6262. // Confirms that the requester knows that she or he will be charged for the
  6263. // request. Bucket owners need not specify this parameter in their requests.
  6264. // Documentation on downloading objects from requester pays buckets can be found
  6265. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6266. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6267. // UploadId is a required field
  6268. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6269. }
  6270. // String returns the string representation
  6271. func (s CompleteMultipartUploadInput) String() string {
  6272. return awsutil.Prettify(s)
  6273. }
  6274. // GoString returns the string representation
  6275. func (s CompleteMultipartUploadInput) GoString() string {
  6276. return s.String()
  6277. }
  6278. // Validate inspects the fields of the type to determine if they are valid.
  6279. func (s *CompleteMultipartUploadInput) Validate() error {
  6280. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  6281. if s.Bucket == nil {
  6282. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6283. }
  6284. if s.Key == nil {
  6285. invalidParams.Add(request.NewErrParamRequired("Key"))
  6286. }
  6287. if s.Key != nil && len(*s.Key) < 1 {
  6288. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6289. }
  6290. if s.UploadId == nil {
  6291. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6292. }
  6293. if invalidParams.Len() > 0 {
  6294. return invalidParams
  6295. }
  6296. return nil
  6297. }
  6298. // SetBucket sets the Bucket field's value.
  6299. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  6300. s.Bucket = &v
  6301. return s
  6302. }
  6303. // SetKey sets the Key field's value.
  6304. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  6305. s.Key = &v
  6306. return s
  6307. }
  6308. // SetMultipartUpload sets the MultipartUpload field's value.
  6309. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  6310. s.MultipartUpload = v
  6311. return s
  6312. }
  6313. // SetRequestPayer sets the RequestPayer field's value.
  6314. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  6315. s.RequestPayer = &v
  6316. return s
  6317. }
  6318. // SetUploadId sets the UploadId field's value.
  6319. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  6320. s.UploadId = &v
  6321. return s
  6322. }
  6323. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadOutput
  6324. type CompleteMultipartUploadOutput struct {
  6325. _ struct{} `type:"structure"`
  6326. Bucket *string `type:"string"`
  6327. // Entity tag of the object.
  6328. ETag *string `type:"string"`
  6329. // If the object expiration is configured, this will contain the expiration
  6330. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  6331. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6332. Key *string `min:"1" type:"string"`
  6333. Location *string `type:"string"`
  6334. // If present, indicates that the requester was successfully charged for the
  6335. // request.
  6336. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6337. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6338. // encryption key that was used for the object.
  6339. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6340. // The Server-side encryption algorithm used when storing this object in S3
  6341. // (e.g., AES256, aws:kms).
  6342. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6343. // Version of the object.
  6344. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6345. }
  6346. // String returns the string representation
  6347. func (s CompleteMultipartUploadOutput) String() string {
  6348. return awsutil.Prettify(s)
  6349. }
  6350. // GoString returns the string representation
  6351. func (s CompleteMultipartUploadOutput) GoString() string {
  6352. return s.String()
  6353. }
  6354. // SetBucket sets the Bucket field's value.
  6355. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  6356. s.Bucket = &v
  6357. return s
  6358. }
  6359. // SetETag sets the ETag field's value.
  6360. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  6361. s.ETag = &v
  6362. return s
  6363. }
  6364. // SetExpiration sets the Expiration field's value.
  6365. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  6366. s.Expiration = &v
  6367. return s
  6368. }
  6369. // SetKey sets the Key field's value.
  6370. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  6371. s.Key = &v
  6372. return s
  6373. }
  6374. // SetLocation sets the Location field's value.
  6375. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  6376. s.Location = &v
  6377. return s
  6378. }
  6379. // SetRequestCharged sets the RequestCharged field's value.
  6380. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  6381. s.RequestCharged = &v
  6382. return s
  6383. }
  6384. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6385. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  6386. s.SSEKMSKeyId = &v
  6387. return s
  6388. }
  6389. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6390. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  6391. s.ServerSideEncryption = &v
  6392. return s
  6393. }
  6394. // SetVersionId sets the VersionId field's value.
  6395. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  6396. s.VersionId = &v
  6397. return s
  6398. }
  6399. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedMultipartUpload
  6400. type CompletedMultipartUpload struct {
  6401. _ struct{} `type:"structure"`
  6402. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  6403. }
  6404. // String returns the string representation
  6405. func (s CompletedMultipartUpload) String() string {
  6406. return awsutil.Prettify(s)
  6407. }
  6408. // GoString returns the string representation
  6409. func (s CompletedMultipartUpload) GoString() string {
  6410. return s.String()
  6411. }
  6412. // SetParts sets the Parts field's value.
  6413. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  6414. s.Parts = v
  6415. return s
  6416. }
  6417. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedPart
  6418. type CompletedPart struct {
  6419. _ struct{} `type:"structure"`
  6420. // Entity tag returned when the part was uploaded.
  6421. ETag *string `type:"string"`
  6422. // Part number that identifies the part. This is a positive integer between
  6423. // 1 and 10,000.
  6424. PartNumber *int64 `type:"integer"`
  6425. }
  6426. // String returns the string representation
  6427. func (s CompletedPart) String() string {
  6428. return awsutil.Prettify(s)
  6429. }
  6430. // GoString returns the string representation
  6431. func (s CompletedPart) GoString() string {
  6432. return s.String()
  6433. }
  6434. // SetETag sets the ETag field's value.
  6435. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  6436. s.ETag = &v
  6437. return s
  6438. }
  6439. // SetPartNumber sets the PartNumber field's value.
  6440. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  6441. s.PartNumber = &v
  6442. return s
  6443. }
  6444. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition
  6445. type Condition struct {
  6446. _ struct{} `type:"structure"`
  6447. // The HTTP error code when the redirect is applied. In the event of an error,
  6448. // if the error code equals this value, then the specified redirect is applied.
  6449. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  6450. // is not specified. If both are specified, then both must be true for the redirect
  6451. // to be applied.
  6452. HttpErrorCodeReturnedEquals *string `type:"string"`
  6453. // The object key name prefix when the redirect is applied. For example, to
  6454. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  6455. // To redirect request for all pages with the prefix docs/, the key prefix will
  6456. // be /docs, which identifies all objects in the docs/ folder. Required when
  6457. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  6458. // is not specified. If both conditions are specified, both must be true for
  6459. // the redirect to be applied.
  6460. KeyPrefixEquals *string `type:"string"`
  6461. }
  6462. // String returns the string representation
  6463. func (s Condition) String() string {
  6464. return awsutil.Prettify(s)
  6465. }
  6466. // GoString returns the string representation
  6467. func (s Condition) GoString() string {
  6468. return s.String()
  6469. }
  6470. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  6471. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  6472. s.HttpErrorCodeReturnedEquals = &v
  6473. return s
  6474. }
  6475. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  6476. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  6477. s.KeyPrefixEquals = &v
  6478. return s
  6479. }
  6480. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest
  6481. type CopyObjectInput struct {
  6482. _ struct{} `type:"structure"`
  6483. // The canned ACL to apply to the object.
  6484. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  6485. // Bucket is a required field
  6486. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6487. // Specifies caching behavior along the request/reply chain.
  6488. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  6489. // Specifies presentational information for the object.
  6490. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  6491. // Specifies what content encodings have been applied to the object and thus
  6492. // what decoding mechanisms must be applied to obtain the media-type referenced
  6493. // by the Content-Type header field.
  6494. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  6495. // The language the content is in.
  6496. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  6497. // A standard MIME type describing the format of the object data.
  6498. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  6499. // The name of the source bucket and key name of the source object, separated
  6500. // by a slash (/). Must be URL-encoded.
  6501. //
  6502. // CopySource is a required field
  6503. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  6504. // Copies the object if its entity tag (ETag) matches the specified tag.
  6505. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  6506. // Copies the object if it has been modified since the specified time.
  6507. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  6508. // Copies the object if its entity tag (ETag) is different than the specified
  6509. // ETag.
  6510. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  6511. // Copies the object if it hasn't been modified since the specified time.
  6512. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  6513. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  6514. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  6515. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  6516. // the source object. The encryption key provided in this header must be one
  6517. // that was used when the source object was created.
  6518. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  6519. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6520. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6521. // key was transmitted without error.
  6522. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  6523. // The date and time at which the object is no longer cacheable.
  6524. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  6525. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  6526. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6527. // Allows grantee to read the object data and its metadata.
  6528. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6529. // Allows grantee to read the object ACL.
  6530. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6531. // Allows grantee to write the ACL for the applicable object.
  6532. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6533. // Key is a required field
  6534. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6535. // A map of metadata to store with the object in S3.
  6536. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  6537. // Specifies whether the metadata is copied from the source object or replaced
  6538. // with metadata provided in the request.
  6539. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  6540. // Confirms that the requester knows that she or he will be charged for the
  6541. // request. Bucket owners need not specify this parameter in their requests.
  6542. // Documentation on downloading objects from requester pays buckets can be found
  6543. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6544. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6545. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  6546. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6547. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  6548. // data. This value is used to store the object and then it is discarded; Amazon
  6549. // does not store the encryption key. The key must be appropriate for use with
  6550. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  6551. // header.
  6552. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  6553. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6554. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6555. // key was transmitted without error.
  6556. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6557. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  6558. // requests for an object protected by AWS KMS will fail if not made via SSL
  6559. // or using SigV4. Documentation on configuring any of the officially supported
  6560. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  6561. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6562. // The Server-side encryption algorithm used when storing this object in S3
  6563. // (e.g., AES256, aws:kms).
  6564. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6565. // The type of storage to use for the object. Defaults to 'STANDARD'.
  6566. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  6567. // The tag-set for the object destination object this value must be used in
  6568. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  6569. // Query parameters
  6570. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  6571. // Specifies whether the object tag-set are copied from the source object or
  6572. // replaced with tag-set provided in the request.
  6573. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  6574. // If the bucket is configured as a website, redirects requests for this object
  6575. // to another object in the same bucket or to an external URL. Amazon S3 stores
  6576. // the value of this header in the object metadata.
  6577. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  6578. }
  6579. // String returns the string representation
  6580. func (s CopyObjectInput) String() string {
  6581. return awsutil.Prettify(s)
  6582. }
  6583. // GoString returns the string representation
  6584. func (s CopyObjectInput) GoString() string {
  6585. return s.String()
  6586. }
  6587. // Validate inspects the fields of the type to determine if they are valid.
  6588. func (s *CopyObjectInput) Validate() error {
  6589. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  6590. if s.Bucket == nil {
  6591. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6592. }
  6593. if s.CopySource == nil {
  6594. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  6595. }
  6596. if s.Key == nil {
  6597. invalidParams.Add(request.NewErrParamRequired("Key"))
  6598. }
  6599. if s.Key != nil && len(*s.Key) < 1 {
  6600. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6601. }
  6602. if invalidParams.Len() > 0 {
  6603. return invalidParams
  6604. }
  6605. return nil
  6606. }
  6607. // SetACL sets the ACL field's value.
  6608. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  6609. s.ACL = &v
  6610. return s
  6611. }
  6612. // SetBucket sets the Bucket field's value.
  6613. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  6614. s.Bucket = &v
  6615. return s
  6616. }
  6617. // SetCacheControl sets the CacheControl field's value.
  6618. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  6619. s.CacheControl = &v
  6620. return s
  6621. }
  6622. // SetContentDisposition sets the ContentDisposition field's value.
  6623. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  6624. s.ContentDisposition = &v
  6625. return s
  6626. }
  6627. // SetContentEncoding sets the ContentEncoding field's value.
  6628. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  6629. s.ContentEncoding = &v
  6630. return s
  6631. }
  6632. // SetContentLanguage sets the ContentLanguage field's value.
  6633. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  6634. s.ContentLanguage = &v
  6635. return s
  6636. }
  6637. // SetContentType sets the ContentType field's value.
  6638. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  6639. s.ContentType = &v
  6640. return s
  6641. }
  6642. // SetCopySource sets the CopySource field's value.
  6643. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  6644. s.CopySource = &v
  6645. return s
  6646. }
  6647. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  6648. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  6649. s.CopySourceIfMatch = &v
  6650. return s
  6651. }
  6652. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  6653. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  6654. s.CopySourceIfModifiedSince = &v
  6655. return s
  6656. }
  6657. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  6658. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  6659. s.CopySourceIfNoneMatch = &v
  6660. return s
  6661. }
  6662. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  6663. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  6664. s.CopySourceIfUnmodifiedSince = &v
  6665. return s
  6666. }
  6667. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  6668. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  6669. s.CopySourceSSECustomerAlgorithm = &v
  6670. return s
  6671. }
  6672. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  6673. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  6674. s.CopySourceSSECustomerKey = &v
  6675. return s
  6676. }
  6677. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  6678. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  6679. s.CopySourceSSECustomerKeyMD5 = &v
  6680. return s
  6681. }
  6682. // SetExpires sets the Expires field's value.
  6683. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  6684. s.Expires = &v
  6685. return s
  6686. }
  6687. // SetGrantFullControl sets the GrantFullControl field's value.
  6688. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  6689. s.GrantFullControl = &v
  6690. return s
  6691. }
  6692. // SetGrantRead sets the GrantRead field's value.
  6693. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  6694. s.GrantRead = &v
  6695. return s
  6696. }
  6697. // SetGrantReadACP sets the GrantReadACP field's value.
  6698. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  6699. s.GrantReadACP = &v
  6700. return s
  6701. }
  6702. // SetGrantWriteACP sets the GrantWriteACP field's value.
  6703. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  6704. s.GrantWriteACP = &v
  6705. return s
  6706. }
  6707. // SetKey sets the Key field's value.
  6708. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  6709. s.Key = &v
  6710. return s
  6711. }
  6712. // SetMetadata sets the Metadata field's value.
  6713. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  6714. s.Metadata = v
  6715. return s
  6716. }
  6717. // SetMetadataDirective sets the MetadataDirective field's value.
  6718. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  6719. s.MetadataDirective = &v
  6720. return s
  6721. }
  6722. // SetRequestPayer sets the RequestPayer field's value.
  6723. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  6724. s.RequestPayer = &v
  6725. return s
  6726. }
  6727. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  6728. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  6729. s.SSECustomerAlgorithm = &v
  6730. return s
  6731. }
  6732. // SetSSECustomerKey sets the SSECustomerKey field's value.
  6733. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  6734. s.SSECustomerKey = &v
  6735. return s
  6736. }
  6737. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  6738. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  6739. s.SSECustomerKeyMD5 = &v
  6740. return s
  6741. }
  6742. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6743. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  6744. s.SSEKMSKeyId = &v
  6745. return s
  6746. }
  6747. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6748. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  6749. s.ServerSideEncryption = &v
  6750. return s
  6751. }
  6752. // SetStorageClass sets the StorageClass field's value.
  6753. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  6754. s.StorageClass = &v
  6755. return s
  6756. }
  6757. // SetTagging sets the Tagging field's value.
  6758. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  6759. s.Tagging = &v
  6760. return s
  6761. }
  6762. // SetTaggingDirective sets the TaggingDirective field's value.
  6763. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  6764. s.TaggingDirective = &v
  6765. return s
  6766. }
  6767. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  6768. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  6769. s.WebsiteRedirectLocation = &v
  6770. return s
  6771. }
  6772. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput
  6773. type CopyObjectOutput struct {
  6774. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  6775. CopyObjectResult *CopyObjectResult `type:"structure"`
  6776. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  6777. // If the object expiration is configured, the response includes this header.
  6778. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6779. // If present, indicates that the requester was successfully charged for the
  6780. // request.
  6781. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6782. // If server-side encryption with a customer-provided encryption key was requested,
  6783. // the response will include this header confirming the encryption algorithm
  6784. // used.
  6785. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6786. // If server-side encryption with a customer-provided encryption key was requested,
  6787. // the response will include this header to provide round trip message integrity
  6788. // verification of the customer-provided encryption key.
  6789. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6790. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6791. // encryption key that was used for the object.
  6792. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6793. // The Server-side encryption algorithm used when storing this object in S3
  6794. // (e.g., AES256, aws:kms).
  6795. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6796. // Version ID of the newly created copy.
  6797. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6798. }
  6799. // String returns the string representation
  6800. func (s CopyObjectOutput) String() string {
  6801. return awsutil.Prettify(s)
  6802. }
  6803. // GoString returns the string representation
  6804. func (s CopyObjectOutput) GoString() string {
  6805. return s.String()
  6806. }
  6807. // SetCopyObjectResult sets the CopyObjectResult field's value.
  6808. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  6809. s.CopyObjectResult = v
  6810. return s
  6811. }
  6812. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  6813. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  6814. s.CopySourceVersionId = &v
  6815. return s
  6816. }
  6817. // SetExpiration sets the Expiration field's value.
  6818. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  6819. s.Expiration = &v
  6820. return s
  6821. }
  6822. // SetRequestCharged sets the RequestCharged field's value.
  6823. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  6824. s.RequestCharged = &v
  6825. return s
  6826. }
  6827. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  6828. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  6829. s.SSECustomerAlgorithm = &v
  6830. return s
  6831. }
  6832. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  6833. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  6834. s.SSECustomerKeyMD5 = &v
  6835. return s
  6836. }
  6837. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6838. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  6839. s.SSEKMSKeyId = &v
  6840. return s
  6841. }
  6842. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6843. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  6844. s.ServerSideEncryption = &v
  6845. return s
  6846. }
  6847. // SetVersionId sets the VersionId field's value.
  6848. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  6849. s.VersionId = &v
  6850. return s
  6851. }
  6852. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult
  6853. type CopyObjectResult struct {
  6854. _ struct{} `type:"structure"`
  6855. ETag *string `type:"string"`
  6856. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6857. }
  6858. // String returns the string representation
  6859. func (s CopyObjectResult) String() string {
  6860. return awsutil.Prettify(s)
  6861. }
  6862. // GoString returns the string representation
  6863. func (s CopyObjectResult) GoString() string {
  6864. return s.String()
  6865. }
  6866. // SetETag sets the ETag field's value.
  6867. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  6868. s.ETag = &v
  6869. return s
  6870. }
  6871. // SetLastModified sets the LastModified field's value.
  6872. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  6873. s.LastModified = &v
  6874. return s
  6875. }
  6876. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyPartResult
  6877. type CopyPartResult struct {
  6878. _ struct{} `type:"structure"`
  6879. // Entity tag of the object.
  6880. ETag *string `type:"string"`
  6881. // Date and time at which the object was uploaded.
  6882. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6883. }
  6884. // String returns the string representation
  6885. func (s CopyPartResult) String() string {
  6886. return awsutil.Prettify(s)
  6887. }
  6888. // GoString returns the string representation
  6889. func (s CopyPartResult) GoString() string {
  6890. return s.String()
  6891. }
  6892. // SetETag sets the ETag field's value.
  6893. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  6894. s.ETag = &v
  6895. return s
  6896. }
  6897. // SetLastModified sets the LastModified field's value.
  6898. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  6899. s.LastModified = &v
  6900. return s
  6901. }
  6902. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketConfiguration
  6903. type CreateBucketConfiguration struct {
  6904. _ struct{} `type:"structure"`
  6905. // Specifies the region where the bucket will be created. If you don't specify
  6906. // a region, the bucket will be created in US Standard.
  6907. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  6908. }
  6909. // String returns the string representation
  6910. func (s CreateBucketConfiguration) String() string {
  6911. return awsutil.Prettify(s)
  6912. }
  6913. // GoString returns the string representation
  6914. func (s CreateBucketConfiguration) GoString() string {
  6915. return s.String()
  6916. }
  6917. // SetLocationConstraint sets the LocationConstraint field's value.
  6918. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  6919. s.LocationConstraint = &v
  6920. return s
  6921. }
  6922. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketRequest
  6923. type CreateBucketInput struct {
  6924. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  6925. // The canned ACL to apply to the bucket.
  6926. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  6927. // Bucket is a required field
  6928. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6929. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure"`
  6930. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  6931. // bucket.
  6932. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6933. // Allows grantee to list the objects in the bucket.
  6934. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6935. // Allows grantee to read the bucket ACL.
  6936. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6937. // Allows grantee to create, overwrite, and delete any object in the bucket.
  6938. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  6939. // Allows grantee to write the ACL for the applicable bucket.
  6940. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6941. }
  6942. // String returns the string representation
  6943. func (s CreateBucketInput) String() string {
  6944. return awsutil.Prettify(s)
  6945. }
  6946. // GoString returns the string representation
  6947. func (s CreateBucketInput) GoString() string {
  6948. return s.String()
  6949. }
  6950. // Validate inspects the fields of the type to determine if they are valid.
  6951. func (s *CreateBucketInput) Validate() error {
  6952. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  6953. if s.Bucket == nil {
  6954. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6955. }
  6956. if invalidParams.Len() > 0 {
  6957. return invalidParams
  6958. }
  6959. return nil
  6960. }
  6961. // SetACL sets the ACL field's value.
  6962. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  6963. s.ACL = &v
  6964. return s
  6965. }
  6966. // SetBucket sets the Bucket field's value.
  6967. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  6968. s.Bucket = &v
  6969. return s
  6970. }
  6971. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  6972. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  6973. s.CreateBucketConfiguration = v
  6974. return s
  6975. }
  6976. // SetGrantFullControl sets the GrantFullControl field's value.
  6977. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  6978. s.GrantFullControl = &v
  6979. return s
  6980. }
  6981. // SetGrantRead sets the GrantRead field's value.
  6982. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  6983. s.GrantRead = &v
  6984. return s
  6985. }
  6986. // SetGrantReadACP sets the GrantReadACP field's value.
  6987. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  6988. s.GrantReadACP = &v
  6989. return s
  6990. }
  6991. // SetGrantWrite sets the GrantWrite field's value.
  6992. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  6993. s.GrantWrite = &v
  6994. return s
  6995. }
  6996. // SetGrantWriteACP sets the GrantWriteACP field's value.
  6997. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  6998. s.GrantWriteACP = &v
  6999. return s
  7000. }
  7001. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketOutput
  7002. type CreateBucketOutput struct {
  7003. _ struct{} `type:"structure"`
  7004. Location *string `location:"header" locationName:"Location" type:"string"`
  7005. }
  7006. // String returns the string representation
  7007. func (s CreateBucketOutput) String() string {
  7008. return awsutil.Prettify(s)
  7009. }
  7010. // GoString returns the string representation
  7011. func (s CreateBucketOutput) GoString() string {
  7012. return s.String()
  7013. }
  7014. // SetLocation sets the Location field's value.
  7015. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  7016. s.Location = &v
  7017. return s
  7018. }
  7019. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadRequest
  7020. type CreateMultipartUploadInput struct {
  7021. _ struct{} `type:"structure"`
  7022. // The canned ACL to apply to the object.
  7023. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7024. // Bucket is a required field
  7025. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7026. // Specifies caching behavior along the request/reply chain.
  7027. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7028. // Specifies presentational information for the object.
  7029. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7030. // Specifies what content encodings have been applied to the object and thus
  7031. // what decoding mechanisms must be applied to obtain the media-type referenced
  7032. // by the Content-Type header field.
  7033. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7034. // The language the content is in.
  7035. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7036. // A standard MIME type describing the format of the object data.
  7037. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7038. // The date and time at which the object is no longer cacheable.
  7039. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  7040. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7041. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7042. // Allows grantee to read the object data and its metadata.
  7043. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7044. // Allows grantee to read the object ACL.
  7045. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7046. // Allows grantee to write the ACL for the applicable object.
  7047. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7048. // Key is a required field
  7049. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7050. // A map of metadata to store with the object in S3.
  7051. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7052. // Confirms that the requester knows that she or he will be charged for the
  7053. // request. Bucket owners need not specify this parameter in their requests.
  7054. // Documentation on downloading objects from requester pays buckets can be found
  7055. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7056. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7057. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7058. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7059. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7060. // data. This value is used to store the object and then it is discarded; Amazon
  7061. // does not store the encryption key. The key must be appropriate for use with
  7062. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7063. // header.
  7064. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7065. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7066. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7067. // key was transmitted without error.
  7068. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7069. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7070. // requests for an object protected by AWS KMS will fail if not made via SSL
  7071. // or using SigV4. Documentation on configuring any of the officially supported
  7072. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7073. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7074. // The Server-side encryption algorithm used when storing this object in S3
  7075. // (e.g., AES256, aws:kms).
  7076. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7077. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7078. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7079. // If the bucket is configured as a website, redirects requests for this object
  7080. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7081. // the value of this header in the object metadata.
  7082. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7083. }
  7084. // String returns the string representation
  7085. func (s CreateMultipartUploadInput) String() string {
  7086. return awsutil.Prettify(s)
  7087. }
  7088. // GoString returns the string representation
  7089. func (s CreateMultipartUploadInput) GoString() string {
  7090. return s.String()
  7091. }
  7092. // Validate inspects the fields of the type to determine if they are valid.
  7093. func (s *CreateMultipartUploadInput) Validate() error {
  7094. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  7095. if s.Bucket == nil {
  7096. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7097. }
  7098. if s.Key == nil {
  7099. invalidParams.Add(request.NewErrParamRequired("Key"))
  7100. }
  7101. if s.Key != nil && len(*s.Key) < 1 {
  7102. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7103. }
  7104. if invalidParams.Len() > 0 {
  7105. return invalidParams
  7106. }
  7107. return nil
  7108. }
  7109. // SetACL sets the ACL field's value.
  7110. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  7111. s.ACL = &v
  7112. return s
  7113. }
  7114. // SetBucket sets the Bucket field's value.
  7115. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  7116. s.Bucket = &v
  7117. return s
  7118. }
  7119. // SetCacheControl sets the CacheControl field's value.
  7120. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  7121. s.CacheControl = &v
  7122. return s
  7123. }
  7124. // SetContentDisposition sets the ContentDisposition field's value.
  7125. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  7126. s.ContentDisposition = &v
  7127. return s
  7128. }
  7129. // SetContentEncoding sets the ContentEncoding field's value.
  7130. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  7131. s.ContentEncoding = &v
  7132. return s
  7133. }
  7134. // SetContentLanguage sets the ContentLanguage field's value.
  7135. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  7136. s.ContentLanguage = &v
  7137. return s
  7138. }
  7139. // SetContentType sets the ContentType field's value.
  7140. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  7141. s.ContentType = &v
  7142. return s
  7143. }
  7144. // SetExpires sets the Expires field's value.
  7145. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  7146. s.Expires = &v
  7147. return s
  7148. }
  7149. // SetGrantFullControl sets the GrantFullControl field's value.
  7150. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  7151. s.GrantFullControl = &v
  7152. return s
  7153. }
  7154. // SetGrantRead sets the GrantRead field's value.
  7155. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  7156. s.GrantRead = &v
  7157. return s
  7158. }
  7159. // SetGrantReadACP sets the GrantReadACP field's value.
  7160. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  7161. s.GrantReadACP = &v
  7162. return s
  7163. }
  7164. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7165. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  7166. s.GrantWriteACP = &v
  7167. return s
  7168. }
  7169. // SetKey sets the Key field's value.
  7170. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  7171. s.Key = &v
  7172. return s
  7173. }
  7174. // SetMetadata sets the Metadata field's value.
  7175. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  7176. s.Metadata = v
  7177. return s
  7178. }
  7179. // SetRequestPayer sets the RequestPayer field's value.
  7180. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  7181. s.RequestPayer = &v
  7182. return s
  7183. }
  7184. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7185. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  7186. s.SSECustomerAlgorithm = &v
  7187. return s
  7188. }
  7189. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7190. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  7191. s.SSECustomerKey = &v
  7192. return s
  7193. }
  7194. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7195. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  7196. s.SSECustomerKeyMD5 = &v
  7197. return s
  7198. }
  7199. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7200. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  7201. s.SSEKMSKeyId = &v
  7202. return s
  7203. }
  7204. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7205. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  7206. s.ServerSideEncryption = &v
  7207. return s
  7208. }
  7209. // SetStorageClass sets the StorageClass field's value.
  7210. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  7211. s.StorageClass = &v
  7212. return s
  7213. }
  7214. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7215. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  7216. s.WebsiteRedirectLocation = &v
  7217. return s
  7218. }
  7219. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadOutput
  7220. type CreateMultipartUploadOutput struct {
  7221. _ struct{} `type:"structure"`
  7222. // Date when multipart upload will become eligible for abort operation by lifecycle.
  7223. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  7224. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  7225. // operation.
  7226. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  7227. // Name of the bucket to which the multipart upload was initiated.
  7228. Bucket *string `locationName:"Bucket" type:"string"`
  7229. // Object key for which the multipart upload was initiated.
  7230. Key *string `min:"1" type:"string"`
  7231. // If present, indicates that the requester was successfully charged for the
  7232. // request.
  7233. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7234. // If server-side encryption with a customer-provided encryption key was requested,
  7235. // the response will include this header confirming the encryption algorithm
  7236. // used.
  7237. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7238. // If server-side encryption with a customer-provided encryption key was requested,
  7239. // the response will include this header to provide round trip message integrity
  7240. // verification of the customer-provided encryption key.
  7241. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7242. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7243. // encryption key that was used for the object.
  7244. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7245. // The Server-side encryption algorithm used when storing this object in S3
  7246. // (e.g., AES256, aws:kms).
  7247. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7248. // ID for the initiated multipart upload.
  7249. UploadId *string `type:"string"`
  7250. }
  7251. // String returns the string representation
  7252. func (s CreateMultipartUploadOutput) String() string {
  7253. return awsutil.Prettify(s)
  7254. }
  7255. // GoString returns the string representation
  7256. func (s CreateMultipartUploadOutput) GoString() string {
  7257. return s.String()
  7258. }
  7259. // SetAbortDate sets the AbortDate field's value.
  7260. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  7261. s.AbortDate = &v
  7262. return s
  7263. }
  7264. // SetAbortRuleId sets the AbortRuleId field's value.
  7265. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  7266. s.AbortRuleId = &v
  7267. return s
  7268. }
  7269. // SetBucket sets the Bucket field's value.
  7270. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  7271. s.Bucket = &v
  7272. return s
  7273. }
  7274. // SetKey sets the Key field's value.
  7275. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  7276. s.Key = &v
  7277. return s
  7278. }
  7279. // SetRequestCharged sets the RequestCharged field's value.
  7280. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  7281. s.RequestCharged = &v
  7282. return s
  7283. }
  7284. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7285. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  7286. s.SSECustomerAlgorithm = &v
  7287. return s
  7288. }
  7289. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7290. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  7291. s.SSECustomerKeyMD5 = &v
  7292. return s
  7293. }
  7294. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7295. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  7296. s.SSEKMSKeyId = &v
  7297. return s
  7298. }
  7299. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7300. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  7301. s.ServerSideEncryption = &v
  7302. return s
  7303. }
  7304. // SetUploadId sets the UploadId field's value.
  7305. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  7306. s.UploadId = &v
  7307. return s
  7308. }
  7309. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Delete
  7310. type Delete struct {
  7311. _ struct{} `type:"structure"`
  7312. // Objects is a required field
  7313. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  7314. // Element to enable quiet mode for the request. When you add this element,
  7315. // you must set its value to true.
  7316. Quiet *bool `type:"boolean"`
  7317. }
  7318. // String returns the string representation
  7319. func (s Delete) String() string {
  7320. return awsutil.Prettify(s)
  7321. }
  7322. // GoString returns the string representation
  7323. func (s Delete) GoString() string {
  7324. return s.String()
  7325. }
  7326. // Validate inspects the fields of the type to determine if they are valid.
  7327. func (s *Delete) Validate() error {
  7328. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  7329. if s.Objects == nil {
  7330. invalidParams.Add(request.NewErrParamRequired("Objects"))
  7331. }
  7332. if s.Objects != nil {
  7333. for i, v := range s.Objects {
  7334. if v == nil {
  7335. continue
  7336. }
  7337. if err := v.Validate(); err != nil {
  7338. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  7339. }
  7340. }
  7341. }
  7342. if invalidParams.Len() > 0 {
  7343. return invalidParams
  7344. }
  7345. return nil
  7346. }
  7347. // SetObjects sets the Objects field's value.
  7348. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  7349. s.Objects = v
  7350. return s
  7351. }
  7352. // SetQuiet sets the Quiet field's value.
  7353. func (s *Delete) SetQuiet(v bool) *Delete {
  7354. s.Quiet = &v
  7355. return s
  7356. }
  7357. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationRequest
  7358. type DeleteBucketAnalyticsConfigurationInput struct {
  7359. _ struct{} `type:"structure"`
  7360. // The name of the bucket from which an analytics configuration is deleted.
  7361. //
  7362. // Bucket is a required field
  7363. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7364. // The identifier used to represent an analytics configuration.
  7365. //
  7366. // Id is a required field
  7367. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7368. }
  7369. // String returns the string representation
  7370. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  7371. return awsutil.Prettify(s)
  7372. }
  7373. // GoString returns the string representation
  7374. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  7375. return s.String()
  7376. }
  7377. // Validate inspects the fields of the type to determine if they are valid.
  7378. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  7379. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  7380. if s.Bucket == nil {
  7381. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7382. }
  7383. if s.Id == nil {
  7384. invalidParams.Add(request.NewErrParamRequired("Id"))
  7385. }
  7386. if invalidParams.Len() > 0 {
  7387. return invalidParams
  7388. }
  7389. return nil
  7390. }
  7391. // SetBucket sets the Bucket field's value.
  7392. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  7393. s.Bucket = &v
  7394. return s
  7395. }
  7396. // SetId sets the Id field's value.
  7397. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  7398. s.Id = &v
  7399. return s
  7400. }
  7401. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationOutput
  7402. type DeleteBucketAnalyticsConfigurationOutput struct {
  7403. _ struct{} `type:"structure"`
  7404. }
  7405. // String returns the string representation
  7406. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  7407. return awsutil.Prettify(s)
  7408. }
  7409. // GoString returns the string representation
  7410. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  7411. return s.String()
  7412. }
  7413. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsRequest
  7414. type DeleteBucketCorsInput struct {
  7415. _ struct{} `type:"structure"`
  7416. // Bucket is a required field
  7417. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7418. }
  7419. // String returns the string representation
  7420. func (s DeleteBucketCorsInput) String() string {
  7421. return awsutil.Prettify(s)
  7422. }
  7423. // GoString returns the string representation
  7424. func (s DeleteBucketCorsInput) GoString() string {
  7425. return s.String()
  7426. }
  7427. // Validate inspects the fields of the type to determine if they are valid.
  7428. func (s *DeleteBucketCorsInput) Validate() error {
  7429. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  7430. if s.Bucket == nil {
  7431. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7432. }
  7433. if invalidParams.Len() > 0 {
  7434. return invalidParams
  7435. }
  7436. return nil
  7437. }
  7438. // SetBucket sets the Bucket field's value.
  7439. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  7440. s.Bucket = &v
  7441. return s
  7442. }
  7443. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput
  7444. type DeleteBucketCorsOutput struct {
  7445. _ struct{} `type:"structure"`
  7446. }
  7447. // String returns the string representation
  7448. func (s DeleteBucketCorsOutput) String() string {
  7449. return awsutil.Prettify(s)
  7450. }
  7451. // GoString returns the string representation
  7452. func (s DeleteBucketCorsOutput) GoString() string {
  7453. return s.String()
  7454. }
  7455. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest
  7456. type DeleteBucketInput struct {
  7457. _ struct{} `type:"structure"`
  7458. // Bucket is a required field
  7459. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7460. }
  7461. // String returns the string representation
  7462. func (s DeleteBucketInput) String() string {
  7463. return awsutil.Prettify(s)
  7464. }
  7465. // GoString returns the string representation
  7466. func (s DeleteBucketInput) GoString() string {
  7467. return s.String()
  7468. }
  7469. // Validate inspects the fields of the type to determine if they are valid.
  7470. func (s *DeleteBucketInput) Validate() error {
  7471. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  7472. if s.Bucket == nil {
  7473. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7474. }
  7475. if invalidParams.Len() > 0 {
  7476. return invalidParams
  7477. }
  7478. return nil
  7479. }
  7480. // SetBucket sets the Bucket field's value.
  7481. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  7482. s.Bucket = &v
  7483. return s
  7484. }
  7485. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest
  7486. type DeleteBucketInventoryConfigurationInput struct {
  7487. _ struct{} `type:"structure"`
  7488. // The name of the bucket containing the inventory configuration to delete.
  7489. //
  7490. // Bucket is a required field
  7491. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7492. // The ID used to identify the inventory configuration.
  7493. //
  7494. // Id is a required field
  7495. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7496. }
  7497. // String returns the string representation
  7498. func (s DeleteBucketInventoryConfigurationInput) String() string {
  7499. return awsutil.Prettify(s)
  7500. }
  7501. // GoString returns the string representation
  7502. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  7503. return s.String()
  7504. }
  7505. // Validate inspects the fields of the type to determine if they are valid.
  7506. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  7507. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  7508. if s.Bucket == nil {
  7509. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7510. }
  7511. if s.Id == nil {
  7512. invalidParams.Add(request.NewErrParamRequired("Id"))
  7513. }
  7514. if invalidParams.Len() > 0 {
  7515. return invalidParams
  7516. }
  7517. return nil
  7518. }
  7519. // SetBucket sets the Bucket field's value.
  7520. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  7521. s.Bucket = &v
  7522. return s
  7523. }
  7524. // SetId sets the Id field's value.
  7525. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  7526. s.Id = &v
  7527. return s
  7528. }
  7529. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationOutput
  7530. type DeleteBucketInventoryConfigurationOutput struct {
  7531. _ struct{} `type:"structure"`
  7532. }
  7533. // String returns the string representation
  7534. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  7535. return awsutil.Prettify(s)
  7536. }
  7537. // GoString returns the string representation
  7538. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  7539. return s.String()
  7540. }
  7541. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleRequest
  7542. type DeleteBucketLifecycleInput struct {
  7543. _ struct{} `type:"structure"`
  7544. // Bucket is a required field
  7545. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7546. }
  7547. // String returns the string representation
  7548. func (s DeleteBucketLifecycleInput) String() string {
  7549. return awsutil.Prettify(s)
  7550. }
  7551. // GoString returns the string representation
  7552. func (s DeleteBucketLifecycleInput) GoString() string {
  7553. return s.String()
  7554. }
  7555. // Validate inspects the fields of the type to determine if they are valid.
  7556. func (s *DeleteBucketLifecycleInput) Validate() error {
  7557. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  7558. if s.Bucket == nil {
  7559. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7560. }
  7561. if invalidParams.Len() > 0 {
  7562. return invalidParams
  7563. }
  7564. return nil
  7565. }
  7566. // SetBucket sets the Bucket field's value.
  7567. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  7568. s.Bucket = &v
  7569. return s
  7570. }
  7571. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput
  7572. type DeleteBucketLifecycleOutput struct {
  7573. _ struct{} `type:"structure"`
  7574. }
  7575. // String returns the string representation
  7576. func (s DeleteBucketLifecycleOutput) String() string {
  7577. return awsutil.Prettify(s)
  7578. }
  7579. // GoString returns the string representation
  7580. func (s DeleteBucketLifecycleOutput) GoString() string {
  7581. return s.String()
  7582. }
  7583. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationRequest
  7584. type DeleteBucketMetricsConfigurationInput struct {
  7585. _ struct{} `type:"structure"`
  7586. // The name of the bucket containing the metrics configuration to delete.
  7587. //
  7588. // Bucket is a required field
  7589. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7590. // The ID used to identify the metrics configuration.
  7591. //
  7592. // Id is a required field
  7593. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7594. }
  7595. // String returns the string representation
  7596. func (s DeleteBucketMetricsConfigurationInput) String() string {
  7597. return awsutil.Prettify(s)
  7598. }
  7599. // GoString returns the string representation
  7600. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  7601. return s.String()
  7602. }
  7603. // Validate inspects the fields of the type to determine if they are valid.
  7604. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  7605. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  7606. if s.Bucket == nil {
  7607. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7608. }
  7609. if s.Id == nil {
  7610. invalidParams.Add(request.NewErrParamRequired("Id"))
  7611. }
  7612. if invalidParams.Len() > 0 {
  7613. return invalidParams
  7614. }
  7615. return nil
  7616. }
  7617. // SetBucket sets the Bucket field's value.
  7618. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  7619. s.Bucket = &v
  7620. return s
  7621. }
  7622. // SetId sets the Id field's value.
  7623. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  7624. s.Id = &v
  7625. return s
  7626. }
  7627. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationOutput
  7628. type DeleteBucketMetricsConfigurationOutput struct {
  7629. _ struct{} `type:"structure"`
  7630. }
  7631. // String returns the string representation
  7632. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  7633. return awsutil.Prettify(s)
  7634. }
  7635. // GoString returns the string representation
  7636. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  7637. return s.String()
  7638. }
  7639. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOutput
  7640. type DeleteBucketOutput struct {
  7641. _ struct{} `type:"structure"`
  7642. }
  7643. // String returns the string representation
  7644. func (s DeleteBucketOutput) String() string {
  7645. return awsutil.Prettify(s)
  7646. }
  7647. // GoString returns the string representation
  7648. func (s DeleteBucketOutput) GoString() string {
  7649. return s.String()
  7650. }
  7651. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyRequest
  7652. type DeleteBucketPolicyInput struct {
  7653. _ struct{} `type:"structure"`
  7654. // Bucket is a required field
  7655. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7656. }
  7657. // String returns the string representation
  7658. func (s DeleteBucketPolicyInput) String() string {
  7659. return awsutil.Prettify(s)
  7660. }
  7661. // GoString returns the string representation
  7662. func (s DeleteBucketPolicyInput) GoString() string {
  7663. return s.String()
  7664. }
  7665. // Validate inspects the fields of the type to determine if they are valid.
  7666. func (s *DeleteBucketPolicyInput) Validate() error {
  7667. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  7668. if s.Bucket == nil {
  7669. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7670. }
  7671. if invalidParams.Len() > 0 {
  7672. return invalidParams
  7673. }
  7674. return nil
  7675. }
  7676. // SetBucket sets the Bucket field's value.
  7677. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  7678. s.Bucket = &v
  7679. return s
  7680. }
  7681. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput
  7682. type DeleteBucketPolicyOutput struct {
  7683. _ struct{} `type:"structure"`
  7684. }
  7685. // String returns the string representation
  7686. func (s DeleteBucketPolicyOutput) String() string {
  7687. return awsutil.Prettify(s)
  7688. }
  7689. // GoString returns the string representation
  7690. func (s DeleteBucketPolicyOutput) GoString() string {
  7691. return s.String()
  7692. }
  7693. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationRequest
  7694. type DeleteBucketReplicationInput struct {
  7695. _ struct{} `type:"structure"`
  7696. // Bucket is a required field
  7697. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7698. }
  7699. // String returns the string representation
  7700. func (s DeleteBucketReplicationInput) String() string {
  7701. return awsutil.Prettify(s)
  7702. }
  7703. // GoString returns the string representation
  7704. func (s DeleteBucketReplicationInput) GoString() string {
  7705. return s.String()
  7706. }
  7707. // Validate inspects the fields of the type to determine if they are valid.
  7708. func (s *DeleteBucketReplicationInput) Validate() error {
  7709. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  7710. if s.Bucket == nil {
  7711. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7712. }
  7713. if invalidParams.Len() > 0 {
  7714. return invalidParams
  7715. }
  7716. return nil
  7717. }
  7718. // SetBucket sets the Bucket field's value.
  7719. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  7720. s.Bucket = &v
  7721. return s
  7722. }
  7723. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput
  7724. type DeleteBucketReplicationOutput struct {
  7725. _ struct{} `type:"structure"`
  7726. }
  7727. // String returns the string representation
  7728. func (s DeleteBucketReplicationOutput) String() string {
  7729. return awsutil.Prettify(s)
  7730. }
  7731. // GoString returns the string representation
  7732. func (s DeleteBucketReplicationOutput) GoString() string {
  7733. return s.String()
  7734. }
  7735. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingRequest
  7736. type DeleteBucketTaggingInput struct {
  7737. _ struct{} `type:"structure"`
  7738. // Bucket is a required field
  7739. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7740. }
  7741. // String returns the string representation
  7742. func (s DeleteBucketTaggingInput) String() string {
  7743. return awsutil.Prettify(s)
  7744. }
  7745. // GoString returns the string representation
  7746. func (s DeleteBucketTaggingInput) GoString() string {
  7747. return s.String()
  7748. }
  7749. // Validate inspects the fields of the type to determine if they are valid.
  7750. func (s *DeleteBucketTaggingInput) Validate() error {
  7751. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  7752. if s.Bucket == nil {
  7753. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7754. }
  7755. if invalidParams.Len() > 0 {
  7756. return invalidParams
  7757. }
  7758. return nil
  7759. }
  7760. // SetBucket sets the Bucket field's value.
  7761. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  7762. s.Bucket = &v
  7763. return s
  7764. }
  7765. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput
  7766. type DeleteBucketTaggingOutput struct {
  7767. _ struct{} `type:"structure"`
  7768. }
  7769. // String returns the string representation
  7770. func (s DeleteBucketTaggingOutput) String() string {
  7771. return awsutil.Prettify(s)
  7772. }
  7773. // GoString returns the string representation
  7774. func (s DeleteBucketTaggingOutput) GoString() string {
  7775. return s.String()
  7776. }
  7777. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteRequest
  7778. type DeleteBucketWebsiteInput struct {
  7779. _ struct{} `type:"structure"`
  7780. // Bucket is a required field
  7781. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7782. }
  7783. // String returns the string representation
  7784. func (s DeleteBucketWebsiteInput) String() string {
  7785. return awsutil.Prettify(s)
  7786. }
  7787. // GoString returns the string representation
  7788. func (s DeleteBucketWebsiteInput) GoString() string {
  7789. return s.String()
  7790. }
  7791. // Validate inspects the fields of the type to determine if they are valid.
  7792. func (s *DeleteBucketWebsiteInput) Validate() error {
  7793. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  7794. if s.Bucket == nil {
  7795. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7796. }
  7797. if invalidParams.Len() > 0 {
  7798. return invalidParams
  7799. }
  7800. return nil
  7801. }
  7802. // SetBucket sets the Bucket field's value.
  7803. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  7804. s.Bucket = &v
  7805. return s
  7806. }
  7807. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput
  7808. type DeleteBucketWebsiteOutput struct {
  7809. _ struct{} `type:"structure"`
  7810. }
  7811. // String returns the string representation
  7812. func (s DeleteBucketWebsiteOutput) String() string {
  7813. return awsutil.Prettify(s)
  7814. }
  7815. // GoString returns the string representation
  7816. func (s DeleteBucketWebsiteOutput) GoString() string {
  7817. return s.String()
  7818. }
  7819. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteMarkerEntry
  7820. type DeleteMarkerEntry struct {
  7821. _ struct{} `type:"structure"`
  7822. // Specifies whether the object is (true) or is not (false) the latest version
  7823. // of an object.
  7824. IsLatest *bool `type:"boolean"`
  7825. // The object key.
  7826. Key *string `min:"1" type:"string"`
  7827. // Date and time the object was last modified.
  7828. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7829. Owner *Owner `type:"structure"`
  7830. // Version ID of an object.
  7831. VersionId *string `type:"string"`
  7832. }
  7833. // String returns the string representation
  7834. func (s DeleteMarkerEntry) String() string {
  7835. return awsutil.Prettify(s)
  7836. }
  7837. // GoString returns the string representation
  7838. func (s DeleteMarkerEntry) GoString() string {
  7839. return s.String()
  7840. }
  7841. // SetIsLatest sets the IsLatest field's value.
  7842. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  7843. s.IsLatest = &v
  7844. return s
  7845. }
  7846. // SetKey sets the Key field's value.
  7847. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  7848. s.Key = &v
  7849. return s
  7850. }
  7851. // SetLastModified sets the LastModified field's value.
  7852. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  7853. s.LastModified = &v
  7854. return s
  7855. }
  7856. // SetOwner sets the Owner field's value.
  7857. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  7858. s.Owner = v
  7859. return s
  7860. }
  7861. // SetVersionId sets the VersionId field's value.
  7862. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  7863. s.VersionId = &v
  7864. return s
  7865. }
  7866. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectRequest
  7867. type DeleteObjectInput struct {
  7868. _ struct{} `type:"structure"`
  7869. // Bucket is a required field
  7870. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7871. // Key is a required field
  7872. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7873. // The concatenation of the authentication device's serial number, a space,
  7874. // and the value that is displayed on your authentication device.
  7875. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  7876. // Confirms that the requester knows that she or he will be charged for the
  7877. // request. Bucket owners need not specify this parameter in their requests.
  7878. // Documentation on downloading objects from requester pays buckets can be found
  7879. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7880. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7881. // VersionId used to reference a specific version of the object.
  7882. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  7883. }
  7884. // String returns the string representation
  7885. func (s DeleteObjectInput) String() string {
  7886. return awsutil.Prettify(s)
  7887. }
  7888. // GoString returns the string representation
  7889. func (s DeleteObjectInput) GoString() string {
  7890. return s.String()
  7891. }
  7892. // Validate inspects the fields of the type to determine if they are valid.
  7893. func (s *DeleteObjectInput) Validate() error {
  7894. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  7895. if s.Bucket == nil {
  7896. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7897. }
  7898. if s.Key == nil {
  7899. invalidParams.Add(request.NewErrParamRequired("Key"))
  7900. }
  7901. if s.Key != nil && len(*s.Key) < 1 {
  7902. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7903. }
  7904. if invalidParams.Len() > 0 {
  7905. return invalidParams
  7906. }
  7907. return nil
  7908. }
  7909. // SetBucket sets the Bucket field's value.
  7910. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  7911. s.Bucket = &v
  7912. return s
  7913. }
  7914. // SetKey sets the Key field's value.
  7915. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  7916. s.Key = &v
  7917. return s
  7918. }
  7919. // SetMFA sets the MFA field's value.
  7920. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  7921. s.MFA = &v
  7922. return s
  7923. }
  7924. // SetRequestPayer sets the RequestPayer field's value.
  7925. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  7926. s.RequestPayer = &v
  7927. return s
  7928. }
  7929. // SetVersionId sets the VersionId field's value.
  7930. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  7931. s.VersionId = &v
  7932. return s
  7933. }
  7934. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectOutput
  7935. type DeleteObjectOutput struct {
  7936. _ struct{} `type:"structure"`
  7937. // Specifies whether the versioned object that was permanently deleted was (true)
  7938. // or was not (false) a delete marker.
  7939. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  7940. // If present, indicates that the requester was successfully charged for the
  7941. // request.
  7942. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7943. // Returns the version ID of the delete marker created as a result of the DELETE
  7944. // operation.
  7945. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7946. }
  7947. // String returns the string representation
  7948. func (s DeleteObjectOutput) String() string {
  7949. return awsutil.Prettify(s)
  7950. }
  7951. // GoString returns the string representation
  7952. func (s DeleteObjectOutput) GoString() string {
  7953. return s.String()
  7954. }
  7955. // SetDeleteMarker sets the DeleteMarker field's value.
  7956. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  7957. s.DeleteMarker = &v
  7958. return s
  7959. }
  7960. // SetRequestCharged sets the RequestCharged field's value.
  7961. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  7962. s.RequestCharged = &v
  7963. return s
  7964. }
  7965. // SetVersionId sets the VersionId field's value.
  7966. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  7967. s.VersionId = &v
  7968. return s
  7969. }
  7970. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingRequest
  7971. type DeleteObjectTaggingInput struct {
  7972. _ struct{} `type:"structure"`
  7973. // Bucket is a required field
  7974. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7975. // Key is a required field
  7976. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7977. // The versionId of the object that the tag-set will be removed from.
  7978. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  7979. }
  7980. // String returns the string representation
  7981. func (s DeleteObjectTaggingInput) String() string {
  7982. return awsutil.Prettify(s)
  7983. }
  7984. // GoString returns the string representation
  7985. func (s DeleteObjectTaggingInput) GoString() string {
  7986. return s.String()
  7987. }
  7988. // Validate inspects the fields of the type to determine if they are valid.
  7989. func (s *DeleteObjectTaggingInput) Validate() error {
  7990. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  7991. if s.Bucket == nil {
  7992. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7993. }
  7994. if s.Key == nil {
  7995. invalidParams.Add(request.NewErrParamRequired("Key"))
  7996. }
  7997. if s.Key != nil && len(*s.Key) < 1 {
  7998. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7999. }
  8000. if invalidParams.Len() > 0 {
  8001. return invalidParams
  8002. }
  8003. return nil
  8004. }
  8005. // SetBucket sets the Bucket field's value.
  8006. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  8007. s.Bucket = &v
  8008. return s
  8009. }
  8010. // SetKey sets the Key field's value.
  8011. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  8012. s.Key = &v
  8013. return s
  8014. }
  8015. // SetVersionId sets the VersionId field's value.
  8016. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  8017. s.VersionId = &v
  8018. return s
  8019. }
  8020. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingOutput
  8021. type DeleteObjectTaggingOutput struct {
  8022. _ struct{} `type:"structure"`
  8023. // The versionId of the object the tag-set was removed from.
  8024. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8025. }
  8026. // String returns the string representation
  8027. func (s DeleteObjectTaggingOutput) String() string {
  8028. return awsutil.Prettify(s)
  8029. }
  8030. // GoString returns the string representation
  8031. func (s DeleteObjectTaggingOutput) GoString() string {
  8032. return s.String()
  8033. }
  8034. // SetVersionId sets the VersionId field's value.
  8035. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  8036. s.VersionId = &v
  8037. return s
  8038. }
  8039. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsRequest
  8040. type DeleteObjectsInput struct {
  8041. _ struct{} `type:"structure" payload:"Delete"`
  8042. // Bucket is a required field
  8043. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8044. // Delete is a required field
  8045. Delete *Delete `locationName:"Delete" type:"structure" required:"true"`
  8046. // The concatenation of the authentication device's serial number, a space,
  8047. // and the value that is displayed on your authentication device.
  8048. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8049. // Confirms that the requester knows that she or he will be charged for the
  8050. // request. Bucket owners need not specify this parameter in their requests.
  8051. // Documentation on downloading objects from requester pays buckets can be found
  8052. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8053. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8054. }
  8055. // String returns the string representation
  8056. func (s DeleteObjectsInput) String() string {
  8057. return awsutil.Prettify(s)
  8058. }
  8059. // GoString returns the string representation
  8060. func (s DeleteObjectsInput) GoString() string {
  8061. return s.String()
  8062. }
  8063. // Validate inspects the fields of the type to determine if they are valid.
  8064. func (s *DeleteObjectsInput) Validate() error {
  8065. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  8066. if s.Bucket == nil {
  8067. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8068. }
  8069. if s.Delete == nil {
  8070. invalidParams.Add(request.NewErrParamRequired("Delete"))
  8071. }
  8072. if s.Delete != nil {
  8073. if err := s.Delete.Validate(); err != nil {
  8074. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  8075. }
  8076. }
  8077. if invalidParams.Len() > 0 {
  8078. return invalidParams
  8079. }
  8080. return nil
  8081. }
  8082. // SetBucket sets the Bucket field's value.
  8083. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  8084. s.Bucket = &v
  8085. return s
  8086. }
  8087. // SetDelete sets the Delete field's value.
  8088. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  8089. s.Delete = v
  8090. return s
  8091. }
  8092. // SetMFA sets the MFA field's value.
  8093. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  8094. s.MFA = &v
  8095. return s
  8096. }
  8097. // SetRequestPayer sets the RequestPayer field's value.
  8098. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  8099. s.RequestPayer = &v
  8100. return s
  8101. }
  8102. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsOutput
  8103. type DeleteObjectsOutput struct {
  8104. _ struct{} `type:"structure"`
  8105. Deleted []*DeletedObject `type:"list" flattened:"true"`
  8106. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  8107. // If present, indicates that the requester was successfully charged for the
  8108. // request.
  8109. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8110. }
  8111. // String returns the string representation
  8112. func (s DeleteObjectsOutput) String() string {
  8113. return awsutil.Prettify(s)
  8114. }
  8115. // GoString returns the string representation
  8116. func (s DeleteObjectsOutput) GoString() string {
  8117. return s.String()
  8118. }
  8119. // SetDeleted sets the Deleted field's value.
  8120. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  8121. s.Deleted = v
  8122. return s
  8123. }
  8124. // SetErrors sets the Errors field's value.
  8125. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  8126. s.Errors = v
  8127. return s
  8128. }
  8129. // SetRequestCharged sets the RequestCharged field's value.
  8130. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  8131. s.RequestCharged = &v
  8132. return s
  8133. }
  8134. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletedObject
  8135. type DeletedObject struct {
  8136. _ struct{} `type:"structure"`
  8137. DeleteMarker *bool `type:"boolean"`
  8138. DeleteMarkerVersionId *string `type:"string"`
  8139. Key *string `min:"1" type:"string"`
  8140. VersionId *string `type:"string"`
  8141. }
  8142. // String returns the string representation
  8143. func (s DeletedObject) String() string {
  8144. return awsutil.Prettify(s)
  8145. }
  8146. // GoString returns the string representation
  8147. func (s DeletedObject) GoString() string {
  8148. return s.String()
  8149. }
  8150. // SetDeleteMarker sets the DeleteMarker field's value.
  8151. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  8152. s.DeleteMarker = &v
  8153. return s
  8154. }
  8155. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  8156. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  8157. s.DeleteMarkerVersionId = &v
  8158. return s
  8159. }
  8160. // SetKey sets the Key field's value.
  8161. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  8162. s.Key = &v
  8163. return s
  8164. }
  8165. // SetVersionId sets the VersionId field's value.
  8166. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  8167. s.VersionId = &v
  8168. return s
  8169. }
  8170. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination
  8171. type Destination struct {
  8172. _ struct{} `type:"structure"`
  8173. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  8174. // replicas of the object identified by the rule.
  8175. //
  8176. // Bucket is a required field
  8177. Bucket *string `type:"string" required:"true"`
  8178. // The class of storage used to store the object.
  8179. StorageClass *string `type:"string" enum:"StorageClass"`
  8180. }
  8181. // String returns the string representation
  8182. func (s Destination) String() string {
  8183. return awsutil.Prettify(s)
  8184. }
  8185. // GoString returns the string representation
  8186. func (s Destination) GoString() string {
  8187. return s.String()
  8188. }
  8189. // Validate inspects the fields of the type to determine if they are valid.
  8190. func (s *Destination) Validate() error {
  8191. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  8192. if s.Bucket == nil {
  8193. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8194. }
  8195. if invalidParams.Len() > 0 {
  8196. return invalidParams
  8197. }
  8198. return nil
  8199. }
  8200. // SetBucket sets the Bucket field's value.
  8201. func (s *Destination) SetBucket(v string) *Destination {
  8202. s.Bucket = &v
  8203. return s
  8204. }
  8205. // SetStorageClass sets the StorageClass field's value.
  8206. func (s *Destination) SetStorageClass(v string) *Destination {
  8207. s.StorageClass = &v
  8208. return s
  8209. }
  8210. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error
  8211. type Error struct {
  8212. _ struct{} `type:"structure"`
  8213. Code *string `type:"string"`
  8214. Key *string `min:"1" type:"string"`
  8215. Message *string `type:"string"`
  8216. VersionId *string `type:"string"`
  8217. }
  8218. // String returns the string representation
  8219. func (s Error) String() string {
  8220. return awsutil.Prettify(s)
  8221. }
  8222. // GoString returns the string representation
  8223. func (s Error) GoString() string {
  8224. return s.String()
  8225. }
  8226. // SetCode sets the Code field's value.
  8227. func (s *Error) SetCode(v string) *Error {
  8228. s.Code = &v
  8229. return s
  8230. }
  8231. // SetKey sets the Key field's value.
  8232. func (s *Error) SetKey(v string) *Error {
  8233. s.Key = &v
  8234. return s
  8235. }
  8236. // SetMessage sets the Message field's value.
  8237. func (s *Error) SetMessage(v string) *Error {
  8238. s.Message = &v
  8239. return s
  8240. }
  8241. // SetVersionId sets the VersionId field's value.
  8242. func (s *Error) SetVersionId(v string) *Error {
  8243. s.VersionId = &v
  8244. return s
  8245. }
  8246. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument
  8247. type ErrorDocument struct {
  8248. _ struct{} `type:"structure"`
  8249. // The object key name to use when a 4XX class error occurs.
  8250. //
  8251. // Key is a required field
  8252. Key *string `min:"1" type:"string" required:"true"`
  8253. }
  8254. // String returns the string representation
  8255. func (s ErrorDocument) String() string {
  8256. return awsutil.Prettify(s)
  8257. }
  8258. // GoString returns the string representation
  8259. func (s ErrorDocument) GoString() string {
  8260. return s.String()
  8261. }
  8262. // Validate inspects the fields of the type to determine if they are valid.
  8263. func (s *ErrorDocument) Validate() error {
  8264. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  8265. if s.Key == nil {
  8266. invalidParams.Add(request.NewErrParamRequired("Key"))
  8267. }
  8268. if s.Key != nil && len(*s.Key) < 1 {
  8269. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8270. }
  8271. if invalidParams.Len() > 0 {
  8272. return invalidParams
  8273. }
  8274. return nil
  8275. }
  8276. // SetKey sets the Key field's value.
  8277. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  8278. s.Key = &v
  8279. return s
  8280. }
  8281. // Container for key value pair that defines the criteria for the filter rule.
  8282. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/FilterRule
  8283. type FilterRule struct {
  8284. _ struct{} `type:"structure"`
  8285. // Object key name prefix or suffix identifying one or more objects to which
  8286. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  8287. // Overlapping prefixes and suffixes are not supported. For more information,
  8288. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  8289. Name *string `type:"string" enum:"FilterRuleName"`
  8290. Value *string `type:"string"`
  8291. }
  8292. // String returns the string representation
  8293. func (s FilterRule) String() string {
  8294. return awsutil.Prettify(s)
  8295. }
  8296. // GoString returns the string representation
  8297. func (s FilterRule) GoString() string {
  8298. return s.String()
  8299. }
  8300. // SetName sets the Name field's value.
  8301. func (s *FilterRule) SetName(v string) *FilterRule {
  8302. s.Name = &v
  8303. return s
  8304. }
  8305. // SetValue sets the Value field's value.
  8306. func (s *FilterRule) SetValue(v string) *FilterRule {
  8307. s.Value = &v
  8308. return s
  8309. }
  8310. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationRequest
  8311. type GetBucketAccelerateConfigurationInput struct {
  8312. _ struct{} `type:"structure"`
  8313. // Name of the bucket for which the accelerate configuration is retrieved.
  8314. //
  8315. // Bucket is a required field
  8316. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8317. }
  8318. // String returns the string representation
  8319. func (s GetBucketAccelerateConfigurationInput) String() string {
  8320. return awsutil.Prettify(s)
  8321. }
  8322. // GoString returns the string representation
  8323. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  8324. return s.String()
  8325. }
  8326. // Validate inspects the fields of the type to determine if they are valid.
  8327. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  8328. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  8329. if s.Bucket == nil {
  8330. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8331. }
  8332. if invalidParams.Len() > 0 {
  8333. return invalidParams
  8334. }
  8335. return nil
  8336. }
  8337. // SetBucket sets the Bucket field's value.
  8338. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  8339. s.Bucket = &v
  8340. return s
  8341. }
  8342. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput
  8343. type GetBucketAccelerateConfigurationOutput struct {
  8344. _ struct{} `type:"structure"`
  8345. // The accelerate configuration of the bucket.
  8346. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  8347. }
  8348. // String returns the string representation
  8349. func (s GetBucketAccelerateConfigurationOutput) String() string {
  8350. return awsutil.Prettify(s)
  8351. }
  8352. // GoString returns the string representation
  8353. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  8354. return s.String()
  8355. }
  8356. // SetStatus sets the Status field's value.
  8357. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  8358. s.Status = &v
  8359. return s
  8360. }
  8361. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclRequest
  8362. type GetBucketAclInput struct {
  8363. _ struct{} `type:"structure"`
  8364. // Bucket is a required field
  8365. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8366. }
  8367. // String returns the string representation
  8368. func (s GetBucketAclInput) String() string {
  8369. return awsutil.Prettify(s)
  8370. }
  8371. // GoString returns the string representation
  8372. func (s GetBucketAclInput) GoString() string {
  8373. return s.String()
  8374. }
  8375. // Validate inspects the fields of the type to determine if they are valid.
  8376. func (s *GetBucketAclInput) Validate() error {
  8377. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  8378. if s.Bucket == nil {
  8379. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8380. }
  8381. if invalidParams.Len() > 0 {
  8382. return invalidParams
  8383. }
  8384. return nil
  8385. }
  8386. // SetBucket sets the Bucket field's value.
  8387. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  8388. s.Bucket = &v
  8389. return s
  8390. }
  8391. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput
  8392. type GetBucketAclOutput struct {
  8393. _ struct{} `type:"structure"`
  8394. // A list of grants.
  8395. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  8396. Owner *Owner `type:"structure"`
  8397. }
  8398. // String returns the string representation
  8399. func (s GetBucketAclOutput) String() string {
  8400. return awsutil.Prettify(s)
  8401. }
  8402. // GoString returns the string representation
  8403. func (s GetBucketAclOutput) GoString() string {
  8404. return s.String()
  8405. }
  8406. // SetGrants sets the Grants field's value.
  8407. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  8408. s.Grants = v
  8409. return s
  8410. }
  8411. // SetOwner sets the Owner field's value.
  8412. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  8413. s.Owner = v
  8414. return s
  8415. }
  8416. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationRequest
  8417. type GetBucketAnalyticsConfigurationInput struct {
  8418. _ struct{} `type:"structure"`
  8419. // The name of the bucket from which an analytics configuration is retrieved.
  8420. //
  8421. // Bucket is a required field
  8422. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8423. // The identifier used to represent an analytics configuration.
  8424. //
  8425. // Id is a required field
  8426. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8427. }
  8428. // String returns the string representation
  8429. func (s GetBucketAnalyticsConfigurationInput) String() string {
  8430. return awsutil.Prettify(s)
  8431. }
  8432. // GoString returns the string representation
  8433. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  8434. return s.String()
  8435. }
  8436. // Validate inspects the fields of the type to determine if they are valid.
  8437. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  8438. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  8439. if s.Bucket == nil {
  8440. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8441. }
  8442. if s.Id == nil {
  8443. invalidParams.Add(request.NewErrParamRequired("Id"))
  8444. }
  8445. if invalidParams.Len() > 0 {
  8446. return invalidParams
  8447. }
  8448. return nil
  8449. }
  8450. // SetBucket sets the Bucket field's value.
  8451. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  8452. s.Bucket = &v
  8453. return s
  8454. }
  8455. // SetId sets the Id field's value.
  8456. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  8457. s.Id = &v
  8458. return s
  8459. }
  8460. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationOutput
  8461. type GetBucketAnalyticsConfigurationOutput struct {
  8462. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  8463. // The configuration and any analyses for the analytics filter.
  8464. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  8465. }
  8466. // String returns the string representation
  8467. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  8468. return awsutil.Prettify(s)
  8469. }
  8470. // GoString returns the string representation
  8471. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  8472. return s.String()
  8473. }
  8474. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  8475. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  8476. s.AnalyticsConfiguration = v
  8477. return s
  8478. }
  8479. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsRequest
  8480. type GetBucketCorsInput struct {
  8481. _ struct{} `type:"structure"`
  8482. // Bucket is a required field
  8483. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8484. }
  8485. // String returns the string representation
  8486. func (s GetBucketCorsInput) String() string {
  8487. return awsutil.Prettify(s)
  8488. }
  8489. // GoString returns the string representation
  8490. func (s GetBucketCorsInput) GoString() string {
  8491. return s.String()
  8492. }
  8493. // Validate inspects the fields of the type to determine if they are valid.
  8494. func (s *GetBucketCorsInput) Validate() error {
  8495. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  8496. if s.Bucket == nil {
  8497. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8498. }
  8499. if invalidParams.Len() > 0 {
  8500. return invalidParams
  8501. }
  8502. return nil
  8503. }
  8504. // SetBucket sets the Bucket field's value.
  8505. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  8506. s.Bucket = &v
  8507. return s
  8508. }
  8509. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput
  8510. type GetBucketCorsOutput struct {
  8511. _ struct{} `type:"structure"`
  8512. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  8513. }
  8514. // String returns the string representation
  8515. func (s GetBucketCorsOutput) String() string {
  8516. return awsutil.Prettify(s)
  8517. }
  8518. // GoString returns the string representation
  8519. func (s GetBucketCorsOutput) GoString() string {
  8520. return s.String()
  8521. }
  8522. // SetCORSRules sets the CORSRules field's value.
  8523. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  8524. s.CORSRules = v
  8525. return s
  8526. }
  8527. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest
  8528. type GetBucketInventoryConfigurationInput struct {
  8529. _ struct{} `type:"structure"`
  8530. // The name of the bucket containing the inventory configuration to retrieve.
  8531. //
  8532. // Bucket is a required field
  8533. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8534. // The ID used to identify the inventory configuration.
  8535. //
  8536. // Id is a required field
  8537. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8538. }
  8539. // String returns the string representation
  8540. func (s GetBucketInventoryConfigurationInput) String() string {
  8541. return awsutil.Prettify(s)
  8542. }
  8543. // GoString returns the string representation
  8544. func (s GetBucketInventoryConfigurationInput) GoString() string {
  8545. return s.String()
  8546. }
  8547. // Validate inspects the fields of the type to determine if they are valid.
  8548. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  8549. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  8550. if s.Bucket == nil {
  8551. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8552. }
  8553. if s.Id == nil {
  8554. invalidParams.Add(request.NewErrParamRequired("Id"))
  8555. }
  8556. if invalidParams.Len() > 0 {
  8557. return invalidParams
  8558. }
  8559. return nil
  8560. }
  8561. // SetBucket sets the Bucket field's value.
  8562. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  8563. s.Bucket = &v
  8564. return s
  8565. }
  8566. // SetId sets the Id field's value.
  8567. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  8568. s.Id = &v
  8569. return s
  8570. }
  8571. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationOutput
  8572. type GetBucketInventoryConfigurationOutput struct {
  8573. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  8574. // Specifies the inventory configuration.
  8575. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  8576. }
  8577. // String returns the string representation
  8578. func (s GetBucketInventoryConfigurationOutput) String() string {
  8579. return awsutil.Prettify(s)
  8580. }
  8581. // GoString returns the string representation
  8582. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  8583. return s.String()
  8584. }
  8585. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  8586. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  8587. s.InventoryConfiguration = v
  8588. return s
  8589. }
  8590. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationRequest
  8591. type GetBucketLifecycleConfigurationInput struct {
  8592. _ struct{} `type:"structure"`
  8593. // Bucket is a required field
  8594. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8595. }
  8596. // String returns the string representation
  8597. func (s GetBucketLifecycleConfigurationInput) String() string {
  8598. return awsutil.Prettify(s)
  8599. }
  8600. // GoString returns the string representation
  8601. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  8602. return s.String()
  8603. }
  8604. // Validate inspects the fields of the type to determine if they are valid.
  8605. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  8606. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  8607. if s.Bucket == nil {
  8608. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8609. }
  8610. if invalidParams.Len() > 0 {
  8611. return invalidParams
  8612. }
  8613. return nil
  8614. }
  8615. // SetBucket sets the Bucket field's value.
  8616. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  8617. s.Bucket = &v
  8618. return s
  8619. }
  8620. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput
  8621. type GetBucketLifecycleConfigurationOutput struct {
  8622. _ struct{} `type:"structure"`
  8623. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  8624. }
  8625. // String returns the string representation
  8626. func (s GetBucketLifecycleConfigurationOutput) String() string {
  8627. return awsutil.Prettify(s)
  8628. }
  8629. // GoString returns the string representation
  8630. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  8631. return s.String()
  8632. }
  8633. // SetRules sets the Rules field's value.
  8634. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  8635. s.Rules = v
  8636. return s
  8637. }
  8638. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleRequest
  8639. type GetBucketLifecycleInput struct {
  8640. _ struct{} `type:"structure"`
  8641. // Bucket is a required field
  8642. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8643. }
  8644. // String returns the string representation
  8645. func (s GetBucketLifecycleInput) String() string {
  8646. return awsutil.Prettify(s)
  8647. }
  8648. // GoString returns the string representation
  8649. func (s GetBucketLifecycleInput) GoString() string {
  8650. return s.String()
  8651. }
  8652. // Validate inspects the fields of the type to determine if they are valid.
  8653. func (s *GetBucketLifecycleInput) Validate() error {
  8654. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  8655. if s.Bucket == nil {
  8656. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  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 *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  8665. s.Bucket = &v
  8666. return s
  8667. }
  8668. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput
  8669. type GetBucketLifecycleOutput struct {
  8670. _ struct{} `type:"structure"`
  8671. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  8672. }
  8673. // String returns the string representation
  8674. func (s GetBucketLifecycleOutput) String() string {
  8675. return awsutil.Prettify(s)
  8676. }
  8677. // GoString returns the string representation
  8678. func (s GetBucketLifecycleOutput) GoString() string {
  8679. return s.String()
  8680. }
  8681. // SetRules sets the Rules field's value.
  8682. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  8683. s.Rules = v
  8684. return s
  8685. }
  8686. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationRequest
  8687. type GetBucketLocationInput struct {
  8688. _ struct{} `type:"structure"`
  8689. // Bucket is a required field
  8690. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8691. }
  8692. // String returns the string representation
  8693. func (s GetBucketLocationInput) String() string {
  8694. return awsutil.Prettify(s)
  8695. }
  8696. // GoString returns the string representation
  8697. func (s GetBucketLocationInput) GoString() string {
  8698. return s.String()
  8699. }
  8700. // Validate inspects the fields of the type to determine if they are valid.
  8701. func (s *GetBucketLocationInput) Validate() error {
  8702. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  8703. if s.Bucket == nil {
  8704. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8705. }
  8706. if invalidParams.Len() > 0 {
  8707. return invalidParams
  8708. }
  8709. return nil
  8710. }
  8711. // SetBucket sets the Bucket field's value.
  8712. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  8713. s.Bucket = &v
  8714. return s
  8715. }
  8716. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput
  8717. type GetBucketLocationOutput struct {
  8718. _ struct{} `type:"structure"`
  8719. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  8720. }
  8721. // String returns the string representation
  8722. func (s GetBucketLocationOutput) String() string {
  8723. return awsutil.Prettify(s)
  8724. }
  8725. // GoString returns the string representation
  8726. func (s GetBucketLocationOutput) GoString() string {
  8727. return s.String()
  8728. }
  8729. // SetLocationConstraint sets the LocationConstraint field's value.
  8730. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  8731. s.LocationConstraint = &v
  8732. return s
  8733. }
  8734. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingRequest
  8735. type GetBucketLoggingInput struct {
  8736. _ struct{} `type:"structure"`
  8737. // Bucket is a required field
  8738. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8739. }
  8740. // String returns the string representation
  8741. func (s GetBucketLoggingInput) String() string {
  8742. return awsutil.Prettify(s)
  8743. }
  8744. // GoString returns the string representation
  8745. func (s GetBucketLoggingInput) GoString() string {
  8746. return s.String()
  8747. }
  8748. // Validate inspects the fields of the type to determine if they are valid.
  8749. func (s *GetBucketLoggingInput) Validate() error {
  8750. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  8751. if s.Bucket == nil {
  8752. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8753. }
  8754. if invalidParams.Len() > 0 {
  8755. return invalidParams
  8756. }
  8757. return nil
  8758. }
  8759. // SetBucket sets the Bucket field's value.
  8760. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  8761. s.Bucket = &v
  8762. return s
  8763. }
  8764. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput
  8765. type GetBucketLoggingOutput struct {
  8766. _ struct{} `type:"structure"`
  8767. LoggingEnabled *LoggingEnabled `type:"structure"`
  8768. }
  8769. // String returns the string representation
  8770. func (s GetBucketLoggingOutput) String() string {
  8771. return awsutil.Prettify(s)
  8772. }
  8773. // GoString returns the string representation
  8774. func (s GetBucketLoggingOutput) GoString() string {
  8775. return s.String()
  8776. }
  8777. // SetLoggingEnabled sets the LoggingEnabled field's value.
  8778. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  8779. s.LoggingEnabled = v
  8780. return s
  8781. }
  8782. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationRequest
  8783. type GetBucketMetricsConfigurationInput struct {
  8784. _ struct{} `type:"structure"`
  8785. // The name of the bucket containing the metrics configuration to retrieve.
  8786. //
  8787. // Bucket is a required field
  8788. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8789. // The ID used to identify the metrics configuration.
  8790. //
  8791. // Id is a required field
  8792. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8793. }
  8794. // String returns the string representation
  8795. func (s GetBucketMetricsConfigurationInput) String() string {
  8796. return awsutil.Prettify(s)
  8797. }
  8798. // GoString returns the string representation
  8799. func (s GetBucketMetricsConfigurationInput) GoString() string {
  8800. return s.String()
  8801. }
  8802. // Validate inspects the fields of the type to determine if they are valid.
  8803. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  8804. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  8805. if s.Bucket == nil {
  8806. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8807. }
  8808. if s.Id == nil {
  8809. invalidParams.Add(request.NewErrParamRequired("Id"))
  8810. }
  8811. if invalidParams.Len() > 0 {
  8812. return invalidParams
  8813. }
  8814. return nil
  8815. }
  8816. // SetBucket sets the Bucket field's value.
  8817. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  8818. s.Bucket = &v
  8819. return s
  8820. }
  8821. // SetId sets the Id field's value.
  8822. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  8823. s.Id = &v
  8824. return s
  8825. }
  8826. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationOutput
  8827. type GetBucketMetricsConfigurationOutput struct {
  8828. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  8829. // Specifies the metrics configuration.
  8830. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  8831. }
  8832. // String returns the string representation
  8833. func (s GetBucketMetricsConfigurationOutput) String() string {
  8834. return awsutil.Prettify(s)
  8835. }
  8836. // GoString returns the string representation
  8837. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  8838. return s.String()
  8839. }
  8840. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  8841. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  8842. s.MetricsConfiguration = v
  8843. return s
  8844. }
  8845. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfigurationRequest
  8846. type GetBucketNotificationConfigurationRequest struct {
  8847. _ struct{} `type:"structure"`
  8848. // Name of the bucket to get the notification configuration for.
  8849. //
  8850. // Bucket is a required field
  8851. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8852. }
  8853. // String returns the string representation
  8854. func (s GetBucketNotificationConfigurationRequest) String() string {
  8855. return awsutil.Prettify(s)
  8856. }
  8857. // GoString returns the string representation
  8858. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  8859. return s.String()
  8860. }
  8861. // Validate inspects the fields of the type to determine if they are valid.
  8862. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  8863. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  8864. if s.Bucket == nil {
  8865. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8866. }
  8867. if invalidParams.Len() > 0 {
  8868. return invalidParams
  8869. }
  8870. return nil
  8871. }
  8872. // SetBucket sets the Bucket field's value.
  8873. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  8874. s.Bucket = &v
  8875. return s
  8876. }
  8877. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest
  8878. type GetBucketPolicyInput struct {
  8879. _ struct{} `type:"structure"`
  8880. // Bucket is a required field
  8881. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8882. }
  8883. // String returns the string representation
  8884. func (s GetBucketPolicyInput) String() string {
  8885. return awsutil.Prettify(s)
  8886. }
  8887. // GoString returns the string representation
  8888. func (s GetBucketPolicyInput) GoString() string {
  8889. return s.String()
  8890. }
  8891. // Validate inspects the fields of the type to determine if they are valid.
  8892. func (s *GetBucketPolicyInput) Validate() error {
  8893. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  8894. if s.Bucket == nil {
  8895. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8896. }
  8897. if invalidParams.Len() > 0 {
  8898. return invalidParams
  8899. }
  8900. return nil
  8901. }
  8902. // SetBucket sets the Bucket field's value.
  8903. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  8904. s.Bucket = &v
  8905. return s
  8906. }
  8907. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput
  8908. type GetBucketPolicyOutput struct {
  8909. _ struct{} `type:"structure" payload:"Policy"`
  8910. // The bucket policy as a JSON document.
  8911. Policy *string `type:"string"`
  8912. }
  8913. // String returns the string representation
  8914. func (s GetBucketPolicyOutput) String() string {
  8915. return awsutil.Prettify(s)
  8916. }
  8917. // GoString returns the string representation
  8918. func (s GetBucketPolicyOutput) GoString() string {
  8919. return s.String()
  8920. }
  8921. // SetPolicy sets the Policy field's value.
  8922. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  8923. s.Policy = &v
  8924. return s
  8925. }
  8926. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationRequest
  8927. type GetBucketReplicationInput struct {
  8928. _ struct{} `type:"structure"`
  8929. // Bucket is a required field
  8930. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8931. }
  8932. // String returns the string representation
  8933. func (s GetBucketReplicationInput) String() string {
  8934. return awsutil.Prettify(s)
  8935. }
  8936. // GoString returns the string representation
  8937. func (s GetBucketReplicationInput) GoString() string {
  8938. return s.String()
  8939. }
  8940. // Validate inspects the fields of the type to determine if they are valid.
  8941. func (s *GetBucketReplicationInput) Validate() error {
  8942. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  8943. if s.Bucket == nil {
  8944. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8945. }
  8946. if invalidParams.Len() > 0 {
  8947. return invalidParams
  8948. }
  8949. return nil
  8950. }
  8951. // SetBucket sets the Bucket field's value.
  8952. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  8953. s.Bucket = &v
  8954. return s
  8955. }
  8956. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput
  8957. type GetBucketReplicationOutput struct {
  8958. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  8959. // Container for replication rules. You can add as many as 1,000 rules. Total
  8960. // replication configuration size can be up to 2 MB.
  8961. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  8962. }
  8963. // String returns the string representation
  8964. func (s GetBucketReplicationOutput) String() string {
  8965. return awsutil.Prettify(s)
  8966. }
  8967. // GoString returns the string representation
  8968. func (s GetBucketReplicationOutput) GoString() string {
  8969. return s.String()
  8970. }
  8971. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  8972. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  8973. s.ReplicationConfiguration = v
  8974. return s
  8975. }
  8976. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentRequest
  8977. type GetBucketRequestPaymentInput struct {
  8978. _ struct{} `type:"structure"`
  8979. // Bucket is a required field
  8980. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8981. }
  8982. // String returns the string representation
  8983. func (s GetBucketRequestPaymentInput) String() string {
  8984. return awsutil.Prettify(s)
  8985. }
  8986. // GoString returns the string representation
  8987. func (s GetBucketRequestPaymentInput) GoString() string {
  8988. return s.String()
  8989. }
  8990. // Validate inspects the fields of the type to determine if they are valid.
  8991. func (s *GetBucketRequestPaymentInput) Validate() error {
  8992. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  8993. if s.Bucket == nil {
  8994. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8995. }
  8996. if invalidParams.Len() > 0 {
  8997. return invalidParams
  8998. }
  8999. return nil
  9000. }
  9001. // SetBucket sets the Bucket field's value.
  9002. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  9003. s.Bucket = &v
  9004. return s
  9005. }
  9006. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput
  9007. type GetBucketRequestPaymentOutput struct {
  9008. _ struct{} `type:"structure"`
  9009. // Specifies who pays for the download and request fees.
  9010. Payer *string `type:"string" enum:"Payer"`
  9011. }
  9012. // String returns the string representation
  9013. func (s GetBucketRequestPaymentOutput) String() string {
  9014. return awsutil.Prettify(s)
  9015. }
  9016. // GoString returns the string representation
  9017. func (s GetBucketRequestPaymentOutput) GoString() string {
  9018. return s.String()
  9019. }
  9020. // SetPayer sets the Payer field's value.
  9021. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  9022. s.Payer = &v
  9023. return s
  9024. }
  9025. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingRequest
  9026. type GetBucketTaggingInput struct {
  9027. _ struct{} `type:"structure"`
  9028. // Bucket is a required field
  9029. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9030. }
  9031. // String returns the string representation
  9032. func (s GetBucketTaggingInput) String() string {
  9033. return awsutil.Prettify(s)
  9034. }
  9035. // GoString returns the string representation
  9036. func (s GetBucketTaggingInput) GoString() string {
  9037. return s.String()
  9038. }
  9039. // Validate inspects the fields of the type to determine if they are valid.
  9040. func (s *GetBucketTaggingInput) Validate() error {
  9041. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  9042. if s.Bucket == nil {
  9043. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9044. }
  9045. if invalidParams.Len() > 0 {
  9046. return invalidParams
  9047. }
  9048. return nil
  9049. }
  9050. // SetBucket sets the Bucket field's value.
  9051. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  9052. s.Bucket = &v
  9053. return s
  9054. }
  9055. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput
  9056. type GetBucketTaggingOutput struct {
  9057. _ struct{} `type:"structure"`
  9058. // TagSet is a required field
  9059. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  9060. }
  9061. // String returns the string representation
  9062. func (s GetBucketTaggingOutput) String() string {
  9063. return awsutil.Prettify(s)
  9064. }
  9065. // GoString returns the string representation
  9066. func (s GetBucketTaggingOutput) GoString() string {
  9067. return s.String()
  9068. }
  9069. // SetTagSet sets the TagSet field's value.
  9070. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  9071. s.TagSet = v
  9072. return s
  9073. }
  9074. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningRequest
  9075. type GetBucketVersioningInput struct {
  9076. _ struct{} `type:"structure"`
  9077. // Bucket is a required field
  9078. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9079. }
  9080. // String returns the string representation
  9081. func (s GetBucketVersioningInput) String() string {
  9082. return awsutil.Prettify(s)
  9083. }
  9084. // GoString returns the string representation
  9085. func (s GetBucketVersioningInput) GoString() string {
  9086. return s.String()
  9087. }
  9088. // Validate inspects the fields of the type to determine if they are valid.
  9089. func (s *GetBucketVersioningInput) Validate() error {
  9090. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  9091. if s.Bucket == nil {
  9092. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9093. }
  9094. if invalidParams.Len() > 0 {
  9095. return invalidParams
  9096. }
  9097. return nil
  9098. }
  9099. // SetBucket sets the Bucket field's value.
  9100. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  9101. s.Bucket = &v
  9102. return s
  9103. }
  9104. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput
  9105. type GetBucketVersioningOutput struct {
  9106. _ struct{} `type:"structure"`
  9107. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  9108. // This element is only returned if the bucket has been configured with MFA
  9109. // delete. If the bucket has never been so configured, this element is not returned.
  9110. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  9111. // The versioning state of the bucket.
  9112. Status *string `type:"string" enum:"BucketVersioningStatus"`
  9113. }
  9114. // String returns the string representation
  9115. func (s GetBucketVersioningOutput) String() string {
  9116. return awsutil.Prettify(s)
  9117. }
  9118. // GoString returns the string representation
  9119. func (s GetBucketVersioningOutput) GoString() string {
  9120. return s.String()
  9121. }
  9122. // SetMFADelete sets the MFADelete field's value.
  9123. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  9124. s.MFADelete = &v
  9125. return s
  9126. }
  9127. // SetStatus sets the Status field's value.
  9128. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  9129. s.Status = &v
  9130. return s
  9131. }
  9132. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteRequest
  9133. type GetBucketWebsiteInput struct {
  9134. _ struct{} `type:"structure"`
  9135. // Bucket is a required field
  9136. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9137. }
  9138. // String returns the string representation
  9139. func (s GetBucketWebsiteInput) String() string {
  9140. return awsutil.Prettify(s)
  9141. }
  9142. // GoString returns the string representation
  9143. func (s GetBucketWebsiteInput) GoString() string {
  9144. return s.String()
  9145. }
  9146. // Validate inspects the fields of the type to determine if they are valid.
  9147. func (s *GetBucketWebsiteInput) Validate() error {
  9148. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  9149. if s.Bucket == nil {
  9150. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9151. }
  9152. if invalidParams.Len() > 0 {
  9153. return invalidParams
  9154. }
  9155. return nil
  9156. }
  9157. // SetBucket sets the Bucket field's value.
  9158. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  9159. s.Bucket = &v
  9160. return s
  9161. }
  9162. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput
  9163. type GetBucketWebsiteOutput struct {
  9164. _ struct{} `type:"structure"`
  9165. ErrorDocument *ErrorDocument `type:"structure"`
  9166. IndexDocument *IndexDocument `type:"structure"`
  9167. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  9168. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  9169. }
  9170. // String returns the string representation
  9171. func (s GetBucketWebsiteOutput) String() string {
  9172. return awsutil.Prettify(s)
  9173. }
  9174. // GoString returns the string representation
  9175. func (s GetBucketWebsiteOutput) GoString() string {
  9176. return s.String()
  9177. }
  9178. // SetErrorDocument sets the ErrorDocument field's value.
  9179. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  9180. s.ErrorDocument = v
  9181. return s
  9182. }
  9183. // SetIndexDocument sets the IndexDocument field's value.
  9184. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  9185. s.IndexDocument = v
  9186. return s
  9187. }
  9188. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  9189. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  9190. s.RedirectAllRequestsTo = v
  9191. return s
  9192. }
  9193. // SetRoutingRules sets the RoutingRules field's value.
  9194. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  9195. s.RoutingRules = v
  9196. return s
  9197. }
  9198. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclRequest
  9199. type GetObjectAclInput struct {
  9200. _ struct{} `type:"structure"`
  9201. // Bucket is a required field
  9202. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9203. // Key is a required field
  9204. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9205. // Confirms that the requester knows that she or he will be charged for the
  9206. // request. Bucket owners need not specify this parameter in their requests.
  9207. // Documentation on downloading objects from requester pays buckets can be found
  9208. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9209. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9210. // VersionId used to reference a specific version of the object.
  9211. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9212. }
  9213. // String returns the string representation
  9214. func (s GetObjectAclInput) String() string {
  9215. return awsutil.Prettify(s)
  9216. }
  9217. // GoString returns the string representation
  9218. func (s GetObjectAclInput) GoString() string {
  9219. return s.String()
  9220. }
  9221. // Validate inspects the fields of the type to determine if they are valid.
  9222. func (s *GetObjectAclInput) Validate() error {
  9223. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  9224. if s.Bucket == nil {
  9225. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9226. }
  9227. if s.Key == nil {
  9228. invalidParams.Add(request.NewErrParamRequired("Key"))
  9229. }
  9230. if s.Key != nil && len(*s.Key) < 1 {
  9231. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9232. }
  9233. if invalidParams.Len() > 0 {
  9234. return invalidParams
  9235. }
  9236. return nil
  9237. }
  9238. // SetBucket sets the Bucket field's value.
  9239. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  9240. s.Bucket = &v
  9241. return s
  9242. }
  9243. // SetKey sets the Key field's value.
  9244. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  9245. s.Key = &v
  9246. return s
  9247. }
  9248. // SetRequestPayer sets the RequestPayer field's value.
  9249. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  9250. s.RequestPayer = &v
  9251. return s
  9252. }
  9253. // SetVersionId sets the VersionId field's value.
  9254. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  9255. s.VersionId = &v
  9256. return s
  9257. }
  9258. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclOutput
  9259. type GetObjectAclOutput struct {
  9260. _ struct{} `type:"structure"`
  9261. // A list of grants.
  9262. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  9263. Owner *Owner `type:"structure"`
  9264. // If present, indicates that the requester was successfully charged for the
  9265. // request.
  9266. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9267. }
  9268. // String returns the string representation
  9269. func (s GetObjectAclOutput) String() string {
  9270. return awsutil.Prettify(s)
  9271. }
  9272. // GoString returns the string representation
  9273. func (s GetObjectAclOutput) GoString() string {
  9274. return s.String()
  9275. }
  9276. // SetGrants sets the Grants field's value.
  9277. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  9278. s.Grants = v
  9279. return s
  9280. }
  9281. // SetOwner sets the Owner field's value.
  9282. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  9283. s.Owner = v
  9284. return s
  9285. }
  9286. // SetRequestCharged sets the RequestCharged field's value.
  9287. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  9288. s.RequestCharged = &v
  9289. return s
  9290. }
  9291. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRequest
  9292. type GetObjectInput struct {
  9293. _ struct{} `type:"structure"`
  9294. // Bucket is a required field
  9295. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9296. // Return the object only if its entity tag (ETag) is the same as the one specified,
  9297. // otherwise return a 412 (precondition failed).
  9298. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  9299. // Return the object only if it has been modified since the specified time,
  9300. // otherwise return a 304 (not modified).
  9301. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  9302. // Return the object only if its entity tag (ETag) is different from the one
  9303. // specified, otherwise return a 304 (not modified).
  9304. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  9305. // Return the object only if it has not been modified since the specified time,
  9306. // otherwise return a 412 (precondition failed).
  9307. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  9308. // Key is a required field
  9309. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9310. // Part number of the object being read. This is a positive integer between
  9311. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  9312. // Useful for downloading just a part of an object.
  9313. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  9314. // Downloads the specified range bytes of an object. For more information about
  9315. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  9316. Range *string `location:"header" locationName:"Range" type:"string"`
  9317. // Confirms that the requester knows that she or he will be charged for the
  9318. // request. Bucket owners need not specify this parameter in their requests.
  9319. // Documentation on downloading objects from requester pays buckets can be found
  9320. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9321. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9322. // Sets the Cache-Control header of the response.
  9323. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  9324. // Sets the Content-Disposition header of the response
  9325. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  9326. // Sets the Content-Encoding header of the response.
  9327. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  9328. // Sets the Content-Language header of the response.
  9329. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  9330. // Sets the Content-Type header of the response.
  9331. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  9332. // Sets the Expires header of the response.
  9333. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  9334. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  9335. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  9336. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  9337. // data. This value is used to store the object and then it is discarded; Amazon
  9338. // does not store the encryption key. The key must be appropriate for use with
  9339. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  9340. // header.
  9341. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  9342. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  9343. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  9344. // key was transmitted without error.
  9345. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  9346. // VersionId used to reference a specific version of the object.
  9347. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9348. }
  9349. // String returns the string representation
  9350. func (s GetObjectInput) String() string {
  9351. return awsutil.Prettify(s)
  9352. }
  9353. // GoString returns the string representation
  9354. func (s GetObjectInput) GoString() string {
  9355. return s.String()
  9356. }
  9357. // Validate inspects the fields of the type to determine if they are valid.
  9358. func (s *GetObjectInput) Validate() error {
  9359. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  9360. if s.Bucket == nil {
  9361. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9362. }
  9363. if s.Key == nil {
  9364. invalidParams.Add(request.NewErrParamRequired("Key"))
  9365. }
  9366. if s.Key != nil && len(*s.Key) < 1 {
  9367. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9368. }
  9369. if invalidParams.Len() > 0 {
  9370. return invalidParams
  9371. }
  9372. return nil
  9373. }
  9374. // SetBucket sets the Bucket field's value.
  9375. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  9376. s.Bucket = &v
  9377. return s
  9378. }
  9379. // SetIfMatch sets the IfMatch field's value.
  9380. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  9381. s.IfMatch = &v
  9382. return s
  9383. }
  9384. // SetIfModifiedSince sets the IfModifiedSince field's value.
  9385. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  9386. s.IfModifiedSince = &v
  9387. return s
  9388. }
  9389. // SetIfNoneMatch sets the IfNoneMatch field's value.
  9390. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  9391. s.IfNoneMatch = &v
  9392. return s
  9393. }
  9394. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  9395. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  9396. s.IfUnmodifiedSince = &v
  9397. return s
  9398. }
  9399. // SetKey sets the Key field's value.
  9400. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  9401. s.Key = &v
  9402. return s
  9403. }
  9404. // SetPartNumber sets the PartNumber field's value.
  9405. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  9406. s.PartNumber = &v
  9407. return s
  9408. }
  9409. // SetRange sets the Range field's value.
  9410. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  9411. s.Range = &v
  9412. return s
  9413. }
  9414. // SetRequestPayer sets the RequestPayer field's value.
  9415. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  9416. s.RequestPayer = &v
  9417. return s
  9418. }
  9419. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  9420. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  9421. s.ResponseCacheControl = &v
  9422. return s
  9423. }
  9424. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  9425. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  9426. s.ResponseContentDisposition = &v
  9427. return s
  9428. }
  9429. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  9430. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  9431. s.ResponseContentEncoding = &v
  9432. return s
  9433. }
  9434. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  9435. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  9436. s.ResponseContentLanguage = &v
  9437. return s
  9438. }
  9439. // SetResponseContentType sets the ResponseContentType field's value.
  9440. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  9441. s.ResponseContentType = &v
  9442. return s
  9443. }
  9444. // SetResponseExpires sets the ResponseExpires field's value.
  9445. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  9446. s.ResponseExpires = &v
  9447. return s
  9448. }
  9449. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  9450. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  9451. s.SSECustomerAlgorithm = &v
  9452. return s
  9453. }
  9454. // SetSSECustomerKey sets the SSECustomerKey field's value.
  9455. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  9456. s.SSECustomerKey = &v
  9457. return s
  9458. }
  9459. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  9460. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  9461. s.SSECustomerKeyMD5 = &v
  9462. return s
  9463. }
  9464. // SetVersionId sets the VersionId field's value.
  9465. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  9466. s.VersionId = &v
  9467. return s
  9468. }
  9469. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectOutput
  9470. type GetObjectOutput struct {
  9471. _ struct{} `type:"structure" payload:"Body"`
  9472. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  9473. // Object data.
  9474. Body io.ReadCloser `type:"blob"`
  9475. // Specifies caching behavior along the request/reply chain.
  9476. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  9477. // Specifies presentational information for the object.
  9478. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  9479. // Specifies what content encodings have been applied to the object and thus
  9480. // what decoding mechanisms must be applied to obtain the media-type referenced
  9481. // by the Content-Type header field.
  9482. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  9483. // The language the content is in.
  9484. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  9485. // Size of the body in bytes.
  9486. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  9487. // The portion of the object returned in the response.
  9488. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  9489. // A standard MIME type describing the format of the object data.
  9490. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  9491. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  9492. // Marker. If false, this response header does not appear in the response.
  9493. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  9494. // An ETag is an opaque identifier assigned by a web server to a specific version
  9495. // of a resource found at a URL
  9496. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9497. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  9498. // includes this header. It includes the expiry-date and rule-id key value pairs
  9499. // providing object expiration information. The value of the rule-id is URL
  9500. // encoded.
  9501. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  9502. // The date and time at which the object is no longer cacheable.
  9503. Expires *string `location:"header" locationName:"Expires" type:"string"`
  9504. // Last modified date of the object
  9505. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  9506. // A map of metadata to store with the object in S3.
  9507. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  9508. // This is set to the number of metadata entries not returned in x-amz-meta
  9509. // headers. This can happen if you create metadata using an API like SOAP that
  9510. // supports more flexible metadata than the REST API. For example, using SOAP,
  9511. // you can create metadata whose values are not legal HTTP headers.
  9512. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  9513. // The count of parts this object has.
  9514. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  9515. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  9516. // If present, indicates that the requester was successfully charged for the
  9517. // request.
  9518. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9519. // Provides information about object restoration operation and expiration time
  9520. // of the restored object copy.
  9521. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  9522. // If server-side encryption with a customer-provided encryption key was requested,
  9523. // the response will include this header confirming the encryption algorithm
  9524. // used.
  9525. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  9526. // If server-side encryption with a customer-provided encryption key was requested,
  9527. // the response will include this header to provide round trip message integrity
  9528. // verification of the customer-provided encryption key.
  9529. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  9530. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  9531. // encryption key that was used for the object.
  9532. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  9533. // The Server-side encryption algorithm used when storing this object in S3
  9534. // (e.g., AES256, aws:kms).
  9535. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  9536. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  9537. // The number of tags, if any, on the object.
  9538. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  9539. // Version of the object.
  9540. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9541. // If the bucket is configured as a website, redirects requests for this object
  9542. // to another object in the same bucket or to an external URL. Amazon S3 stores
  9543. // the value of this header in the object metadata.
  9544. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  9545. }
  9546. // String returns the string representation
  9547. func (s GetObjectOutput) String() string {
  9548. return awsutil.Prettify(s)
  9549. }
  9550. // GoString returns the string representation
  9551. func (s GetObjectOutput) GoString() string {
  9552. return s.String()
  9553. }
  9554. // SetAcceptRanges sets the AcceptRanges field's value.
  9555. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  9556. s.AcceptRanges = &v
  9557. return s
  9558. }
  9559. // SetBody sets the Body field's value.
  9560. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  9561. s.Body = v
  9562. return s
  9563. }
  9564. // SetCacheControl sets the CacheControl field's value.
  9565. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  9566. s.CacheControl = &v
  9567. return s
  9568. }
  9569. // SetContentDisposition sets the ContentDisposition field's value.
  9570. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  9571. s.ContentDisposition = &v
  9572. return s
  9573. }
  9574. // SetContentEncoding sets the ContentEncoding field's value.
  9575. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  9576. s.ContentEncoding = &v
  9577. return s
  9578. }
  9579. // SetContentLanguage sets the ContentLanguage field's value.
  9580. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  9581. s.ContentLanguage = &v
  9582. return s
  9583. }
  9584. // SetContentLength sets the ContentLength field's value.
  9585. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  9586. s.ContentLength = &v
  9587. return s
  9588. }
  9589. // SetContentRange sets the ContentRange field's value.
  9590. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  9591. s.ContentRange = &v
  9592. return s
  9593. }
  9594. // SetContentType sets the ContentType field's value.
  9595. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  9596. s.ContentType = &v
  9597. return s
  9598. }
  9599. // SetDeleteMarker sets the DeleteMarker field's value.
  9600. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  9601. s.DeleteMarker = &v
  9602. return s
  9603. }
  9604. // SetETag sets the ETag field's value.
  9605. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  9606. s.ETag = &v
  9607. return s
  9608. }
  9609. // SetExpiration sets the Expiration field's value.
  9610. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  9611. s.Expiration = &v
  9612. return s
  9613. }
  9614. // SetExpires sets the Expires field's value.
  9615. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  9616. s.Expires = &v
  9617. return s
  9618. }
  9619. // SetLastModified sets the LastModified field's value.
  9620. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  9621. s.LastModified = &v
  9622. return s
  9623. }
  9624. // SetMetadata sets the Metadata field's value.
  9625. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  9626. s.Metadata = v
  9627. return s
  9628. }
  9629. // SetMissingMeta sets the MissingMeta field's value.
  9630. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  9631. s.MissingMeta = &v
  9632. return s
  9633. }
  9634. // SetPartsCount sets the PartsCount field's value.
  9635. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  9636. s.PartsCount = &v
  9637. return s
  9638. }
  9639. // SetReplicationStatus sets the ReplicationStatus field's value.
  9640. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  9641. s.ReplicationStatus = &v
  9642. return s
  9643. }
  9644. // SetRequestCharged sets the RequestCharged field's value.
  9645. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  9646. s.RequestCharged = &v
  9647. return s
  9648. }
  9649. // SetRestore sets the Restore field's value.
  9650. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  9651. s.Restore = &v
  9652. return s
  9653. }
  9654. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  9655. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  9656. s.SSECustomerAlgorithm = &v
  9657. return s
  9658. }
  9659. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  9660. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  9661. s.SSECustomerKeyMD5 = &v
  9662. return s
  9663. }
  9664. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  9665. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  9666. s.SSEKMSKeyId = &v
  9667. return s
  9668. }
  9669. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  9670. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  9671. s.ServerSideEncryption = &v
  9672. return s
  9673. }
  9674. // SetStorageClass sets the StorageClass field's value.
  9675. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  9676. s.StorageClass = &v
  9677. return s
  9678. }
  9679. // SetTagCount sets the TagCount field's value.
  9680. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  9681. s.TagCount = &v
  9682. return s
  9683. }
  9684. // SetVersionId sets the VersionId field's value.
  9685. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  9686. s.VersionId = &v
  9687. return s
  9688. }
  9689. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  9690. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  9691. s.WebsiteRedirectLocation = &v
  9692. return s
  9693. }
  9694. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest
  9695. type GetObjectTaggingInput struct {
  9696. _ struct{} `type:"structure"`
  9697. // Bucket is a required field
  9698. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9699. // Key is a required field
  9700. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9701. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9702. }
  9703. // String returns the string representation
  9704. func (s GetObjectTaggingInput) String() string {
  9705. return awsutil.Prettify(s)
  9706. }
  9707. // GoString returns the string representation
  9708. func (s GetObjectTaggingInput) GoString() string {
  9709. return s.String()
  9710. }
  9711. // Validate inspects the fields of the type to determine if they are valid.
  9712. func (s *GetObjectTaggingInput) Validate() error {
  9713. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  9714. if s.Bucket == nil {
  9715. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9716. }
  9717. if s.Key == nil {
  9718. invalidParams.Add(request.NewErrParamRequired("Key"))
  9719. }
  9720. if s.Key != nil && len(*s.Key) < 1 {
  9721. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9722. }
  9723. if invalidParams.Len() > 0 {
  9724. return invalidParams
  9725. }
  9726. return nil
  9727. }
  9728. // SetBucket sets the Bucket field's value.
  9729. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  9730. s.Bucket = &v
  9731. return s
  9732. }
  9733. // SetKey sets the Key field's value.
  9734. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  9735. s.Key = &v
  9736. return s
  9737. }
  9738. // SetVersionId sets the VersionId field's value.
  9739. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  9740. s.VersionId = &v
  9741. return s
  9742. }
  9743. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingOutput
  9744. type GetObjectTaggingOutput struct {
  9745. _ struct{} `type:"structure"`
  9746. // TagSet is a required field
  9747. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  9748. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9749. }
  9750. // String returns the string representation
  9751. func (s GetObjectTaggingOutput) String() string {
  9752. return awsutil.Prettify(s)
  9753. }
  9754. // GoString returns the string representation
  9755. func (s GetObjectTaggingOutput) GoString() string {
  9756. return s.String()
  9757. }
  9758. // SetTagSet sets the TagSet field's value.
  9759. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  9760. s.TagSet = v
  9761. return s
  9762. }
  9763. // SetVersionId sets the VersionId field's value.
  9764. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  9765. s.VersionId = &v
  9766. return s
  9767. }
  9768. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentRequest
  9769. type GetObjectTorrentInput struct {
  9770. _ struct{} `type:"structure"`
  9771. // Bucket is a required field
  9772. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9773. // Key is a required field
  9774. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9775. // Confirms that the requester knows that she or he will be charged for the
  9776. // request. Bucket owners need not specify this parameter in their requests.
  9777. // Documentation on downloading objects from requester pays buckets can be found
  9778. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9779. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9780. }
  9781. // String returns the string representation
  9782. func (s GetObjectTorrentInput) String() string {
  9783. return awsutil.Prettify(s)
  9784. }
  9785. // GoString returns the string representation
  9786. func (s GetObjectTorrentInput) GoString() string {
  9787. return s.String()
  9788. }
  9789. // Validate inspects the fields of the type to determine if they are valid.
  9790. func (s *GetObjectTorrentInput) Validate() error {
  9791. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  9792. if s.Bucket == nil {
  9793. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9794. }
  9795. if s.Key == nil {
  9796. invalidParams.Add(request.NewErrParamRequired("Key"))
  9797. }
  9798. if s.Key != nil && len(*s.Key) < 1 {
  9799. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9800. }
  9801. if invalidParams.Len() > 0 {
  9802. return invalidParams
  9803. }
  9804. return nil
  9805. }
  9806. // SetBucket sets the Bucket field's value.
  9807. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  9808. s.Bucket = &v
  9809. return s
  9810. }
  9811. // SetKey sets the Key field's value.
  9812. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  9813. s.Key = &v
  9814. return s
  9815. }
  9816. // SetRequestPayer sets the RequestPayer field's value.
  9817. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  9818. s.RequestPayer = &v
  9819. return s
  9820. }
  9821. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentOutput
  9822. type GetObjectTorrentOutput struct {
  9823. _ struct{} `type:"structure" payload:"Body"`
  9824. Body io.ReadCloser `type:"blob"`
  9825. // If present, indicates that the requester was successfully charged for the
  9826. // request.
  9827. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9828. }
  9829. // String returns the string representation
  9830. func (s GetObjectTorrentOutput) String() string {
  9831. return awsutil.Prettify(s)
  9832. }
  9833. // GoString returns the string representation
  9834. func (s GetObjectTorrentOutput) GoString() string {
  9835. return s.String()
  9836. }
  9837. // SetBody sets the Body field's value.
  9838. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  9839. s.Body = v
  9840. return s
  9841. }
  9842. // SetRequestCharged sets the RequestCharged field's value.
  9843. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  9844. s.RequestCharged = &v
  9845. return s
  9846. }
  9847. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GlacierJobParameters
  9848. type GlacierJobParameters struct {
  9849. _ struct{} `type:"structure"`
  9850. // Glacier retrieval tier at which the restore will be processed.
  9851. //
  9852. // Tier is a required field
  9853. Tier *string `type:"string" required:"true" enum:"Tier"`
  9854. }
  9855. // String returns the string representation
  9856. func (s GlacierJobParameters) String() string {
  9857. return awsutil.Prettify(s)
  9858. }
  9859. // GoString returns the string representation
  9860. func (s GlacierJobParameters) GoString() string {
  9861. return s.String()
  9862. }
  9863. // Validate inspects the fields of the type to determine if they are valid.
  9864. func (s *GlacierJobParameters) Validate() error {
  9865. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  9866. if s.Tier == nil {
  9867. invalidParams.Add(request.NewErrParamRequired("Tier"))
  9868. }
  9869. if invalidParams.Len() > 0 {
  9870. return invalidParams
  9871. }
  9872. return nil
  9873. }
  9874. // SetTier sets the Tier field's value.
  9875. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  9876. s.Tier = &v
  9877. return s
  9878. }
  9879. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grant
  9880. type Grant struct {
  9881. _ struct{} `type:"structure"`
  9882. Grantee *Grantee `type:"structure"`
  9883. // Specifies the permission given to the grantee.
  9884. Permission *string `type:"string" enum:"Permission"`
  9885. }
  9886. // String returns the string representation
  9887. func (s Grant) String() string {
  9888. return awsutil.Prettify(s)
  9889. }
  9890. // GoString returns the string representation
  9891. func (s Grant) GoString() string {
  9892. return s.String()
  9893. }
  9894. // Validate inspects the fields of the type to determine if they are valid.
  9895. func (s *Grant) Validate() error {
  9896. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  9897. if s.Grantee != nil {
  9898. if err := s.Grantee.Validate(); err != nil {
  9899. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  9900. }
  9901. }
  9902. if invalidParams.Len() > 0 {
  9903. return invalidParams
  9904. }
  9905. return nil
  9906. }
  9907. // SetGrantee sets the Grantee field's value.
  9908. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  9909. s.Grantee = v
  9910. return s
  9911. }
  9912. // SetPermission sets the Permission field's value.
  9913. func (s *Grant) SetPermission(v string) *Grant {
  9914. s.Permission = &v
  9915. return s
  9916. }
  9917. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grantee
  9918. type Grantee struct {
  9919. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  9920. // Screen name of the grantee.
  9921. DisplayName *string `type:"string"`
  9922. // Email address of the grantee.
  9923. EmailAddress *string `type:"string"`
  9924. // The canonical user ID of the grantee.
  9925. ID *string `type:"string"`
  9926. // Type of grantee
  9927. //
  9928. // Type is a required field
  9929. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  9930. // URI of the grantee group.
  9931. URI *string `type:"string"`
  9932. }
  9933. // String returns the string representation
  9934. func (s Grantee) String() string {
  9935. return awsutil.Prettify(s)
  9936. }
  9937. // GoString returns the string representation
  9938. func (s Grantee) GoString() string {
  9939. return s.String()
  9940. }
  9941. // Validate inspects the fields of the type to determine if they are valid.
  9942. func (s *Grantee) Validate() error {
  9943. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  9944. if s.Type == nil {
  9945. invalidParams.Add(request.NewErrParamRequired("Type"))
  9946. }
  9947. if invalidParams.Len() > 0 {
  9948. return invalidParams
  9949. }
  9950. return nil
  9951. }
  9952. // SetDisplayName sets the DisplayName field's value.
  9953. func (s *Grantee) SetDisplayName(v string) *Grantee {
  9954. s.DisplayName = &v
  9955. return s
  9956. }
  9957. // SetEmailAddress sets the EmailAddress field's value.
  9958. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  9959. s.EmailAddress = &v
  9960. return s
  9961. }
  9962. // SetID sets the ID field's value.
  9963. func (s *Grantee) SetID(v string) *Grantee {
  9964. s.ID = &v
  9965. return s
  9966. }
  9967. // SetType sets the Type field's value.
  9968. func (s *Grantee) SetType(v string) *Grantee {
  9969. s.Type = &v
  9970. return s
  9971. }
  9972. // SetURI sets the URI field's value.
  9973. func (s *Grantee) SetURI(v string) *Grantee {
  9974. s.URI = &v
  9975. return s
  9976. }
  9977. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketRequest
  9978. type HeadBucketInput struct {
  9979. _ struct{} `type:"structure"`
  9980. // Bucket is a required field
  9981. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9982. }
  9983. // String returns the string representation
  9984. func (s HeadBucketInput) String() string {
  9985. return awsutil.Prettify(s)
  9986. }
  9987. // GoString returns the string representation
  9988. func (s HeadBucketInput) GoString() string {
  9989. return s.String()
  9990. }
  9991. // Validate inspects the fields of the type to determine if they are valid.
  9992. func (s *HeadBucketInput) Validate() error {
  9993. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  9994. if s.Bucket == nil {
  9995. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9996. }
  9997. if invalidParams.Len() > 0 {
  9998. return invalidParams
  9999. }
  10000. return nil
  10001. }
  10002. // SetBucket sets the Bucket field's value.
  10003. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  10004. s.Bucket = &v
  10005. return s
  10006. }
  10007. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput
  10008. type HeadBucketOutput struct {
  10009. _ struct{} `type:"structure"`
  10010. }
  10011. // String returns the string representation
  10012. func (s HeadBucketOutput) String() string {
  10013. return awsutil.Prettify(s)
  10014. }
  10015. // GoString returns the string representation
  10016. func (s HeadBucketOutput) GoString() string {
  10017. return s.String()
  10018. }
  10019. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectRequest
  10020. type HeadObjectInput struct {
  10021. _ struct{} `type:"structure"`
  10022. // Bucket is a required field
  10023. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10024. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10025. // otherwise return a 412 (precondition failed).
  10026. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10027. // Return the object only if it has been modified since the specified time,
  10028. // otherwise return a 304 (not modified).
  10029. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10030. // Return the object only if its entity tag (ETag) is different from the one
  10031. // specified, otherwise return a 304 (not modified).
  10032. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10033. // Return the object only if it has not been modified since the specified time,
  10034. // otherwise return a 412 (precondition failed).
  10035. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10036. // Key is a required field
  10037. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10038. // Part number of the object being read. This is a positive integer between
  10039. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  10040. // Useful querying about the size of the part and the number of parts in this
  10041. // object.
  10042. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10043. // Downloads the specified range bytes of an object. For more information about
  10044. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10045. Range *string `location:"header" locationName:"Range" type:"string"`
  10046. // Confirms that the requester knows that she or he will be charged for the
  10047. // request. Bucket owners need not specify this parameter in their requests.
  10048. // Documentation on downloading objects from requester pays buckets can be found
  10049. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10050. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10051. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10052. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10053. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10054. // data. This value is used to store the object and then it is discarded; Amazon
  10055. // does not store the encryption key. The key must be appropriate for use with
  10056. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10057. // header.
  10058. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10059. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10060. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10061. // key was transmitted without error.
  10062. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10063. // VersionId used to reference a specific version of the object.
  10064. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10065. }
  10066. // String returns the string representation
  10067. func (s HeadObjectInput) String() string {
  10068. return awsutil.Prettify(s)
  10069. }
  10070. // GoString returns the string representation
  10071. func (s HeadObjectInput) GoString() string {
  10072. return s.String()
  10073. }
  10074. // Validate inspects the fields of the type to determine if they are valid.
  10075. func (s *HeadObjectInput) Validate() error {
  10076. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  10077. if s.Bucket == nil {
  10078. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10079. }
  10080. if s.Key == nil {
  10081. invalidParams.Add(request.NewErrParamRequired("Key"))
  10082. }
  10083. if s.Key != nil && len(*s.Key) < 1 {
  10084. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10085. }
  10086. if invalidParams.Len() > 0 {
  10087. return invalidParams
  10088. }
  10089. return nil
  10090. }
  10091. // SetBucket sets the Bucket field's value.
  10092. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  10093. s.Bucket = &v
  10094. return s
  10095. }
  10096. // SetIfMatch sets the IfMatch field's value.
  10097. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  10098. s.IfMatch = &v
  10099. return s
  10100. }
  10101. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10102. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  10103. s.IfModifiedSince = &v
  10104. return s
  10105. }
  10106. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10107. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  10108. s.IfNoneMatch = &v
  10109. return s
  10110. }
  10111. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10112. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  10113. s.IfUnmodifiedSince = &v
  10114. return s
  10115. }
  10116. // SetKey sets the Key field's value.
  10117. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  10118. s.Key = &v
  10119. return s
  10120. }
  10121. // SetPartNumber sets the PartNumber field's value.
  10122. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  10123. s.PartNumber = &v
  10124. return s
  10125. }
  10126. // SetRange sets the Range field's value.
  10127. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  10128. s.Range = &v
  10129. return s
  10130. }
  10131. // SetRequestPayer sets the RequestPayer field's value.
  10132. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  10133. s.RequestPayer = &v
  10134. return s
  10135. }
  10136. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10137. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  10138. s.SSECustomerAlgorithm = &v
  10139. return s
  10140. }
  10141. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10142. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  10143. s.SSECustomerKey = &v
  10144. return s
  10145. }
  10146. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10147. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  10148. s.SSECustomerKeyMD5 = &v
  10149. return s
  10150. }
  10151. // SetVersionId sets the VersionId field's value.
  10152. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  10153. s.VersionId = &v
  10154. return s
  10155. }
  10156. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectOutput
  10157. type HeadObjectOutput struct {
  10158. _ struct{} `type:"structure"`
  10159. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10160. // Specifies caching behavior along the request/reply chain.
  10161. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10162. // Specifies presentational information for the object.
  10163. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10164. // Specifies what content encodings have been applied to the object and thus
  10165. // what decoding mechanisms must be applied to obtain the media-type referenced
  10166. // by the Content-Type header field.
  10167. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10168. // The language the content is in.
  10169. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10170. // Size of the body in bytes.
  10171. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10172. // A standard MIME type describing the format of the object data.
  10173. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10174. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10175. // Marker. If false, this response header does not appear in the response.
  10176. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10177. // An ETag is an opaque identifier assigned by a web server to a specific version
  10178. // of a resource found at a URL
  10179. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10180. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10181. // includes this header. It includes the expiry-date and rule-id key value pairs
  10182. // providing object expiration information. The value of the rule-id is URL
  10183. // encoded.
  10184. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10185. // The date and time at which the object is no longer cacheable.
  10186. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10187. // Last modified date of the object
  10188. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  10189. // A map of metadata to store with the object in S3.
  10190. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10191. // This is set to the number of metadata entries not returned in x-amz-meta
  10192. // headers. This can happen if you create metadata using an API like SOAP that
  10193. // supports more flexible metadata than the REST API. For example, using SOAP,
  10194. // you can create metadata whose values are not legal HTTP headers.
  10195. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10196. // The count of parts this object has.
  10197. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10198. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10199. // If present, indicates that the requester was successfully charged for the
  10200. // request.
  10201. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10202. // Provides information about object restoration operation and expiration time
  10203. // of the restored object copy.
  10204. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  10205. // If server-side encryption with a customer-provided encryption key was requested,
  10206. // the response will include this header confirming the encryption algorithm
  10207. // used.
  10208. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10209. // If server-side encryption with a customer-provided encryption key was requested,
  10210. // the response will include this header to provide round trip message integrity
  10211. // verification of the customer-provided encryption key.
  10212. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10213. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10214. // encryption key that was used for the object.
  10215. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10216. // The Server-side encryption algorithm used when storing this object in S3
  10217. // (e.g., AES256, aws:kms).
  10218. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10219. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10220. // Version of the object.
  10221. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10222. // If the bucket is configured as a website, redirects requests for this object
  10223. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10224. // the value of this header in the object metadata.
  10225. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10226. }
  10227. // String returns the string representation
  10228. func (s HeadObjectOutput) String() string {
  10229. return awsutil.Prettify(s)
  10230. }
  10231. // GoString returns the string representation
  10232. func (s HeadObjectOutput) GoString() string {
  10233. return s.String()
  10234. }
  10235. // SetAcceptRanges sets the AcceptRanges field's value.
  10236. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  10237. s.AcceptRanges = &v
  10238. return s
  10239. }
  10240. // SetCacheControl sets the CacheControl field's value.
  10241. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  10242. s.CacheControl = &v
  10243. return s
  10244. }
  10245. // SetContentDisposition sets the ContentDisposition field's value.
  10246. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  10247. s.ContentDisposition = &v
  10248. return s
  10249. }
  10250. // SetContentEncoding sets the ContentEncoding field's value.
  10251. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  10252. s.ContentEncoding = &v
  10253. return s
  10254. }
  10255. // SetContentLanguage sets the ContentLanguage field's value.
  10256. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  10257. s.ContentLanguage = &v
  10258. return s
  10259. }
  10260. // SetContentLength sets the ContentLength field's value.
  10261. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  10262. s.ContentLength = &v
  10263. return s
  10264. }
  10265. // SetContentType sets the ContentType field's value.
  10266. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  10267. s.ContentType = &v
  10268. return s
  10269. }
  10270. // SetDeleteMarker sets the DeleteMarker field's value.
  10271. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  10272. s.DeleteMarker = &v
  10273. return s
  10274. }
  10275. // SetETag sets the ETag field's value.
  10276. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  10277. s.ETag = &v
  10278. return s
  10279. }
  10280. // SetExpiration sets the Expiration field's value.
  10281. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  10282. s.Expiration = &v
  10283. return s
  10284. }
  10285. // SetExpires sets the Expires field's value.
  10286. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  10287. s.Expires = &v
  10288. return s
  10289. }
  10290. // SetLastModified sets the LastModified field's value.
  10291. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  10292. s.LastModified = &v
  10293. return s
  10294. }
  10295. // SetMetadata sets the Metadata field's value.
  10296. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  10297. s.Metadata = v
  10298. return s
  10299. }
  10300. // SetMissingMeta sets the MissingMeta field's value.
  10301. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  10302. s.MissingMeta = &v
  10303. return s
  10304. }
  10305. // SetPartsCount sets the PartsCount field's value.
  10306. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  10307. s.PartsCount = &v
  10308. return s
  10309. }
  10310. // SetReplicationStatus sets the ReplicationStatus field's value.
  10311. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  10312. s.ReplicationStatus = &v
  10313. return s
  10314. }
  10315. // SetRequestCharged sets the RequestCharged field's value.
  10316. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  10317. s.RequestCharged = &v
  10318. return s
  10319. }
  10320. // SetRestore sets the Restore field's value.
  10321. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  10322. s.Restore = &v
  10323. return s
  10324. }
  10325. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10326. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  10327. s.SSECustomerAlgorithm = &v
  10328. return s
  10329. }
  10330. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10331. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  10332. s.SSECustomerKeyMD5 = &v
  10333. return s
  10334. }
  10335. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10336. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  10337. s.SSEKMSKeyId = &v
  10338. return s
  10339. }
  10340. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10341. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  10342. s.ServerSideEncryption = &v
  10343. return s
  10344. }
  10345. // SetStorageClass sets the StorageClass field's value.
  10346. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  10347. s.StorageClass = &v
  10348. return s
  10349. }
  10350. // SetVersionId sets the VersionId field's value.
  10351. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  10352. s.VersionId = &v
  10353. return s
  10354. }
  10355. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  10356. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  10357. s.WebsiteRedirectLocation = &v
  10358. return s
  10359. }
  10360. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument
  10361. type IndexDocument struct {
  10362. _ struct{} `type:"structure"`
  10363. // A suffix that is appended to a request that is for a directory on the website
  10364. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  10365. // the data that is returned will be for the object with the key name images/index.html)
  10366. // The suffix must not be empty and must not include a slash character.
  10367. //
  10368. // Suffix is a required field
  10369. Suffix *string `type:"string" required:"true"`
  10370. }
  10371. // String returns the string representation
  10372. func (s IndexDocument) String() string {
  10373. return awsutil.Prettify(s)
  10374. }
  10375. // GoString returns the string representation
  10376. func (s IndexDocument) GoString() string {
  10377. return s.String()
  10378. }
  10379. // Validate inspects the fields of the type to determine if they are valid.
  10380. func (s *IndexDocument) Validate() error {
  10381. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  10382. if s.Suffix == nil {
  10383. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  10384. }
  10385. if invalidParams.Len() > 0 {
  10386. return invalidParams
  10387. }
  10388. return nil
  10389. }
  10390. // SetSuffix sets the Suffix field's value.
  10391. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  10392. s.Suffix = &v
  10393. return s
  10394. }
  10395. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Initiator
  10396. type Initiator struct {
  10397. _ struct{} `type:"structure"`
  10398. // Name of the Principal.
  10399. DisplayName *string `type:"string"`
  10400. // If the principal is an AWS account, it provides the Canonical User ID. If
  10401. // the principal is an IAM User, it provides a user ARN value.
  10402. ID *string `type:"string"`
  10403. }
  10404. // String returns the string representation
  10405. func (s Initiator) String() string {
  10406. return awsutil.Prettify(s)
  10407. }
  10408. // GoString returns the string representation
  10409. func (s Initiator) GoString() string {
  10410. return s.String()
  10411. }
  10412. // SetDisplayName sets the DisplayName field's value.
  10413. func (s *Initiator) SetDisplayName(v string) *Initiator {
  10414. s.DisplayName = &v
  10415. return s
  10416. }
  10417. // SetID sets the ID field's value.
  10418. func (s *Initiator) SetID(v string) *Initiator {
  10419. s.ID = &v
  10420. return s
  10421. }
  10422. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryConfiguration
  10423. type InventoryConfiguration struct {
  10424. _ struct{} `type:"structure"`
  10425. // Contains information about where to publish the inventory results.
  10426. //
  10427. // Destination is a required field
  10428. Destination *InventoryDestination `type:"structure" required:"true"`
  10429. // Specifies an inventory filter. The inventory only includes objects that meet
  10430. // the filter's criteria.
  10431. Filter *InventoryFilter `type:"structure"`
  10432. // The ID used to identify the inventory configuration.
  10433. //
  10434. // Id is a required field
  10435. Id *string `type:"string" required:"true"`
  10436. // Specifies which object version(s) to included in the inventory results.
  10437. //
  10438. // IncludedObjectVersions is a required field
  10439. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  10440. // Specifies whether the inventory is enabled or disabled.
  10441. //
  10442. // IsEnabled is a required field
  10443. IsEnabled *bool `type:"boolean" required:"true"`
  10444. // Contains the optional fields that are included in the inventory results.
  10445. OptionalFields []*string `locationNameList:"Field" type:"list"`
  10446. // Specifies the schedule for generating inventory results.
  10447. //
  10448. // Schedule is a required field
  10449. Schedule *InventorySchedule `type:"structure" required:"true"`
  10450. }
  10451. // String returns the string representation
  10452. func (s InventoryConfiguration) String() string {
  10453. return awsutil.Prettify(s)
  10454. }
  10455. // GoString returns the string representation
  10456. func (s InventoryConfiguration) GoString() string {
  10457. return s.String()
  10458. }
  10459. // Validate inspects the fields of the type to determine if they are valid.
  10460. func (s *InventoryConfiguration) Validate() error {
  10461. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  10462. if s.Destination == nil {
  10463. invalidParams.Add(request.NewErrParamRequired("Destination"))
  10464. }
  10465. if s.Id == nil {
  10466. invalidParams.Add(request.NewErrParamRequired("Id"))
  10467. }
  10468. if s.IncludedObjectVersions == nil {
  10469. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  10470. }
  10471. if s.IsEnabled == nil {
  10472. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  10473. }
  10474. if s.Schedule == nil {
  10475. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  10476. }
  10477. if s.Destination != nil {
  10478. if err := s.Destination.Validate(); err != nil {
  10479. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  10480. }
  10481. }
  10482. if s.Filter != nil {
  10483. if err := s.Filter.Validate(); err != nil {
  10484. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  10485. }
  10486. }
  10487. if s.Schedule != nil {
  10488. if err := s.Schedule.Validate(); err != nil {
  10489. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  10490. }
  10491. }
  10492. if invalidParams.Len() > 0 {
  10493. return invalidParams
  10494. }
  10495. return nil
  10496. }
  10497. // SetDestination sets the Destination field's value.
  10498. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  10499. s.Destination = v
  10500. return s
  10501. }
  10502. // SetFilter sets the Filter field's value.
  10503. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  10504. s.Filter = v
  10505. return s
  10506. }
  10507. // SetId sets the Id field's value.
  10508. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  10509. s.Id = &v
  10510. return s
  10511. }
  10512. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  10513. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  10514. s.IncludedObjectVersions = &v
  10515. return s
  10516. }
  10517. // SetIsEnabled sets the IsEnabled field's value.
  10518. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  10519. s.IsEnabled = &v
  10520. return s
  10521. }
  10522. // SetOptionalFields sets the OptionalFields field's value.
  10523. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  10524. s.OptionalFields = v
  10525. return s
  10526. }
  10527. // SetSchedule sets the Schedule field's value.
  10528. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  10529. s.Schedule = v
  10530. return s
  10531. }
  10532. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryDestination
  10533. type InventoryDestination struct {
  10534. _ struct{} `type:"structure"`
  10535. // Contains the bucket name, file format, bucket owner (optional), and prefix
  10536. // (optional) where inventory results are published.
  10537. //
  10538. // S3BucketDestination is a required field
  10539. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  10540. }
  10541. // String returns the string representation
  10542. func (s InventoryDestination) String() string {
  10543. return awsutil.Prettify(s)
  10544. }
  10545. // GoString returns the string representation
  10546. func (s InventoryDestination) GoString() string {
  10547. return s.String()
  10548. }
  10549. // Validate inspects the fields of the type to determine if they are valid.
  10550. func (s *InventoryDestination) Validate() error {
  10551. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  10552. if s.S3BucketDestination == nil {
  10553. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  10554. }
  10555. if s.S3BucketDestination != nil {
  10556. if err := s.S3BucketDestination.Validate(); err != nil {
  10557. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  10558. }
  10559. }
  10560. if invalidParams.Len() > 0 {
  10561. return invalidParams
  10562. }
  10563. return nil
  10564. }
  10565. // SetS3BucketDestination sets the S3BucketDestination field's value.
  10566. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  10567. s.S3BucketDestination = v
  10568. return s
  10569. }
  10570. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter
  10571. type InventoryFilter struct {
  10572. _ struct{} `type:"structure"`
  10573. // The prefix that an object must have to be included in the inventory results.
  10574. //
  10575. // Prefix is a required field
  10576. Prefix *string `type:"string" required:"true"`
  10577. }
  10578. // String returns the string representation
  10579. func (s InventoryFilter) String() string {
  10580. return awsutil.Prettify(s)
  10581. }
  10582. // GoString returns the string representation
  10583. func (s InventoryFilter) GoString() string {
  10584. return s.String()
  10585. }
  10586. // Validate inspects the fields of the type to determine if they are valid.
  10587. func (s *InventoryFilter) Validate() error {
  10588. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  10589. if s.Prefix == nil {
  10590. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  10591. }
  10592. if invalidParams.Len() > 0 {
  10593. return invalidParams
  10594. }
  10595. return nil
  10596. }
  10597. // SetPrefix sets the Prefix field's value.
  10598. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  10599. s.Prefix = &v
  10600. return s
  10601. }
  10602. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryS3BucketDestination
  10603. type InventoryS3BucketDestination struct {
  10604. _ struct{} `type:"structure"`
  10605. // The ID of the account that owns the destination bucket.
  10606. AccountId *string `type:"string"`
  10607. // The Amazon resource name (ARN) of the bucket where inventory results will
  10608. // be published.
  10609. //
  10610. // Bucket is a required field
  10611. Bucket *string `type:"string" required:"true"`
  10612. // Specifies the output format of the inventory results.
  10613. //
  10614. // Format is a required field
  10615. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  10616. // The prefix that is prepended to all inventory results.
  10617. Prefix *string `type:"string"`
  10618. }
  10619. // String returns the string representation
  10620. func (s InventoryS3BucketDestination) String() string {
  10621. return awsutil.Prettify(s)
  10622. }
  10623. // GoString returns the string representation
  10624. func (s InventoryS3BucketDestination) GoString() string {
  10625. return s.String()
  10626. }
  10627. // Validate inspects the fields of the type to determine if they are valid.
  10628. func (s *InventoryS3BucketDestination) Validate() error {
  10629. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  10630. if s.Bucket == nil {
  10631. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10632. }
  10633. if s.Format == nil {
  10634. invalidParams.Add(request.NewErrParamRequired("Format"))
  10635. }
  10636. if invalidParams.Len() > 0 {
  10637. return invalidParams
  10638. }
  10639. return nil
  10640. }
  10641. // SetAccountId sets the AccountId field's value.
  10642. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  10643. s.AccountId = &v
  10644. return s
  10645. }
  10646. // SetBucket sets the Bucket field's value.
  10647. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  10648. s.Bucket = &v
  10649. return s
  10650. }
  10651. // SetFormat sets the Format field's value.
  10652. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  10653. s.Format = &v
  10654. return s
  10655. }
  10656. // SetPrefix sets the Prefix field's value.
  10657. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  10658. s.Prefix = &v
  10659. return s
  10660. }
  10661. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventorySchedule
  10662. type InventorySchedule struct {
  10663. _ struct{} `type:"structure"`
  10664. // Specifies how frequently inventory results are produced.
  10665. //
  10666. // Frequency is a required field
  10667. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  10668. }
  10669. // String returns the string representation
  10670. func (s InventorySchedule) String() string {
  10671. return awsutil.Prettify(s)
  10672. }
  10673. // GoString returns the string representation
  10674. func (s InventorySchedule) GoString() string {
  10675. return s.String()
  10676. }
  10677. // Validate inspects the fields of the type to determine if they are valid.
  10678. func (s *InventorySchedule) Validate() error {
  10679. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  10680. if s.Frequency == nil {
  10681. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  10682. }
  10683. if invalidParams.Len() > 0 {
  10684. return invalidParams
  10685. }
  10686. return nil
  10687. }
  10688. // SetFrequency sets the Frequency field's value.
  10689. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  10690. s.Frequency = &v
  10691. return s
  10692. }
  10693. // Container for object key name prefix and suffix filtering rules.
  10694. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3KeyFilter
  10695. type KeyFilter struct {
  10696. _ struct{} `type:"structure"`
  10697. // A list of containers for key value pair that defines the criteria for the
  10698. // filter rule.
  10699. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  10700. }
  10701. // String returns the string representation
  10702. func (s KeyFilter) String() string {
  10703. return awsutil.Prettify(s)
  10704. }
  10705. // GoString returns the string representation
  10706. func (s KeyFilter) GoString() string {
  10707. return s.String()
  10708. }
  10709. // SetFilterRules sets the FilterRules field's value.
  10710. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  10711. s.FilterRules = v
  10712. return s
  10713. }
  10714. // Container for specifying the AWS Lambda notification configuration.
  10715. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LambdaFunctionConfiguration
  10716. type LambdaFunctionConfiguration struct {
  10717. _ struct{} `type:"structure"`
  10718. // Events is a required field
  10719. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  10720. // Container for object key name filtering rules. For information about key
  10721. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  10722. Filter *NotificationConfigurationFilter `type:"structure"`
  10723. // Optional unique identifier for configurations in a notification configuration.
  10724. // If you don't provide one, Amazon S3 will assign an ID.
  10725. Id *string `type:"string"`
  10726. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  10727. // of the specified type.
  10728. //
  10729. // LambdaFunctionArn is a required field
  10730. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  10731. }
  10732. // String returns the string representation
  10733. func (s LambdaFunctionConfiguration) String() string {
  10734. return awsutil.Prettify(s)
  10735. }
  10736. // GoString returns the string representation
  10737. func (s LambdaFunctionConfiguration) GoString() string {
  10738. return s.String()
  10739. }
  10740. // Validate inspects the fields of the type to determine if they are valid.
  10741. func (s *LambdaFunctionConfiguration) Validate() error {
  10742. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  10743. if s.Events == nil {
  10744. invalidParams.Add(request.NewErrParamRequired("Events"))
  10745. }
  10746. if s.LambdaFunctionArn == nil {
  10747. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  10748. }
  10749. if invalidParams.Len() > 0 {
  10750. return invalidParams
  10751. }
  10752. return nil
  10753. }
  10754. // SetEvents sets the Events field's value.
  10755. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  10756. s.Events = v
  10757. return s
  10758. }
  10759. // SetFilter sets the Filter field's value.
  10760. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  10761. s.Filter = v
  10762. return s
  10763. }
  10764. // SetId sets the Id field's value.
  10765. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  10766. s.Id = &v
  10767. return s
  10768. }
  10769. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  10770. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  10771. s.LambdaFunctionArn = &v
  10772. return s
  10773. }
  10774. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleConfiguration
  10775. type LifecycleConfiguration struct {
  10776. _ struct{} `type:"structure"`
  10777. // Rules is a required field
  10778. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  10779. }
  10780. // String returns the string representation
  10781. func (s LifecycleConfiguration) String() string {
  10782. return awsutil.Prettify(s)
  10783. }
  10784. // GoString returns the string representation
  10785. func (s LifecycleConfiguration) GoString() string {
  10786. return s.String()
  10787. }
  10788. // Validate inspects the fields of the type to determine if they are valid.
  10789. func (s *LifecycleConfiguration) Validate() error {
  10790. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  10791. if s.Rules == nil {
  10792. invalidParams.Add(request.NewErrParamRequired("Rules"))
  10793. }
  10794. if s.Rules != nil {
  10795. for i, v := range s.Rules {
  10796. if v == nil {
  10797. continue
  10798. }
  10799. if err := v.Validate(); err != nil {
  10800. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  10801. }
  10802. }
  10803. }
  10804. if invalidParams.Len() > 0 {
  10805. return invalidParams
  10806. }
  10807. return nil
  10808. }
  10809. // SetRules sets the Rules field's value.
  10810. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  10811. s.Rules = v
  10812. return s
  10813. }
  10814. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleExpiration
  10815. type LifecycleExpiration struct {
  10816. _ struct{} `type:"structure"`
  10817. // Indicates at what date the object is to be moved or deleted. Should be in
  10818. // GMT ISO 8601 Format.
  10819. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  10820. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  10821. // The value must be a non-zero positive integer.
  10822. Days *int64 `type:"integer"`
  10823. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  10824. // versions. If set to true, the delete marker will be expired; if set to false
  10825. // the policy takes no action. This cannot be specified with Days or Date in
  10826. // a Lifecycle Expiration Policy.
  10827. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  10828. }
  10829. // String returns the string representation
  10830. func (s LifecycleExpiration) String() string {
  10831. return awsutil.Prettify(s)
  10832. }
  10833. // GoString returns the string representation
  10834. func (s LifecycleExpiration) GoString() string {
  10835. return s.String()
  10836. }
  10837. // SetDate sets the Date field's value.
  10838. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  10839. s.Date = &v
  10840. return s
  10841. }
  10842. // SetDays sets the Days field's value.
  10843. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  10844. s.Days = &v
  10845. return s
  10846. }
  10847. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  10848. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  10849. s.ExpiredObjectDeleteMarker = &v
  10850. return s
  10851. }
  10852. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRule
  10853. type LifecycleRule struct {
  10854. _ struct{} `type:"structure"`
  10855. // Specifies the days since the initiation of an Incomplete Multipart Upload
  10856. // that Lifecycle will wait before permanently removing all parts of the upload.
  10857. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  10858. Expiration *LifecycleExpiration `type:"structure"`
  10859. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  10860. // A Filter must have exactly one of Prefix, Tag, or And specified.
  10861. Filter *LifecycleRuleFilter `type:"structure"`
  10862. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  10863. ID *string `type:"string"`
  10864. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  10865. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  10866. // configuration action on a bucket that has versioning enabled (or suspended)
  10867. // to request that Amazon S3 delete noncurrent object versions at a specific
  10868. // period in the object's lifetime.
  10869. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  10870. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  10871. // Prefix identifying one or more objects to which the rule applies. This is
  10872. // deprecated; use Filter instead.
  10873. Prefix *string `deprecated:"true" type:"string"`
  10874. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  10875. // is not currently being applied.
  10876. //
  10877. // Status is a required field
  10878. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  10879. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  10880. }
  10881. // String returns the string representation
  10882. func (s LifecycleRule) String() string {
  10883. return awsutil.Prettify(s)
  10884. }
  10885. // GoString returns the string representation
  10886. func (s LifecycleRule) GoString() string {
  10887. return s.String()
  10888. }
  10889. // Validate inspects the fields of the type to determine if they are valid.
  10890. func (s *LifecycleRule) Validate() error {
  10891. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  10892. if s.Status == nil {
  10893. invalidParams.Add(request.NewErrParamRequired("Status"))
  10894. }
  10895. if s.Filter != nil {
  10896. if err := s.Filter.Validate(); err != nil {
  10897. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  10898. }
  10899. }
  10900. if invalidParams.Len() > 0 {
  10901. return invalidParams
  10902. }
  10903. return nil
  10904. }
  10905. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  10906. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  10907. s.AbortIncompleteMultipartUpload = v
  10908. return s
  10909. }
  10910. // SetExpiration sets the Expiration field's value.
  10911. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  10912. s.Expiration = v
  10913. return s
  10914. }
  10915. // SetFilter sets the Filter field's value.
  10916. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  10917. s.Filter = v
  10918. return s
  10919. }
  10920. // SetID sets the ID field's value.
  10921. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  10922. s.ID = &v
  10923. return s
  10924. }
  10925. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  10926. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  10927. s.NoncurrentVersionExpiration = v
  10928. return s
  10929. }
  10930. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  10931. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  10932. s.NoncurrentVersionTransitions = v
  10933. return s
  10934. }
  10935. // SetPrefix sets the Prefix field's value.
  10936. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  10937. s.Prefix = &v
  10938. return s
  10939. }
  10940. // SetStatus sets the Status field's value.
  10941. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  10942. s.Status = &v
  10943. return s
  10944. }
  10945. // SetTransitions sets the Transitions field's value.
  10946. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  10947. s.Transitions = v
  10948. return s
  10949. }
  10950. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  10951. // more predicates. The Lifecycle Rule will apply to any object matching all
  10952. // of the predicates configured inside the And operator.
  10953. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleAndOperator
  10954. type LifecycleRuleAndOperator struct {
  10955. _ struct{} `type:"structure"`
  10956. Prefix *string `type:"string"`
  10957. // All of these tags must exist in the object's tag set in order for the rule
  10958. // to apply.
  10959. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  10960. }
  10961. // String returns the string representation
  10962. func (s LifecycleRuleAndOperator) String() string {
  10963. return awsutil.Prettify(s)
  10964. }
  10965. // GoString returns the string representation
  10966. func (s LifecycleRuleAndOperator) GoString() string {
  10967. return s.String()
  10968. }
  10969. // Validate inspects the fields of the type to determine if they are valid.
  10970. func (s *LifecycleRuleAndOperator) Validate() error {
  10971. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  10972. if s.Tags != nil {
  10973. for i, v := range s.Tags {
  10974. if v == nil {
  10975. continue
  10976. }
  10977. if err := v.Validate(); err != nil {
  10978. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  10979. }
  10980. }
  10981. }
  10982. if invalidParams.Len() > 0 {
  10983. return invalidParams
  10984. }
  10985. return nil
  10986. }
  10987. // SetPrefix sets the Prefix field's value.
  10988. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  10989. s.Prefix = &v
  10990. return s
  10991. }
  10992. // SetTags sets the Tags field's value.
  10993. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  10994. s.Tags = v
  10995. return s
  10996. }
  10997. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  10998. // A Filter must have exactly one of Prefix, Tag, or And specified.
  10999. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleFilter
  11000. type LifecycleRuleFilter struct {
  11001. _ struct{} `type:"structure"`
  11002. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11003. // more predicates. The Lifecycle Rule will apply to any object matching all
  11004. // of the predicates configured inside the And operator.
  11005. And *LifecycleRuleAndOperator `type:"structure"`
  11006. // Prefix identifying one or more objects to which the rule applies.
  11007. Prefix *string `type:"string"`
  11008. // This tag must exist in the object's tag set in order for the rule to apply.
  11009. Tag *Tag `type:"structure"`
  11010. }
  11011. // String returns the string representation
  11012. func (s LifecycleRuleFilter) String() string {
  11013. return awsutil.Prettify(s)
  11014. }
  11015. // GoString returns the string representation
  11016. func (s LifecycleRuleFilter) GoString() string {
  11017. return s.String()
  11018. }
  11019. // Validate inspects the fields of the type to determine if they are valid.
  11020. func (s *LifecycleRuleFilter) Validate() error {
  11021. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  11022. if s.And != nil {
  11023. if err := s.And.Validate(); err != nil {
  11024. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  11025. }
  11026. }
  11027. if s.Tag != nil {
  11028. if err := s.Tag.Validate(); err != nil {
  11029. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  11030. }
  11031. }
  11032. if invalidParams.Len() > 0 {
  11033. return invalidParams
  11034. }
  11035. return nil
  11036. }
  11037. // SetAnd sets the And field's value.
  11038. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  11039. s.And = v
  11040. return s
  11041. }
  11042. // SetPrefix sets the Prefix field's value.
  11043. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  11044. s.Prefix = &v
  11045. return s
  11046. }
  11047. // SetTag sets the Tag field's value.
  11048. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  11049. s.Tag = v
  11050. return s
  11051. }
  11052. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsRequest
  11053. type ListBucketAnalyticsConfigurationsInput struct {
  11054. _ struct{} `type:"structure"`
  11055. // The name of the bucket from which analytics configurations are retrieved.
  11056. //
  11057. // Bucket is a required field
  11058. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11059. // The ContinuationToken that represents a placeholder from where this request
  11060. // should begin.
  11061. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11062. }
  11063. // String returns the string representation
  11064. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  11065. return awsutil.Prettify(s)
  11066. }
  11067. // GoString returns the string representation
  11068. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  11069. return s.String()
  11070. }
  11071. // Validate inspects the fields of the type to determine if they are valid.
  11072. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  11073. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  11074. if s.Bucket == nil {
  11075. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11076. }
  11077. if invalidParams.Len() > 0 {
  11078. return invalidParams
  11079. }
  11080. return nil
  11081. }
  11082. // SetBucket sets the Bucket field's value.
  11083. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  11084. s.Bucket = &v
  11085. return s
  11086. }
  11087. // SetContinuationToken sets the ContinuationToken field's value.
  11088. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  11089. s.ContinuationToken = &v
  11090. return s
  11091. }
  11092. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsOutput
  11093. type ListBucketAnalyticsConfigurationsOutput struct {
  11094. _ struct{} `type:"structure"`
  11095. // The list of analytics configurations for a bucket.
  11096. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  11097. // The ContinuationToken that represents where this request began.
  11098. ContinuationToken *string `type:"string"`
  11099. // Indicates whether the returned list of analytics configurations is complete.
  11100. // A value of true indicates that the list is not complete and the NextContinuationToken
  11101. // will be provided for a subsequent request.
  11102. IsTruncated *bool `type:"boolean"`
  11103. // NextContinuationToken is sent when isTruncated is true, which indicates that
  11104. // there are more analytics configurations to list. The next request must include
  11105. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  11106. NextContinuationToken *string `type:"string"`
  11107. }
  11108. // String returns the string representation
  11109. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  11110. return awsutil.Prettify(s)
  11111. }
  11112. // GoString returns the string representation
  11113. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  11114. return s.String()
  11115. }
  11116. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  11117. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  11118. s.AnalyticsConfigurationList = v
  11119. return s
  11120. }
  11121. // SetContinuationToken sets the ContinuationToken field's value.
  11122. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  11123. s.ContinuationToken = &v
  11124. return s
  11125. }
  11126. // SetIsTruncated sets the IsTruncated field's value.
  11127. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  11128. s.IsTruncated = &v
  11129. return s
  11130. }
  11131. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11132. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  11133. s.NextContinuationToken = &v
  11134. return s
  11135. }
  11136. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsRequest
  11137. type ListBucketInventoryConfigurationsInput struct {
  11138. _ struct{} `type:"structure"`
  11139. // The name of the bucket containing the inventory configurations to retrieve.
  11140. //
  11141. // Bucket is a required field
  11142. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11143. // The marker used to continue an inventory configuration listing that has been
  11144. // truncated. Use the NextContinuationToken from a previously truncated list
  11145. // response to continue the listing. The continuation token is an opaque value
  11146. // that Amazon S3 understands.
  11147. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11148. }
  11149. // String returns the string representation
  11150. func (s ListBucketInventoryConfigurationsInput) String() string {
  11151. return awsutil.Prettify(s)
  11152. }
  11153. // GoString returns the string representation
  11154. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  11155. return s.String()
  11156. }
  11157. // Validate inspects the fields of the type to determine if they are valid.
  11158. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  11159. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  11160. if s.Bucket == nil {
  11161. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11162. }
  11163. if invalidParams.Len() > 0 {
  11164. return invalidParams
  11165. }
  11166. return nil
  11167. }
  11168. // SetBucket sets the Bucket field's value.
  11169. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  11170. s.Bucket = &v
  11171. return s
  11172. }
  11173. // SetContinuationToken sets the ContinuationToken field's value.
  11174. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  11175. s.ContinuationToken = &v
  11176. return s
  11177. }
  11178. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsOutput
  11179. type ListBucketInventoryConfigurationsOutput struct {
  11180. _ struct{} `type:"structure"`
  11181. // If sent in the request, the marker that is used as a starting point for this
  11182. // inventory configuration list response.
  11183. ContinuationToken *string `type:"string"`
  11184. // The list of inventory configurations for a bucket.
  11185. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  11186. // Indicates whether the returned list of inventory configurations is truncated
  11187. // in this response. A value of true indicates that the list is truncated.
  11188. IsTruncated *bool `type:"boolean"`
  11189. // The marker used to continue this inventory configuration listing. Use the
  11190. // NextContinuationToken from this response to continue the listing in a subsequent
  11191. // request. The continuation token is an opaque value that Amazon S3 understands.
  11192. NextContinuationToken *string `type:"string"`
  11193. }
  11194. // String returns the string representation
  11195. func (s ListBucketInventoryConfigurationsOutput) String() string {
  11196. return awsutil.Prettify(s)
  11197. }
  11198. // GoString returns the string representation
  11199. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  11200. return s.String()
  11201. }
  11202. // SetContinuationToken sets the ContinuationToken field's value.
  11203. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  11204. s.ContinuationToken = &v
  11205. return s
  11206. }
  11207. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  11208. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  11209. s.InventoryConfigurationList = v
  11210. return s
  11211. }
  11212. // SetIsTruncated sets the IsTruncated field's value.
  11213. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  11214. s.IsTruncated = &v
  11215. return s
  11216. }
  11217. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11218. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  11219. s.NextContinuationToken = &v
  11220. return s
  11221. }
  11222. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsRequest
  11223. type ListBucketMetricsConfigurationsInput struct {
  11224. _ struct{} `type:"structure"`
  11225. // The name of the bucket containing the metrics configurations to retrieve.
  11226. //
  11227. // Bucket is a required field
  11228. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11229. // The marker that is used to continue a metrics configuration listing that
  11230. // has been truncated. Use the NextContinuationToken from a previously truncated
  11231. // list response to continue the listing. The continuation token is an opaque
  11232. // value that Amazon S3 understands.
  11233. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11234. }
  11235. // String returns the string representation
  11236. func (s ListBucketMetricsConfigurationsInput) String() string {
  11237. return awsutil.Prettify(s)
  11238. }
  11239. // GoString returns the string representation
  11240. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  11241. return s.String()
  11242. }
  11243. // Validate inspects the fields of the type to determine if they are valid.
  11244. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  11245. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  11246. if s.Bucket == nil {
  11247. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11248. }
  11249. if invalidParams.Len() > 0 {
  11250. return invalidParams
  11251. }
  11252. return nil
  11253. }
  11254. // SetBucket sets the Bucket field's value.
  11255. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  11256. s.Bucket = &v
  11257. return s
  11258. }
  11259. // SetContinuationToken sets the ContinuationToken field's value.
  11260. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  11261. s.ContinuationToken = &v
  11262. return s
  11263. }
  11264. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsOutput
  11265. type ListBucketMetricsConfigurationsOutput struct {
  11266. _ struct{} `type:"structure"`
  11267. // The marker that is used as a starting point for this metrics configuration
  11268. // list response. This value is present if it was sent in the request.
  11269. ContinuationToken *string `type:"string"`
  11270. // Indicates whether the returned list of metrics configurations is complete.
  11271. // A value of true indicates that the list is not complete and the NextContinuationToken
  11272. // will be provided for a subsequent request.
  11273. IsTruncated *bool `type:"boolean"`
  11274. // The list of metrics configurations for a bucket.
  11275. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  11276. // The marker used to continue a metrics configuration listing that has been
  11277. // truncated. Use the NextContinuationToken from a previously truncated list
  11278. // response to continue the listing. The continuation token is an opaque value
  11279. // that Amazon S3 understands.
  11280. NextContinuationToken *string `type:"string"`
  11281. }
  11282. // String returns the string representation
  11283. func (s ListBucketMetricsConfigurationsOutput) String() string {
  11284. return awsutil.Prettify(s)
  11285. }
  11286. // GoString returns the string representation
  11287. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  11288. return s.String()
  11289. }
  11290. // SetContinuationToken sets the ContinuationToken field's value.
  11291. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  11292. s.ContinuationToken = &v
  11293. return s
  11294. }
  11295. // SetIsTruncated sets the IsTruncated field's value.
  11296. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  11297. s.IsTruncated = &v
  11298. return s
  11299. }
  11300. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  11301. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  11302. s.MetricsConfigurationList = v
  11303. return s
  11304. }
  11305. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11306. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  11307. s.NextContinuationToken = &v
  11308. return s
  11309. }
  11310. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsInput
  11311. type ListBucketsInput struct {
  11312. _ struct{} `type:"structure"`
  11313. }
  11314. // String returns the string representation
  11315. func (s ListBucketsInput) String() string {
  11316. return awsutil.Prettify(s)
  11317. }
  11318. // GoString returns the string representation
  11319. func (s ListBucketsInput) GoString() string {
  11320. return s.String()
  11321. }
  11322. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsOutput
  11323. type ListBucketsOutput struct {
  11324. _ struct{} `type:"structure"`
  11325. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  11326. Owner *Owner `type:"structure"`
  11327. }
  11328. // String returns the string representation
  11329. func (s ListBucketsOutput) String() string {
  11330. return awsutil.Prettify(s)
  11331. }
  11332. // GoString returns the string representation
  11333. func (s ListBucketsOutput) GoString() string {
  11334. return s.String()
  11335. }
  11336. // SetBuckets sets the Buckets field's value.
  11337. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  11338. s.Buckets = v
  11339. return s
  11340. }
  11341. // SetOwner sets the Owner field's value.
  11342. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  11343. s.Owner = v
  11344. return s
  11345. }
  11346. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsRequest
  11347. type ListMultipartUploadsInput struct {
  11348. _ struct{} `type:"structure"`
  11349. // Bucket is a required field
  11350. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11351. // Character you use to group keys.
  11352. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  11353. // Requests Amazon S3 to encode the object keys in the response and specifies
  11354. // the encoding method to use. An object key may contain any Unicode character;
  11355. // however, XML 1.0 parser cannot parse some characters, such as characters
  11356. // with an ASCII value from 0 to 10. For characters that are not supported in
  11357. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  11358. // keys in the response.
  11359. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  11360. // Together with upload-id-marker, this parameter specifies the multipart upload
  11361. // after which listing should begin.
  11362. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  11363. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  11364. // in the response body. 1,000 is the maximum number of uploads that can be
  11365. // returned in a response.
  11366. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  11367. // Lists in-progress uploads only for those keys that begin with the specified
  11368. // prefix.
  11369. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  11370. // Together with key-marker, specifies the multipart upload after which listing
  11371. // should begin. If key-marker is not specified, the upload-id-marker parameter
  11372. // is ignored.
  11373. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  11374. }
  11375. // String returns the string representation
  11376. func (s ListMultipartUploadsInput) String() string {
  11377. return awsutil.Prettify(s)
  11378. }
  11379. // GoString returns the string representation
  11380. func (s ListMultipartUploadsInput) GoString() string {
  11381. return s.String()
  11382. }
  11383. // Validate inspects the fields of the type to determine if they are valid.
  11384. func (s *ListMultipartUploadsInput) Validate() error {
  11385. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  11386. if s.Bucket == nil {
  11387. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11388. }
  11389. if invalidParams.Len() > 0 {
  11390. return invalidParams
  11391. }
  11392. return nil
  11393. }
  11394. // SetBucket sets the Bucket field's value.
  11395. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  11396. s.Bucket = &v
  11397. return s
  11398. }
  11399. // SetDelimiter sets the Delimiter field's value.
  11400. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  11401. s.Delimiter = &v
  11402. return s
  11403. }
  11404. // SetEncodingType sets the EncodingType field's value.
  11405. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  11406. s.EncodingType = &v
  11407. return s
  11408. }
  11409. // SetKeyMarker sets the KeyMarker field's value.
  11410. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  11411. s.KeyMarker = &v
  11412. return s
  11413. }
  11414. // SetMaxUploads sets the MaxUploads field's value.
  11415. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  11416. s.MaxUploads = &v
  11417. return s
  11418. }
  11419. // SetPrefix sets the Prefix field's value.
  11420. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  11421. s.Prefix = &v
  11422. return s
  11423. }
  11424. // SetUploadIdMarker sets the UploadIdMarker field's value.
  11425. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  11426. s.UploadIdMarker = &v
  11427. return s
  11428. }
  11429. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsOutput
  11430. type ListMultipartUploadsOutput struct {
  11431. _ struct{} `type:"structure"`
  11432. // Name of the bucket to which the multipart upload was initiated.
  11433. Bucket *string `type:"string"`
  11434. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  11435. Delimiter *string `type:"string"`
  11436. // Encoding type used by Amazon S3 to encode object keys in the response.
  11437. EncodingType *string `type:"string" enum:"EncodingType"`
  11438. // Indicates whether the returned list of multipart uploads is truncated. A
  11439. // value of true indicates that the list was truncated. The list can be truncated
  11440. // if the number of multipart uploads exceeds the limit allowed or specified
  11441. // by max uploads.
  11442. IsTruncated *bool `type:"boolean"`
  11443. // The key at or after which the listing began.
  11444. KeyMarker *string `type:"string"`
  11445. // Maximum number of multipart uploads that could have been included in the
  11446. // response.
  11447. MaxUploads *int64 `type:"integer"`
  11448. // When a list is truncated, this element specifies the value that should be
  11449. // used for the key-marker request parameter in a subsequent request.
  11450. NextKeyMarker *string `type:"string"`
  11451. // When a list is truncated, this element specifies the value that should be
  11452. // used for the upload-id-marker request parameter in a subsequent request.
  11453. NextUploadIdMarker *string `type:"string"`
  11454. // When a prefix is provided in the request, this field contains the specified
  11455. // prefix. The result contains only keys starting with the specified prefix.
  11456. Prefix *string `type:"string"`
  11457. // Upload ID after which listing began.
  11458. UploadIdMarker *string `type:"string"`
  11459. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  11460. }
  11461. // String returns the string representation
  11462. func (s ListMultipartUploadsOutput) String() string {
  11463. return awsutil.Prettify(s)
  11464. }
  11465. // GoString returns the string representation
  11466. func (s ListMultipartUploadsOutput) GoString() string {
  11467. return s.String()
  11468. }
  11469. // SetBucket sets the Bucket field's value.
  11470. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  11471. s.Bucket = &v
  11472. return s
  11473. }
  11474. // SetCommonPrefixes sets the CommonPrefixes field's value.
  11475. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  11476. s.CommonPrefixes = v
  11477. return s
  11478. }
  11479. // SetDelimiter sets the Delimiter field's value.
  11480. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  11481. s.Delimiter = &v
  11482. return s
  11483. }
  11484. // SetEncodingType sets the EncodingType field's value.
  11485. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  11486. s.EncodingType = &v
  11487. return s
  11488. }
  11489. // SetIsTruncated sets the IsTruncated field's value.
  11490. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  11491. s.IsTruncated = &v
  11492. return s
  11493. }
  11494. // SetKeyMarker sets the KeyMarker field's value.
  11495. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  11496. s.KeyMarker = &v
  11497. return s
  11498. }
  11499. // SetMaxUploads sets the MaxUploads field's value.
  11500. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  11501. s.MaxUploads = &v
  11502. return s
  11503. }
  11504. // SetNextKeyMarker sets the NextKeyMarker field's value.
  11505. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  11506. s.NextKeyMarker = &v
  11507. return s
  11508. }
  11509. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  11510. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  11511. s.NextUploadIdMarker = &v
  11512. return s
  11513. }
  11514. // SetPrefix sets the Prefix field's value.
  11515. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  11516. s.Prefix = &v
  11517. return s
  11518. }
  11519. // SetUploadIdMarker sets the UploadIdMarker field's value.
  11520. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  11521. s.UploadIdMarker = &v
  11522. return s
  11523. }
  11524. // SetUploads sets the Uploads field's value.
  11525. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  11526. s.Uploads = v
  11527. return s
  11528. }
  11529. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest
  11530. type ListObjectVersionsInput struct {
  11531. _ struct{} `type:"structure"`
  11532. // Bucket is a required field
  11533. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11534. // A delimiter is a character you use to group keys.
  11535. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  11536. // Requests Amazon S3 to encode the object keys in the response and specifies
  11537. // the encoding method to use. An object key may contain any Unicode character;
  11538. // however, XML 1.0 parser cannot parse some characters, such as characters
  11539. // with an ASCII value from 0 to 10. For characters that are not supported in
  11540. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  11541. // keys in the response.
  11542. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  11543. // Specifies the key to start with when listing objects in a bucket.
  11544. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  11545. // Sets the maximum number of keys returned in the response. The response might
  11546. // contain fewer keys but will never contain more.
  11547. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  11548. // Limits the response to keys that begin with the specified prefix.
  11549. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  11550. // Specifies the object version you want to start listing from.
  11551. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  11552. }
  11553. // String returns the string representation
  11554. func (s ListObjectVersionsInput) String() string {
  11555. return awsutil.Prettify(s)
  11556. }
  11557. // GoString returns the string representation
  11558. func (s ListObjectVersionsInput) GoString() string {
  11559. return s.String()
  11560. }
  11561. // Validate inspects the fields of the type to determine if they are valid.
  11562. func (s *ListObjectVersionsInput) Validate() error {
  11563. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  11564. if s.Bucket == nil {
  11565. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11566. }
  11567. if invalidParams.Len() > 0 {
  11568. return invalidParams
  11569. }
  11570. return nil
  11571. }
  11572. // SetBucket sets the Bucket field's value.
  11573. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  11574. s.Bucket = &v
  11575. return s
  11576. }
  11577. // SetDelimiter sets the Delimiter field's value.
  11578. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  11579. s.Delimiter = &v
  11580. return s
  11581. }
  11582. // SetEncodingType sets the EncodingType field's value.
  11583. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  11584. s.EncodingType = &v
  11585. return s
  11586. }
  11587. // SetKeyMarker sets the KeyMarker field's value.
  11588. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  11589. s.KeyMarker = &v
  11590. return s
  11591. }
  11592. // SetMaxKeys sets the MaxKeys field's value.
  11593. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  11594. s.MaxKeys = &v
  11595. return s
  11596. }
  11597. // SetPrefix sets the Prefix field's value.
  11598. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  11599. s.Prefix = &v
  11600. return s
  11601. }
  11602. // SetVersionIdMarker sets the VersionIdMarker field's value.
  11603. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  11604. s.VersionIdMarker = &v
  11605. return s
  11606. }
  11607. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsOutput
  11608. type ListObjectVersionsOutput struct {
  11609. _ struct{} `type:"structure"`
  11610. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  11611. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  11612. Delimiter *string `type:"string"`
  11613. // Encoding type used by Amazon S3 to encode object keys in the response.
  11614. EncodingType *string `type:"string" enum:"EncodingType"`
  11615. // A flag that indicates whether or not Amazon S3 returned all of the results
  11616. // that satisfied the search criteria. If your results were truncated, you can
  11617. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  11618. // response parameters as a starting place in another request to return the
  11619. // rest of the results.
  11620. IsTruncated *bool `type:"boolean"`
  11621. // Marks the last Key returned in a truncated response.
  11622. KeyMarker *string `type:"string"`
  11623. MaxKeys *int64 `type:"integer"`
  11624. Name *string `type:"string"`
  11625. // Use this value for the key marker request parameter in a subsequent request.
  11626. NextKeyMarker *string `type:"string"`
  11627. // Use this value for the next version id marker parameter in a subsequent request.
  11628. NextVersionIdMarker *string `type:"string"`
  11629. Prefix *string `type:"string"`
  11630. VersionIdMarker *string `type:"string"`
  11631. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  11632. }
  11633. // String returns the string representation
  11634. func (s ListObjectVersionsOutput) String() string {
  11635. return awsutil.Prettify(s)
  11636. }
  11637. // GoString returns the string representation
  11638. func (s ListObjectVersionsOutput) GoString() string {
  11639. return s.String()
  11640. }
  11641. // SetCommonPrefixes sets the CommonPrefixes field's value.
  11642. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  11643. s.CommonPrefixes = v
  11644. return s
  11645. }
  11646. // SetDeleteMarkers sets the DeleteMarkers field's value.
  11647. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  11648. s.DeleteMarkers = v
  11649. return s
  11650. }
  11651. // SetDelimiter sets the Delimiter field's value.
  11652. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  11653. s.Delimiter = &v
  11654. return s
  11655. }
  11656. // SetEncodingType sets the EncodingType field's value.
  11657. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  11658. s.EncodingType = &v
  11659. return s
  11660. }
  11661. // SetIsTruncated sets the IsTruncated field's value.
  11662. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  11663. s.IsTruncated = &v
  11664. return s
  11665. }
  11666. // SetKeyMarker sets the KeyMarker field's value.
  11667. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  11668. s.KeyMarker = &v
  11669. return s
  11670. }
  11671. // SetMaxKeys sets the MaxKeys field's value.
  11672. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  11673. s.MaxKeys = &v
  11674. return s
  11675. }
  11676. // SetName sets the Name field's value.
  11677. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  11678. s.Name = &v
  11679. return s
  11680. }
  11681. // SetNextKeyMarker sets the NextKeyMarker field's value.
  11682. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  11683. s.NextKeyMarker = &v
  11684. return s
  11685. }
  11686. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  11687. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  11688. s.NextVersionIdMarker = &v
  11689. return s
  11690. }
  11691. // SetPrefix sets the Prefix field's value.
  11692. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  11693. s.Prefix = &v
  11694. return s
  11695. }
  11696. // SetVersionIdMarker sets the VersionIdMarker field's value.
  11697. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  11698. s.VersionIdMarker = &v
  11699. return s
  11700. }
  11701. // SetVersions sets the Versions field's value.
  11702. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  11703. s.Versions = v
  11704. return s
  11705. }
  11706. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest
  11707. type ListObjectsInput struct {
  11708. _ struct{} `type:"structure"`
  11709. // Bucket is a required field
  11710. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11711. // A delimiter is a character you use to group keys.
  11712. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  11713. // Requests Amazon S3 to encode the object keys in the response and specifies
  11714. // the encoding method to use. An object key may contain any Unicode character;
  11715. // however, XML 1.0 parser cannot parse some characters, such as characters
  11716. // with an ASCII value from 0 to 10. For characters that are not supported in
  11717. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  11718. // keys in the response.
  11719. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  11720. // Specifies the key to start with when listing objects in a bucket.
  11721. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  11722. // Sets the maximum number of keys returned in the response. The response might
  11723. // contain fewer keys but will never contain more.
  11724. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  11725. // Limits the response to keys that begin with the specified prefix.
  11726. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  11727. // Confirms that the requester knows that she or he will be charged for the
  11728. // list objects request. Bucket owners need not specify this parameter in their
  11729. // requests.
  11730. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11731. }
  11732. // String returns the string representation
  11733. func (s ListObjectsInput) String() string {
  11734. return awsutil.Prettify(s)
  11735. }
  11736. // GoString returns the string representation
  11737. func (s ListObjectsInput) GoString() string {
  11738. return s.String()
  11739. }
  11740. // Validate inspects the fields of the type to determine if they are valid.
  11741. func (s *ListObjectsInput) Validate() error {
  11742. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  11743. if s.Bucket == nil {
  11744. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11745. }
  11746. if invalidParams.Len() > 0 {
  11747. return invalidParams
  11748. }
  11749. return nil
  11750. }
  11751. // SetBucket sets the Bucket field's value.
  11752. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  11753. s.Bucket = &v
  11754. return s
  11755. }
  11756. // SetDelimiter sets the Delimiter field's value.
  11757. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  11758. s.Delimiter = &v
  11759. return s
  11760. }
  11761. // SetEncodingType sets the EncodingType field's value.
  11762. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  11763. s.EncodingType = &v
  11764. return s
  11765. }
  11766. // SetMarker sets the Marker field's value.
  11767. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  11768. s.Marker = &v
  11769. return s
  11770. }
  11771. // SetMaxKeys sets the MaxKeys field's value.
  11772. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  11773. s.MaxKeys = &v
  11774. return s
  11775. }
  11776. // SetPrefix sets the Prefix field's value.
  11777. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  11778. s.Prefix = &v
  11779. return s
  11780. }
  11781. // SetRequestPayer sets the RequestPayer field's value.
  11782. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  11783. s.RequestPayer = &v
  11784. return s
  11785. }
  11786. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsOutput
  11787. type ListObjectsOutput struct {
  11788. _ struct{} `type:"structure"`
  11789. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  11790. Contents []*Object `type:"list" flattened:"true"`
  11791. Delimiter *string `type:"string"`
  11792. // Encoding type used by Amazon S3 to encode object keys in the response.
  11793. EncodingType *string `type:"string" enum:"EncodingType"`
  11794. // A flag that indicates whether or not Amazon S3 returned all of the results
  11795. // that satisfied the search criteria.
  11796. IsTruncated *bool `type:"boolean"`
  11797. Marker *string `type:"string"`
  11798. MaxKeys *int64 `type:"integer"`
  11799. Name *string `type:"string"`
  11800. // When response is truncated (the IsTruncated element value in the response
  11801. // is true), you can use the key name in this field as marker in the subsequent
  11802. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  11803. // order Note: This element is returned only if you have delimiter request parameter
  11804. // specified. If response does not include the NextMaker and it is truncated,
  11805. // you can use the value of the last Key in the response as the marker in the
  11806. // subsequent request to get the next set of object keys.
  11807. NextMarker *string `type:"string"`
  11808. Prefix *string `type:"string"`
  11809. }
  11810. // String returns the string representation
  11811. func (s ListObjectsOutput) String() string {
  11812. return awsutil.Prettify(s)
  11813. }
  11814. // GoString returns the string representation
  11815. func (s ListObjectsOutput) GoString() string {
  11816. return s.String()
  11817. }
  11818. // SetCommonPrefixes sets the CommonPrefixes field's value.
  11819. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  11820. s.CommonPrefixes = v
  11821. return s
  11822. }
  11823. // SetContents sets the Contents field's value.
  11824. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  11825. s.Contents = v
  11826. return s
  11827. }
  11828. // SetDelimiter sets the Delimiter field's value.
  11829. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  11830. s.Delimiter = &v
  11831. return s
  11832. }
  11833. // SetEncodingType sets the EncodingType field's value.
  11834. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  11835. s.EncodingType = &v
  11836. return s
  11837. }
  11838. // SetIsTruncated sets the IsTruncated field's value.
  11839. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  11840. s.IsTruncated = &v
  11841. return s
  11842. }
  11843. // SetMarker sets the Marker field's value.
  11844. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  11845. s.Marker = &v
  11846. return s
  11847. }
  11848. // SetMaxKeys sets the MaxKeys field's value.
  11849. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  11850. s.MaxKeys = &v
  11851. return s
  11852. }
  11853. // SetName sets the Name field's value.
  11854. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  11855. s.Name = &v
  11856. return s
  11857. }
  11858. // SetNextMarker sets the NextMarker field's value.
  11859. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  11860. s.NextMarker = &v
  11861. return s
  11862. }
  11863. // SetPrefix sets the Prefix field's value.
  11864. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  11865. s.Prefix = &v
  11866. return s
  11867. }
  11868. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request
  11869. type ListObjectsV2Input struct {
  11870. _ struct{} `type:"structure"`
  11871. // Name of the bucket to list.
  11872. //
  11873. // Bucket is a required field
  11874. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11875. // ContinuationToken indicates Amazon S3 that the list is being continued on
  11876. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  11877. // key
  11878. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11879. // A delimiter is a character you use to group keys.
  11880. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  11881. // Encoding type used by Amazon S3 to encode object keys in the response.
  11882. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  11883. // The owner field is not present in listV2 by default, if you want to return
  11884. // owner field with each key in the result then set the fetch owner field to
  11885. // true
  11886. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  11887. // Sets the maximum number of keys returned in the response. The response might
  11888. // contain fewer keys but will never contain more.
  11889. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  11890. // Limits the response to keys that begin with the specified prefix.
  11891. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  11892. // Confirms that the requester knows that she or he will be charged for the
  11893. // list objects request in V2 style. Bucket owners need not specify this parameter
  11894. // in their requests.
  11895. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  11896. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  11897. // listing after this specified key. StartAfter can be any key in the bucket
  11898. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  11899. }
  11900. // String returns the string representation
  11901. func (s ListObjectsV2Input) String() string {
  11902. return awsutil.Prettify(s)
  11903. }
  11904. // GoString returns the string representation
  11905. func (s ListObjectsV2Input) GoString() string {
  11906. return s.String()
  11907. }
  11908. // Validate inspects the fields of the type to determine if they are valid.
  11909. func (s *ListObjectsV2Input) Validate() error {
  11910. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  11911. if s.Bucket == nil {
  11912. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11913. }
  11914. if invalidParams.Len() > 0 {
  11915. return invalidParams
  11916. }
  11917. return nil
  11918. }
  11919. // SetBucket sets the Bucket field's value.
  11920. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  11921. s.Bucket = &v
  11922. return s
  11923. }
  11924. // SetContinuationToken sets the ContinuationToken field's value.
  11925. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  11926. s.ContinuationToken = &v
  11927. return s
  11928. }
  11929. // SetDelimiter sets the Delimiter field's value.
  11930. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  11931. s.Delimiter = &v
  11932. return s
  11933. }
  11934. // SetEncodingType sets the EncodingType field's value.
  11935. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  11936. s.EncodingType = &v
  11937. return s
  11938. }
  11939. // SetFetchOwner sets the FetchOwner field's value.
  11940. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  11941. s.FetchOwner = &v
  11942. return s
  11943. }
  11944. // SetMaxKeys sets the MaxKeys field's value.
  11945. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  11946. s.MaxKeys = &v
  11947. return s
  11948. }
  11949. // SetPrefix sets the Prefix field's value.
  11950. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  11951. s.Prefix = &v
  11952. return s
  11953. }
  11954. // SetRequestPayer sets the RequestPayer field's value.
  11955. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  11956. s.RequestPayer = &v
  11957. return s
  11958. }
  11959. // SetStartAfter sets the StartAfter field's value.
  11960. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  11961. s.StartAfter = &v
  11962. return s
  11963. }
  11964. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Output
  11965. type ListObjectsV2Output struct {
  11966. _ struct{} `type:"structure"`
  11967. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  11968. // next occurrence of the string specified by delimiter
  11969. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  11970. // Metadata about each object returned.
  11971. Contents []*Object `type:"list" flattened:"true"`
  11972. // ContinuationToken indicates Amazon S3 that the list is being continued on
  11973. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  11974. // key
  11975. ContinuationToken *string `type:"string"`
  11976. // A delimiter is a character you use to group keys.
  11977. Delimiter *string `type:"string"`
  11978. // Encoding type used by Amazon S3 to encode object keys in the response.
  11979. EncodingType *string `type:"string" enum:"EncodingType"`
  11980. // A flag that indicates whether or not Amazon S3 returned all of the results
  11981. // that satisfied the search criteria.
  11982. IsTruncated *bool `type:"boolean"`
  11983. // KeyCount is the number of keys returned with this request. KeyCount will
  11984. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  11985. // result will include less than equals 50 keys
  11986. KeyCount *int64 `type:"integer"`
  11987. // Sets the maximum number of keys returned in the response. The response might
  11988. // contain fewer keys but will never contain more.
  11989. MaxKeys *int64 `type:"integer"`
  11990. // Name of the bucket to list.
  11991. Name *string `type:"string"`
  11992. // NextContinuationToken is sent when isTruncated is true which means there
  11993. // are more keys in the bucket that can be listed. The next list requests to
  11994. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  11995. // is obfuscated and is not a real key
  11996. NextContinuationToken *string `type:"string"`
  11997. // Limits the response to keys that begin with the specified prefix.
  11998. Prefix *string `type:"string"`
  11999. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12000. // listing after this specified key. StartAfter can be any key in the bucket
  12001. StartAfter *string `type:"string"`
  12002. }
  12003. // String returns the string representation
  12004. func (s ListObjectsV2Output) String() string {
  12005. return awsutil.Prettify(s)
  12006. }
  12007. // GoString returns the string representation
  12008. func (s ListObjectsV2Output) GoString() string {
  12009. return s.String()
  12010. }
  12011. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12012. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  12013. s.CommonPrefixes = v
  12014. return s
  12015. }
  12016. // SetContents sets the Contents field's value.
  12017. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  12018. s.Contents = v
  12019. return s
  12020. }
  12021. // SetContinuationToken sets the ContinuationToken field's value.
  12022. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  12023. s.ContinuationToken = &v
  12024. return s
  12025. }
  12026. // SetDelimiter sets the Delimiter field's value.
  12027. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  12028. s.Delimiter = &v
  12029. return s
  12030. }
  12031. // SetEncodingType sets the EncodingType field's value.
  12032. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  12033. s.EncodingType = &v
  12034. return s
  12035. }
  12036. // SetIsTruncated sets the IsTruncated field's value.
  12037. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  12038. s.IsTruncated = &v
  12039. return s
  12040. }
  12041. // SetKeyCount sets the KeyCount field's value.
  12042. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  12043. s.KeyCount = &v
  12044. return s
  12045. }
  12046. // SetMaxKeys sets the MaxKeys field's value.
  12047. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  12048. s.MaxKeys = &v
  12049. return s
  12050. }
  12051. // SetName sets the Name field's value.
  12052. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  12053. s.Name = &v
  12054. return s
  12055. }
  12056. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12057. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  12058. s.NextContinuationToken = &v
  12059. return s
  12060. }
  12061. // SetPrefix sets the Prefix field's value.
  12062. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  12063. s.Prefix = &v
  12064. return s
  12065. }
  12066. // SetStartAfter sets the StartAfter field's value.
  12067. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  12068. s.StartAfter = &v
  12069. return s
  12070. }
  12071. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsRequest
  12072. type ListPartsInput struct {
  12073. _ struct{} `type:"structure"`
  12074. // Bucket is a required field
  12075. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12076. // Key is a required field
  12077. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12078. // Sets the maximum number of parts to return.
  12079. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  12080. // Specifies the part after which listing should begin. Only parts with higher
  12081. // part numbers will be listed.
  12082. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  12083. // Confirms that the requester knows that she or he will be charged for the
  12084. // request. Bucket owners need not specify this parameter in their requests.
  12085. // Documentation on downloading objects from requester pays buckets can be found
  12086. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  12087. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12088. // Upload ID identifying the multipart upload whose parts are being listed.
  12089. //
  12090. // UploadId is a required field
  12091. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  12092. }
  12093. // String returns the string representation
  12094. func (s ListPartsInput) String() string {
  12095. return awsutil.Prettify(s)
  12096. }
  12097. // GoString returns the string representation
  12098. func (s ListPartsInput) GoString() string {
  12099. return s.String()
  12100. }
  12101. // Validate inspects the fields of the type to determine if they are valid.
  12102. func (s *ListPartsInput) Validate() error {
  12103. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  12104. if s.Bucket == nil {
  12105. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12106. }
  12107. if s.Key == nil {
  12108. invalidParams.Add(request.NewErrParamRequired("Key"))
  12109. }
  12110. if s.Key != nil && len(*s.Key) < 1 {
  12111. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12112. }
  12113. if s.UploadId == nil {
  12114. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  12115. }
  12116. if invalidParams.Len() > 0 {
  12117. return invalidParams
  12118. }
  12119. return nil
  12120. }
  12121. // SetBucket sets the Bucket field's value.
  12122. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  12123. s.Bucket = &v
  12124. return s
  12125. }
  12126. // SetKey sets the Key field's value.
  12127. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  12128. s.Key = &v
  12129. return s
  12130. }
  12131. // SetMaxParts sets the MaxParts field's value.
  12132. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  12133. s.MaxParts = &v
  12134. return s
  12135. }
  12136. // SetPartNumberMarker sets the PartNumberMarker field's value.
  12137. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  12138. s.PartNumberMarker = &v
  12139. return s
  12140. }
  12141. // SetRequestPayer sets the RequestPayer field's value.
  12142. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  12143. s.RequestPayer = &v
  12144. return s
  12145. }
  12146. // SetUploadId sets the UploadId field's value.
  12147. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  12148. s.UploadId = &v
  12149. return s
  12150. }
  12151. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsOutput
  12152. type ListPartsOutput struct {
  12153. _ struct{} `type:"structure"`
  12154. // Date when multipart upload will become eligible for abort operation by lifecycle.
  12155. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  12156. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  12157. // operation.
  12158. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  12159. // Name of the bucket to which the multipart upload was initiated.
  12160. Bucket *string `type:"string"`
  12161. // Identifies who initiated the multipart upload.
  12162. Initiator *Initiator `type:"structure"`
  12163. // Indicates whether the returned list of parts is truncated.
  12164. IsTruncated *bool `type:"boolean"`
  12165. // Object key for which the multipart upload was initiated.
  12166. Key *string `min:"1" type:"string"`
  12167. // Maximum number of parts that were allowed in the response.
  12168. MaxParts *int64 `type:"integer"`
  12169. // When a list is truncated, this element specifies the last part in the list,
  12170. // as well as the value to use for the part-number-marker request parameter
  12171. // in a subsequent request.
  12172. NextPartNumberMarker *int64 `type:"integer"`
  12173. Owner *Owner `type:"structure"`
  12174. // Part number after which listing begins.
  12175. PartNumberMarker *int64 `type:"integer"`
  12176. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  12177. // If present, indicates that the requester was successfully charged for the
  12178. // request.
  12179. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12180. // The class of storage used to store the object.
  12181. StorageClass *string `type:"string" enum:"StorageClass"`
  12182. // Upload ID identifying the multipart upload whose parts are being listed.
  12183. UploadId *string `type:"string"`
  12184. }
  12185. // String returns the string representation
  12186. func (s ListPartsOutput) String() string {
  12187. return awsutil.Prettify(s)
  12188. }
  12189. // GoString returns the string representation
  12190. func (s ListPartsOutput) GoString() string {
  12191. return s.String()
  12192. }
  12193. // SetAbortDate sets the AbortDate field's value.
  12194. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  12195. s.AbortDate = &v
  12196. return s
  12197. }
  12198. // SetAbortRuleId sets the AbortRuleId field's value.
  12199. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  12200. s.AbortRuleId = &v
  12201. return s
  12202. }
  12203. // SetBucket sets the Bucket field's value.
  12204. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  12205. s.Bucket = &v
  12206. return s
  12207. }
  12208. // SetInitiator sets the Initiator field's value.
  12209. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  12210. s.Initiator = v
  12211. return s
  12212. }
  12213. // SetIsTruncated sets the IsTruncated field's value.
  12214. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  12215. s.IsTruncated = &v
  12216. return s
  12217. }
  12218. // SetKey sets the Key field's value.
  12219. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  12220. s.Key = &v
  12221. return s
  12222. }
  12223. // SetMaxParts sets the MaxParts field's value.
  12224. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  12225. s.MaxParts = &v
  12226. return s
  12227. }
  12228. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  12229. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  12230. s.NextPartNumberMarker = &v
  12231. return s
  12232. }
  12233. // SetOwner sets the Owner field's value.
  12234. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  12235. s.Owner = v
  12236. return s
  12237. }
  12238. // SetPartNumberMarker sets the PartNumberMarker field's value.
  12239. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  12240. s.PartNumberMarker = &v
  12241. return s
  12242. }
  12243. // SetParts sets the Parts field's value.
  12244. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  12245. s.Parts = v
  12246. return s
  12247. }
  12248. // SetRequestCharged sets the RequestCharged field's value.
  12249. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  12250. s.RequestCharged = &v
  12251. return s
  12252. }
  12253. // SetStorageClass sets the StorageClass field's value.
  12254. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  12255. s.StorageClass = &v
  12256. return s
  12257. }
  12258. // SetUploadId sets the UploadId field's value.
  12259. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  12260. s.UploadId = &v
  12261. return s
  12262. }
  12263. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LoggingEnabled
  12264. type LoggingEnabled struct {
  12265. _ struct{} `type:"structure"`
  12266. // Specifies the bucket where you want Amazon S3 to store server access logs.
  12267. // You can have your logs delivered to any bucket that you own, including the
  12268. // same bucket that is being logged. You can also configure multiple buckets
  12269. // to deliver their logs to the same target bucket. In this case you should
  12270. // choose a different TargetPrefix for each source bucket so that the delivered
  12271. // log files can be distinguished by key.
  12272. TargetBucket *string `type:"string"`
  12273. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  12274. // This element lets you specify a prefix for the keys that the log files will
  12275. // be stored under.
  12276. TargetPrefix *string `type:"string"`
  12277. }
  12278. // String returns the string representation
  12279. func (s LoggingEnabled) String() string {
  12280. return awsutil.Prettify(s)
  12281. }
  12282. // GoString returns the string representation
  12283. func (s LoggingEnabled) GoString() string {
  12284. return s.String()
  12285. }
  12286. // Validate inspects the fields of the type to determine if they are valid.
  12287. func (s *LoggingEnabled) Validate() error {
  12288. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  12289. if s.TargetGrants != nil {
  12290. for i, v := range s.TargetGrants {
  12291. if v == nil {
  12292. continue
  12293. }
  12294. if err := v.Validate(); err != nil {
  12295. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  12296. }
  12297. }
  12298. }
  12299. if invalidParams.Len() > 0 {
  12300. return invalidParams
  12301. }
  12302. return nil
  12303. }
  12304. // SetTargetBucket sets the TargetBucket field's value.
  12305. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  12306. s.TargetBucket = &v
  12307. return s
  12308. }
  12309. // SetTargetGrants sets the TargetGrants field's value.
  12310. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  12311. s.TargetGrants = v
  12312. return s
  12313. }
  12314. // SetTargetPrefix sets the TargetPrefix field's value.
  12315. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  12316. s.TargetPrefix = &v
  12317. return s
  12318. }
  12319. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsAndOperator
  12320. type MetricsAndOperator struct {
  12321. _ struct{} `type:"structure"`
  12322. // The prefix used when evaluating an AND predicate.
  12323. Prefix *string `type:"string"`
  12324. // The list of tags used when evaluating an AND predicate.
  12325. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  12326. }
  12327. // String returns the string representation
  12328. func (s MetricsAndOperator) String() string {
  12329. return awsutil.Prettify(s)
  12330. }
  12331. // GoString returns the string representation
  12332. func (s MetricsAndOperator) GoString() string {
  12333. return s.String()
  12334. }
  12335. // Validate inspects the fields of the type to determine if they are valid.
  12336. func (s *MetricsAndOperator) Validate() error {
  12337. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  12338. if s.Tags != nil {
  12339. for i, v := range s.Tags {
  12340. if v == nil {
  12341. continue
  12342. }
  12343. if err := v.Validate(); err != nil {
  12344. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  12345. }
  12346. }
  12347. }
  12348. if invalidParams.Len() > 0 {
  12349. return invalidParams
  12350. }
  12351. return nil
  12352. }
  12353. // SetPrefix sets the Prefix field's value.
  12354. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  12355. s.Prefix = &v
  12356. return s
  12357. }
  12358. // SetTags sets the Tags field's value.
  12359. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  12360. s.Tags = v
  12361. return s
  12362. }
  12363. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsConfiguration
  12364. type MetricsConfiguration struct {
  12365. _ struct{} `type:"structure"`
  12366. // Specifies a metrics configuration filter. The metrics configuration will
  12367. // only include objects that meet the filter's criteria. A filter must be a
  12368. // prefix, a tag, or a conjunction (MetricsAndOperator).
  12369. Filter *MetricsFilter `type:"structure"`
  12370. // The ID used to identify the metrics configuration.
  12371. //
  12372. // Id is a required field
  12373. Id *string `type:"string" required:"true"`
  12374. }
  12375. // String returns the string representation
  12376. func (s MetricsConfiguration) String() string {
  12377. return awsutil.Prettify(s)
  12378. }
  12379. // GoString returns the string representation
  12380. func (s MetricsConfiguration) GoString() string {
  12381. return s.String()
  12382. }
  12383. // Validate inspects the fields of the type to determine if they are valid.
  12384. func (s *MetricsConfiguration) Validate() error {
  12385. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  12386. if s.Id == nil {
  12387. invalidParams.Add(request.NewErrParamRequired("Id"))
  12388. }
  12389. if s.Filter != nil {
  12390. if err := s.Filter.Validate(); err != nil {
  12391. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  12392. }
  12393. }
  12394. if invalidParams.Len() > 0 {
  12395. return invalidParams
  12396. }
  12397. return nil
  12398. }
  12399. // SetFilter sets the Filter field's value.
  12400. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  12401. s.Filter = v
  12402. return s
  12403. }
  12404. // SetId sets the Id field's value.
  12405. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  12406. s.Id = &v
  12407. return s
  12408. }
  12409. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsFilter
  12410. type MetricsFilter struct {
  12411. _ struct{} `type:"structure"`
  12412. // A conjunction (logical AND) of predicates, which is used in evaluating a
  12413. // metrics filter. The operator must have at least two predicates, and an object
  12414. // must match all of the predicates in order for the filter to apply.
  12415. And *MetricsAndOperator `type:"structure"`
  12416. // The prefix used when evaluating a metrics filter.
  12417. Prefix *string `type:"string"`
  12418. // The tag used when evaluating a metrics filter.
  12419. Tag *Tag `type:"structure"`
  12420. }
  12421. // String returns the string representation
  12422. func (s MetricsFilter) String() string {
  12423. return awsutil.Prettify(s)
  12424. }
  12425. // GoString returns the string representation
  12426. func (s MetricsFilter) GoString() string {
  12427. return s.String()
  12428. }
  12429. // Validate inspects the fields of the type to determine if they are valid.
  12430. func (s *MetricsFilter) Validate() error {
  12431. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  12432. if s.And != nil {
  12433. if err := s.And.Validate(); err != nil {
  12434. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  12435. }
  12436. }
  12437. if s.Tag != nil {
  12438. if err := s.Tag.Validate(); err != nil {
  12439. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  12440. }
  12441. }
  12442. if invalidParams.Len() > 0 {
  12443. return invalidParams
  12444. }
  12445. return nil
  12446. }
  12447. // SetAnd sets the And field's value.
  12448. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  12449. s.And = v
  12450. return s
  12451. }
  12452. // SetPrefix sets the Prefix field's value.
  12453. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  12454. s.Prefix = &v
  12455. return s
  12456. }
  12457. // SetTag sets the Tag field's value.
  12458. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  12459. s.Tag = v
  12460. return s
  12461. }
  12462. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MultipartUpload
  12463. type MultipartUpload struct {
  12464. _ struct{} `type:"structure"`
  12465. // Date and time at which the multipart upload was initiated.
  12466. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  12467. // Identifies who initiated the multipart upload.
  12468. Initiator *Initiator `type:"structure"`
  12469. // Key of the object for which the multipart upload was initiated.
  12470. Key *string `min:"1" type:"string"`
  12471. Owner *Owner `type:"structure"`
  12472. // The class of storage used to store the object.
  12473. StorageClass *string `type:"string" enum:"StorageClass"`
  12474. // Upload ID that identifies the multipart upload.
  12475. UploadId *string `type:"string"`
  12476. }
  12477. // String returns the string representation
  12478. func (s MultipartUpload) String() string {
  12479. return awsutil.Prettify(s)
  12480. }
  12481. // GoString returns the string representation
  12482. func (s MultipartUpload) GoString() string {
  12483. return s.String()
  12484. }
  12485. // SetInitiated sets the Initiated field's value.
  12486. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  12487. s.Initiated = &v
  12488. return s
  12489. }
  12490. // SetInitiator sets the Initiator field's value.
  12491. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  12492. s.Initiator = v
  12493. return s
  12494. }
  12495. // SetKey sets the Key field's value.
  12496. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  12497. s.Key = &v
  12498. return s
  12499. }
  12500. // SetOwner sets the Owner field's value.
  12501. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  12502. s.Owner = v
  12503. return s
  12504. }
  12505. // SetStorageClass sets the StorageClass field's value.
  12506. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  12507. s.StorageClass = &v
  12508. return s
  12509. }
  12510. // SetUploadId sets the UploadId field's value.
  12511. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  12512. s.UploadId = &v
  12513. return s
  12514. }
  12515. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  12516. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  12517. // configuration action on a bucket that has versioning enabled (or suspended)
  12518. // to request that Amazon S3 delete noncurrent object versions at a specific
  12519. // period in the object's lifetime.
  12520. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionExpiration
  12521. type NoncurrentVersionExpiration struct {
  12522. _ struct{} `type:"structure"`
  12523. // Specifies the number of days an object is noncurrent before Amazon S3 can
  12524. // perform the associated action. For information about the noncurrent days
  12525. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  12526. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  12527. NoncurrentDays *int64 `type:"integer"`
  12528. }
  12529. // String returns the string representation
  12530. func (s NoncurrentVersionExpiration) String() string {
  12531. return awsutil.Prettify(s)
  12532. }
  12533. // GoString returns the string representation
  12534. func (s NoncurrentVersionExpiration) GoString() string {
  12535. return s.String()
  12536. }
  12537. // SetNoncurrentDays sets the NoncurrentDays field's value.
  12538. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  12539. s.NoncurrentDays = &v
  12540. return s
  12541. }
  12542. // Container for the transition rule that describes when noncurrent objects
  12543. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  12544. // versioning-enabled (or versioning is suspended), you can set this action
  12545. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  12546. // or GLACIER storage class at a specific period in the object's lifetime.
  12547. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionTransition
  12548. type NoncurrentVersionTransition struct {
  12549. _ struct{} `type:"structure"`
  12550. // Specifies the number of days an object is noncurrent before Amazon S3 can
  12551. // perform the associated action. For information about the noncurrent days
  12552. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  12553. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  12554. NoncurrentDays *int64 `type:"integer"`
  12555. // The class of storage used to store the object.
  12556. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  12557. }
  12558. // String returns the string representation
  12559. func (s NoncurrentVersionTransition) String() string {
  12560. return awsutil.Prettify(s)
  12561. }
  12562. // GoString returns the string representation
  12563. func (s NoncurrentVersionTransition) GoString() string {
  12564. return s.String()
  12565. }
  12566. // SetNoncurrentDays sets the NoncurrentDays field's value.
  12567. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  12568. s.NoncurrentDays = &v
  12569. return s
  12570. }
  12571. // SetStorageClass sets the StorageClass field's value.
  12572. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  12573. s.StorageClass = &v
  12574. return s
  12575. }
  12576. // Container for specifying the notification configuration of the bucket. If
  12577. // this element is empty, notifications are turned off on the bucket.
  12578. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfiguration
  12579. type NotificationConfiguration struct {
  12580. _ struct{} `type:"structure"`
  12581. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  12582. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  12583. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  12584. }
  12585. // String returns the string representation
  12586. func (s NotificationConfiguration) String() string {
  12587. return awsutil.Prettify(s)
  12588. }
  12589. // GoString returns the string representation
  12590. func (s NotificationConfiguration) GoString() string {
  12591. return s.String()
  12592. }
  12593. // Validate inspects the fields of the type to determine if they are valid.
  12594. func (s *NotificationConfiguration) Validate() error {
  12595. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  12596. if s.LambdaFunctionConfigurations != nil {
  12597. for i, v := range s.LambdaFunctionConfigurations {
  12598. if v == nil {
  12599. continue
  12600. }
  12601. if err := v.Validate(); err != nil {
  12602. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  12603. }
  12604. }
  12605. }
  12606. if s.QueueConfigurations != nil {
  12607. for i, v := range s.QueueConfigurations {
  12608. if v == nil {
  12609. continue
  12610. }
  12611. if err := v.Validate(); err != nil {
  12612. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  12613. }
  12614. }
  12615. }
  12616. if s.TopicConfigurations != nil {
  12617. for i, v := range s.TopicConfigurations {
  12618. if v == nil {
  12619. continue
  12620. }
  12621. if err := v.Validate(); err != nil {
  12622. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  12623. }
  12624. }
  12625. }
  12626. if invalidParams.Len() > 0 {
  12627. return invalidParams
  12628. }
  12629. return nil
  12630. }
  12631. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  12632. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  12633. s.LambdaFunctionConfigurations = v
  12634. return s
  12635. }
  12636. // SetQueueConfigurations sets the QueueConfigurations field's value.
  12637. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  12638. s.QueueConfigurations = v
  12639. return s
  12640. }
  12641. // SetTopicConfigurations sets the TopicConfigurations field's value.
  12642. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  12643. s.TopicConfigurations = v
  12644. return s
  12645. }
  12646. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationDeprecated
  12647. type NotificationConfigurationDeprecated struct {
  12648. _ struct{} `type:"structure"`
  12649. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  12650. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  12651. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  12652. }
  12653. // String returns the string representation
  12654. func (s NotificationConfigurationDeprecated) String() string {
  12655. return awsutil.Prettify(s)
  12656. }
  12657. // GoString returns the string representation
  12658. func (s NotificationConfigurationDeprecated) GoString() string {
  12659. return s.String()
  12660. }
  12661. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  12662. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  12663. s.CloudFunctionConfiguration = v
  12664. return s
  12665. }
  12666. // SetQueueConfiguration sets the QueueConfiguration field's value.
  12667. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  12668. s.QueueConfiguration = v
  12669. return s
  12670. }
  12671. // SetTopicConfiguration sets the TopicConfiguration field's value.
  12672. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  12673. s.TopicConfiguration = v
  12674. return s
  12675. }
  12676. // Container for object key name filtering rules. For information about key
  12677. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  12678. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationFilter
  12679. type NotificationConfigurationFilter struct {
  12680. _ struct{} `type:"structure"`
  12681. // Container for object key name prefix and suffix filtering rules.
  12682. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  12683. }
  12684. // String returns the string representation
  12685. func (s NotificationConfigurationFilter) String() string {
  12686. return awsutil.Prettify(s)
  12687. }
  12688. // GoString returns the string representation
  12689. func (s NotificationConfigurationFilter) GoString() string {
  12690. return s.String()
  12691. }
  12692. // SetKey sets the Key field's value.
  12693. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  12694. s.Key = v
  12695. return s
  12696. }
  12697. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object
  12698. type Object struct {
  12699. _ struct{} `type:"structure"`
  12700. ETag *string `type:"string"`
  12701. Key *string `min:"1" type:"string"`
  12702. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  12703. Owner *Owner `type:"structure"`
  12704. Size *int64 `type:"integer"`
  12705. // The class of storage used to store the object.
  12706. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  12707. }
  12708. // String returns the string representation
  12709. func (s Object) String() string {
  12710. return awsutil.Prettify(s)
  12711. }
  12712. // GoString returns the string representation
  12713. func (s Object) GoString() string {
  12714. return s.String()
  12715. }
  12716. // SetETag sets the ETag field's value.
  12717. func (s *Object) SetETag(v string) *Object {
  12718. s.ETag = &v
  12719. return s
  12720. }
  12721. // SetKey sets the Key field's value.
  12722. func (s *Object) SetKey(v string) *Object {
  12723. s.Key = &v
  12724. return s
  12725. }
  12726. // SetLastModified sets the LastModified field's value.
  12727. func (s *Object) SetLastModified(v time.Time) *Object {
  12728. s.LastModified = &v
  12729. return s
  12730. }
  12731. // SetOwner sets the Owner field's value.
  12732. func (s *Object) SetOwner(v *Owner) *Object {
  12733. s.Owner = v
  12734. return s
  12735. }
  12736. // SetSize sets the Size field's value.
  12737. func (s *Object) SetSize(v int64) *Object {
  12738. s.Size = &v
  12739. return s
  12740. }
  12741. // SetStorageClass sets the StorageClass field's value.
  12742. func (s *Object) SetStorageClass(v string) *Object {
  12743. s.StorageClass = &v
  12744. return s
  12745. }
  12746. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier
  12747. type ObjectIdentifier struct {
  12748. _ struct{} `type:"structure"`
  12749. // Key name of the object to delete.
  12750. //
  12751. // Key is a required field
  12752. Key *string `min:"1" type:"string" required:"true"`
  12753. // VersionId for the specific version of the object to delete.
  12754. VersionId *string `type:"string"`
  12755. }
  12756. // String returns the string representation
  12757. func (s ObjectIdentifier) String() string {
  12758. return awsutil.Prettify(s)
  12759. }
  12760. // GoString returns the string representation
  12761. func (s ObjectIdentifier) GoString() string {
  12762. return s.String()
  12763. }
  12764. // Validate inspects the fields of the type to determine if they are valid.
  12765. func (s *ObjectIdentifier) Validate() error {
  12766. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  12767. if s.Key == nil {
  12768. invalidParams.Add(request.NewErrParamRequired("Key"))
  12769. }
  12770. if s.Key != nil && len(*s.Key) < 1 {
  12771. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12772. }
  12773. if invalidParams.Len() > 0 {
  12774. return invalidParams
  12775. }
  12776. return nil
  12777. }
  12778. // SetKey sets the Key field's value.
  12779. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  12780. s.Key = &v
  12781. return s
  12782. }
  12783. // SetVersionId sets the VersionId field's value.
  12784. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  12785. s.VersionId = &v
  12786. return s
  12787. }
  12788. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion
  12789. type ObjectVersion struct {
  12790. _ struct{} `type:"structure"`
  12791. ETag *string `type:"string"`
  12792. // Specifies whether the object is (true) or is not (false) the latest version
  12793. // of an object.
  12794. IsLatest *bool `type:"boolean"`
  12795. // The object key.
  12796. Key *string `min:"1" type:"string"`
  12797. // Date and time the object was last modified.
  12798. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  12799. Owner *Owner `type:"structure"`
  12800. // Size in bytes of the object.
  12801. Size *int64 `type:"integer"`
  12802. // The class of storage used to store the object.
  12803. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  12804. // Version ID of an object.
  12805. VersionId *string `type:"string"`
  12806. }
  12807. // String returns the string representation
  12808. func (s ObjectVersion) String() string {
  12809. return awsutil.Prettify(s)
  12810. }
  12811. // GoString returns the string representation
  12812. func (s ObjectVersion) GoString() string {
  12813. return s.String()
  12814. }
  12815. // SetETag sets the ETag field's value.
  12816. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  12817. s.ETag = &v
  12818. return s
  12819. }
  12820. // SetIsLatest sets the IsLatest field's value.
  12821. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  12822. s.IsLatest = &v
  12823. return s
  12824. }
  12825. // SetKey sets the Key field's value.
  12826. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  12827. s.Key = &v
  12828. return s
  12829. }
  12830. // SetLastModified sets the LastModified field's value.
  12831. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  12832. s.LastModified = &v
  12833. return s
  12834. }
  12835. // SetOwner sets the Owner field's value.
  12836. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  12837. s.Owner = v
  12838. return s
  12839. }
  12840. // SetSize sets the Size field's value.
  12841. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  12842. s.Size = &v
  12843. return s
  12844. }
  12845. // SetStorageClass sets the StorageClass field's value.
  12846. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  12847. s.StorageClass = &v
  12848. return s
  12849. }
  12850. // SetVersionId sets the VersionId field's value.
  12851. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  12852. s.VersionId = &v
  12853. return s
  12854. }
  12855. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Owner
  12856. type Owner struct {
  12857. _ struct{} `type:"structure"`
  12858. DisplayName *string `type:"string"`
  12859. ID *string `type:"string"`
  12860. }
  12861. // String returns the string representation
  12862. func (s Owner) String() string {
  12863. return awsutil.Prettify(s)
  12864. }
  12865. // GoString returns the string representation
  12866. func (s Owner) GoString() string {
  12867. return s.String()
  12868. }
  12869. // SetDisplayName sets the DisplayName field's value.
  12870. func (s *Owner) SetDisplayName(v string) *Owner {
  12871. s.DisplayName = &v
  12872. return s
  12873. }
  12874. // SetID sets the ID field's value.
  12875. func (s *Owner) SetID(v string) *Owner {
  12876. s.ID = &v
  12877. return s
  12878. }
  12879. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Part
  12880. type Part struct {
  12881. _ struct{} `type:"structure"`
  12882. // Entity tag returned when the part was uploaded.
  12883. ETag *string `type:"string"`
  12884. // Date and time at which the part was uploaded.
  12885. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  12886. // Part number identifying the part. This is a positive integer between 1 and
  12887. // 10,000.
  12888. PartNumber *int64 `type:"integer"`
  12889. // Size of the uploaded part data.
  12890. Size *int64 `type:"integer"`
  12891. }
  12892. // String returns the string representation
  12893. func (s Part) String() string {
  12894. return awsutil.Prettify(s)
  12895. }
  12896. // GoString returns the string representation
  12897. func (s Part) GoString() string {
  12898. return s.String()
  12899. }
  12900. // SetETag sets the ETag field's value.
  12901. func (s *Part) SetETag(v string) *Part {
  12902. s.ETag = &v
  12903. return s
  12904. }
  12905. // SetLastModified sets the LastModified field's value.
  12906. func (s *Part) SetLastModified(v time.Time) *Part {
  12907. s.LastModified = &v
  12908. return s
  12909. }
  12910. // SetPartNumber sets the PartNumber field's value.
  12911. func (s *Part) SetPartNumber(v int64) *Part {
  12912. s.PartNumber = &v
  12913. return s
  12914. }
  12915. // SetSize sets the Size field's value.
  12916. func (s *Part) SetSize(v int64) *Part {
  12917. s.Size = &v
  12918. return s
  12919. }
  12920. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationRequest
  12921. type PutBucketAccelerateConfigurationInput struct {
  12922. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  12923. // Specifies the Accelerate Configuration you want to set for the bucket.
  12924. //
  12925. // AccelerateConfiguration is a required field
  12926. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true"`
  12927. // Name of the bucket for which the accelerate configuration is set.
  12928. //
  12929. // Bucket is a required field
  12930. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12931. }
  12932. // String returns the string representation
  12933. func (s PutBucketAccelerateConfigurationInput) String() string {
  12934. return awsutil.Prettify(s)
  12935. }
  12936. // GoString returns the string representation
  12937. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  12938. return s.String()
  12939. }
  12940. // Validate inspects the fields of the type to determine if they are valid.
  12941. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  12942. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  12943. if s.AccelerateConfiguration == nil {
  12944. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  12945. }
  12946. if s.Bucket == nil {
  12947. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12948. }
  12949. if invalidParams.Len() > 0 {
  12950. return invalidParams
  12951. }
  12952. return nil
  12953. }
  12954. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  12955. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  12956. s.AccelerateConfiguration = v
  12957. return s
  12958. }
  12959. // SetBucket sets the Bucket field's value.
  12960. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  12961. s.Bucket = &v
  12962. return s
  12963. }
  12964. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput
  12965. type PutBucketAccelerateConfigurationOutput struct {
  12966. _ struct{} `type:"structure"`
  12967. }
  12968. // String returns the string representation
  12969. func (s PutBucketAccelerateConfigurationOutput) String() string {
  12970. return awsutil.Prettify(s)
  12971. }
  12972. // GoString returns the string representation
  12973. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  12974. return s.String()
  12975. }
  12976. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclRequest
  12977. type PutBucketAclInput struct {
  12978. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  12979. // The canned ACL to apply to the bucket.
  12980. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  12981. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  12982. // Bucket is a required field
  12983. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12984. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  12985. // bucket.
  12986. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  12987. // Allows grantee to list the objects in the bucket.
  12988. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  12989. // Allows grantee to read the bucket ACL.
  12990. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  12991. // Allows grantee to create, overwrite, and delete any object in the bucket.
  12992. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  12993. // Allows grantee to write the ACL for the applicable bucket.
  12994. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  12995. }
  12996. // String returns the string representation
  12997. func (s PutBucketAclInput) String() string {
  12998. return awsutil.Prettify(s)
  12999. }
  13000. // GoString returns the string representation
  13001. func (s PutBucketAclInput) GoString() string {
  13002. return s.String()
  13003. }
  13004. // Validate inspects the fields of the type to determine if they are valid.
  13005. func (s *PutBucketAclInput) Validate() error {
  13006. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  13007. if s.Bucket == nil {
  13008. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13009. }
  13010. if s.AccessControlPolicy != nil {
  13011. if err := s.AccessControlPolicy.Validate(); err != nil {
  13012. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  13013. }
  13014. }
  13015. if invalidParams.Len() > 0 {
  13016. return invalidParams
  13017. }
  13018. return nil
  13019. }
  13020. // SetACL sets the ACL field's value.
  13021. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  13022. s.ACL = &v
  13023. return s
  13024. }
  13025. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  13026. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  13027. s.AccessControlPolicy = v
  13028. return s
  13029. }
  13030. // SetBucket sets the Bucket field's value.
  13031. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  13032. s.Bucket = &v
  13033. return s
  13034. }
  13035. // SetGrantFullControl sets the GrantFullControl field's value.
  13036. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  13037. s.GrantFullControl = &v
  13038. return s
  13039. }
  13040. // SetGrantRead sets the GrantRead field's value.
  13041. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  13042. s.GrantRead = &v
  13043. return s
  13044. }
  13045. // SetGrantReadACP sets the GrantReadACP field's value.
  13046. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  13047. s.GrantReadACP = &v
  13048. return s
  13049. }
  13050. // SetGrantWrite sets the GrantWrite field's value.
  13051. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  13052. s.GrantWrite = &v
  13053. return s
  13054. }
  13055. // SetGrantWriteACP sets the GrantWriteACP field's value.
  13056. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  13057. s.GrantWriteACP = &v
  13058. return s
  13059. }
  13060. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclOutput
  13061. type PutBucketAclOutput struct {
  13062. _ struct{} `type:"structure"`
  13063. }
  13064. // String returns the string representation
  13065. func (s PutBucketAclOutput) String() string {
  13066. return awsutil.Prettify(s)
  13067. }
  13068. // GoString returns the string representation
  13069. func (s PutBucketAclOutput) GoString() string {
  13070. return s.String()
  13071. }
  13072. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationRequest
  13073. type PutBucketAnalyticsConfigurationInput struct {
  13074. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  13075. // The configuration and any analyses for the analytics filter.
  13076. //
  13077. // AnalyticsConfiguration is a required field
  13078. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true"`
  13079. // The name of the bucket to which an analytics configuration is stored.
  13080. //
  13081. // Bucket is a required field
  13082. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13083. // The identifier used to represent an analytics configuration.
  13084. //
  13085. // Id is a required field
  13086. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  13087. }
  13088. // String returns the string representation
  13089. func (s PutBucketAnalyticsConfigurationInput) String() string {
  13090. return awsutil.Prettify(s)
  13091. }
  13092. // GoString returns the string representation
  13093. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  13094. return s.String()
  13095. }
  13096. // Validate inspects the fields of the type to determine if they are valid.
  13097. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  13098. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  13099. if s.AnalyticsConfiguration == nil {
  13100. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  13101. }
  13102. if s.Bucket == nil {
  13103. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13104. }
  13105. if s.Id == nil {
  13106. invalidParams.Add(request.NewErrParamRequired("Id"))
  13107. }
  13108. if s.AnalyticsConfiguration != nil {
  13109. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  13110. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  13111. }
  13112. }
  13113. if invalidParams.Len() > 0 {
  13114. return invalidParams
  13115. }
  13116. return nil
  13117. }
  13118. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  13119. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  13120. s.AnalyticsConfiguration = v
  13121. return s
  13122. }
  13123. // SetBucket sets the Bucket field's value.
  13124. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  13125. s.Bucket = &v
  13126. return s
  13127. }
  13128. // SetId sets the Id field's value.
  13129. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  13130. s.Id = &v
  13131. return s
  13132. }
  13133. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationOutput
  13134. type PutBucketAnalyticsConfigurationOutput struct {
  13135. _ struct{} `type:"structure"`
  13136. }
  13137. // String returns the string representation
  13138. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  13139. return awsutil.Prettify(s)
  13140. }
  13141. // GoString returns the string representation
  13142. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  13143. return s.String()
  13144. }
  13145. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsRequest
  13146. type PutBucketCorsInput struct {
  13147. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  13148. // Bucket is a required field
  13149. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13150. // CORSConfiguration is a required field
  13151. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true"`
  13152. }
  13153. // String returns the string representation
  13154. func (s PutBucketCorsInput) String() string {
  13155. return awsutil.Prettify(s)
  13156. }
  13157. // GoString returns the string representation
  13158. func (s PutBucketCorsInput) GoString() string {
  13159. return s.String()
  13160. }
  13161. // Validate inspects the fields of the type to determine if they are valid.
  13162. func (s *PutBucketCorsInput) Validate() error {
  13163. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  13164. if s.Bucket == nil {
  13165. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13166. }
  13167. if s.CORSConfiguration == nil {
  13168. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  13169. }
  13170. if s.CORSConfiguration != nil {
  13171. if err := s.CORSConfiguration.Validate(); err != nil {
  13172. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  13173. }
  13174. }
  13175. if invalidParams.Len() > 0 {
  13176. return invalidParams
  13177. }
  13178. return nil
  13179. }
  13180. // SetBucket sets the Bucket field's value.
  13181. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  13182. s.Bucket = &v
  13183. return s
  13184. }
  13185. // SetCORSConfiguration sets the CORSConfiguration field's value.
  13186. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  13187. s.CORSConfiguration = v
  13188. return s
  13189. }
  13190. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsOutput
  13191. type PutBucketCorsOutput struct {
  13192. _ struct{} `type:"structure"`
  13193. }
  13194. // String returns the string representation
  13195. func (s PutBucketCorsOutput) String() string {
  13196. return awsutil.Prettify(s)
  13197. }
  13198. // GoString returns the string representation
  13199. func (s PutBucketCorsOutput) GoString() string {
  13200. return s.String()
  13201. }
  13202. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest
  13203. type PutBucketInventoryConfigurationInput struct {
  13204. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  13205. // The name of the bucket where the inventory configuration will be stored.
  13206. //
  13207. // Bucket is a required field
  13208. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13209. // The ID used to identify the inventory configuration.
  13210. //
  13211. // Id is a required field
  13212. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  13213. // Specifies the inventory configuration.
  13214. //
  13215. // InventoryConfiguration is a required field
  13216. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true"`
  13217. }
  13218. // String returns the string representation
  13219. func (s PutBucketInventoryConfigurationInput) String() string {
  13220. return awsutil.Prettify(s)
  13221. }
  13222. // GoString returns the string representation
  13223. func (s PutBucketInventoryConfigurationInput) GoString() string {
  13224. return s.String()
  13225. }
  13226. // Validate inspects the fields of the type to determine if they are valid.
  13227. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  13228. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  13229. if s.Bucket == nil {
  13230. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13231. }
  13232. if s.Id == nil {
  13233. invalidParams.Add(request.NewErrParamRequired("Id"))
  13234. }
  13235. if s.InventoryConfiguration == nil {
  13236. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  13237. }
  13238. if s.InventoryConfiguration != nil {
  13239. if err := s.InventoryConfiguration.Validate(); err != nil {
  13240. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  13241. }
  13242. }
  13243. if invalidParams.Len() > 0 {
  13244. return invalidParams
  13245. }
  13246. return nil
  13247. }
  13248. // SetBucket sets the Bucket field's value.
  13249. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  13250. s.Bucket = &v
  13251. return s
  13252. }
  13253. // SetId sets the Id field's value.
  13254. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  13255. s.Id = &v
  13256. return s
  13257. }
  13258. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  13259. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  13260. s.InventoryConfiguration = v
  13261. return s
  13262. }
  13263. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationOutput
  13264. type PutBucketInventoryConfigurationOutput struct {
  13265. _ struct{} `type:"structure"`
  13266. }
  13267. // String returns the string representation
  13268. func (s PutBucketInventoryConfigurationOutput) String() string {
  13269. return awsutil.Prettify(s)
  13270. }
  13271. // GoString returns the string representation
  13272. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  13273. return s.String()
  13274. }
  13275. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationRequest
  13276. type PutBucketLifecycleConfigurationInput struct {
  13277. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  13278. // Bucket is a required field
  13279. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13280. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
  13281. }
  13282. // String returns the string representation
  13283. func (s PutBucketLifecycleConfigurationInput) String() string {
  13284. return awsutil.Prettify(s)
  13285. }
  13286. // GoString returns the string representation
  13287. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  13288. return s.String()
  13289. }
  13290. // Validate inspects the fields of the type to determine if they are valid.
  13291. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  13292. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  13293. if s.Bucket == nil {
  13294. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13295. }
  13296. if s.LifecycleConfiguration != nil {
  13297. if err := s.LifecycleConfiguration.Validate(); err != nil {
  13298. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  13299. }
  13300. }
  13301. if invalidParams.Len() > 0 {
  13302. return invalidParams
  13303. }
  13304. return nil
  13305. }
  13306. // SetBucket sets the Bucket field's value.
  13307. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  13308. s.Bucket = &v
  13309. return s
  13310. }
  13311. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  13312. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  13313. s.LifecycleConfiguration = v
  13314. return s
  13315. }
  13316. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationOutput
  13317. type PutBucketLifecycleConfigurationOutput struct {
  13318. _ struct{} `type:"structure"`
  13319. }
  13320. // String returns the string representation
  13321. func (s PutBucketLifecycleConfigurationOutput) String() string {
  13322. return awsutil.Prettify(s)
  13323. }
  13324. // GoString returns the string representation
  13325. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  13326. return s.String()
  13327. }
  13328. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleRequest
  13329. type PutBucketLifecycleInput struct {
  13330. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  13331. // Bucket is a required field
  13332. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13333. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure"`
  13334. }
  13335. // String returns the string representation
  13336. func (s PutBucketLifecycleInput) String() string {
  13337. return awsutil.Prettify(s)
  13338. }
  13339. // GoString returns the string representation
  13340. func (s PutBucketLifecycleInput) GoString() string {
  13341. return s.String()
  13342. }
  13343. // Validate inspects the fields of the type to determine if they are valid.
  13344. func (s *PutBucketLifecycleInput) Validate() error {
  13345. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  13346. if s.Bucket == nil {
  13347. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13348. }
  13349. if s.LifecycleConfiguration != nil {
  13350. if err := s.LifecycleConfiguration.Validate(); err != nil {
  13351. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  13352. }
  13353. }
  13354. if invalidParams.Len() > 0 {
  13355. return invalidParams
  13356. }
  13357. return nil
  13358. }
  13359. // SetBucket sets the Bucket field's value.
  13360. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  13361. s.Bucket = &v
  13362. return s
  13363. }
  13364. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  13365. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  13366. s.LifecycleConfiguration = v
  13367. return s
  13368. }
  13369. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleOutput
  13370. type PutBucketLifecycleOutput struct {
  13371. _ struct{} `type:"structure"`
  13372. }
  13373. // String returns the string representation
  13374. func (s PutBucketLifecycleOutput) String() string {
  13375. return awsutil.Prettify(s)
  13376. }
  13377. // GoString returns the string representation
  13378. func (s PutBucketLifecycleOutput) GoString() string {
  13379. return s.String()
  13380. }
  13381. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingRequest
  13382. type PutBucketLoggingInput struct {
  13383. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  13384. // Bucket is a required field
  13385. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13386. // BucketLoggingStatus is a required field
  13387. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true"`
  13388. }
  13389. // String returns the string representation
  13390. func (s PutBucketLoggingInput) String() string {
  13391. return awsutil.Prettify(s)
  13392. }
  13393. // GoString returns the string representation
  13394. func (s PutBucketLoggingInput) GoString() string {
  13395. return s.String()
  13396. }
  13397. // Validate inspects the fields of the type to determine if they are valid.
  13398. func (s *PutBucketLoggingInput) Validate() error {
  13399. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  13400. if s.Bucket == nil {
  13401. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13402. }
  13403. if s.BucketLoggingStatus == nil {
  13404. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  13405. }
  13406. if s.BucketLoggingStatus != nil {
  13407. if err := s.BucketLoggingStatus.Validate(); err != nil {
  13408. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  13409. }
  13410. }
  13411. if invalidParams.Len() > 0 {
  13412. return invalidParams
  13413. }
  13414. return nil
  13415. }
  13416. // SetBucket sets the Bucket field's value.
  13417. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  13418. s.Bucket = &v
  13419. return s
  13420. }
  13421. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  13422. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  13423. s.BucketLoggingStatus = v
  13424. return s
  13425. }
  13426. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingOutput
  13427. type PutBucketLoggingOutput struct {
  13428. _ struct{} `type:"structure"`
  13429. }
  13430. // String returns the string representation
  13431. func (s PutBucketLoggingOutput) String() string {
  13432. return awsutil.Prettify(s)
  13433. }
  13434. // GoString returns the string representation
  13435. func (s PutBucketLoggingOutput) GoString() string {
  13436. return s.String()
  13437. }
  13438. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationRequest
  13439. type PutBucketMetricsConfigurationInput struct {
  13440. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  13441. // The name of the bucket for which the metrics configuration is set.
  13442. //
  13443. // Bucket is a required field
  13444. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13445. // The ID used to identify the metrics configuration.
  13446. //
  13447. // Id is a required field
  13448. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  13449. // Specifies the metrics configuration.
  13450. //
  13451. // MetricsConfiguration is a required field
  13452. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true"`
  13453. }
  13454. // String returns the string representation
  13455. func (s PutBucketMetricsConfigurationInput) String() string {
  13456. return awsutil.Prettify(s)
  13457. }
  13458. // GoString returns the string representation
  13459. func (s PutBucketMetricsConfigurationInput) GoString() string {
  13460. return s.String()
  13461. }
  13462. // Validate inspects the fields of the type to determine if they are valid.
  13463. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  13464. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  13465. if s.Bucket == nil {
  13466. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13467. }
  13468. if s.Id == nil {
  13469. invalidParams.Add(request.NewErrParamRequired("Id"))
  13470. }
  13471. if s.MetricsConfiguration == nil {
  13472. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  13473. }
  13474. if s.MetricsConfiguration != nil {
  13475. if err := s.MetricsConfiguration.Validate(); err != nil {
  13476. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  13477. }
  13478. }
  13479. if invalidParams.Len() > 0 {
  13480. return invalidParams
  13481. }
  13482. return nil
  13483. }
  13484. // SetBucket sets the Bucket field's value.
  13485. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  13486. s.Bucket = &v
  13487. return s
  13488. }
  13489. // SetId sets the Id field's value.
  13490. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  13491. s.Id = &v
  13492. return s
  13493. }
  13494. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  13495. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  13496. s.MetricsConfiguration = v
  13497. return s
  13498. }
  13499. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationOutput
  13500. type PutBucketMetricsConfigurationOutput struct {
  13501. _ struct{} `type:"structure"`
  13502. }
  13503. // String returns the string representation
  13504. func (s PutBucketMetricsConfigurationOutput) String() string {
  13505. return awsutil.Prettify(s)
  13506. }
  13507. // GoString returns the string representation
  13508. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  13509. return s.String()
  13510. }
  13511. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationRequest
  13512. type PutBucketNotificationConfigurationInput struct {
  13513. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  13514. // Bucket is a required field
  13515. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13516. // Container for specifying the notification configuration of the bucket. If
  13517. // this element is empty, notifications are turned off on the bucket.
  13518. //
  13519. // NotificationConfiguration is a required field
  13520. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  13521. }
  13522. // String returns the string representation
  13523. func (s PutBucketNotificationConfigurationInput) String() string {
  13524. return awsutil.Prettify(s)
  13525. }
  13526. // GoString returns the string representation
  13527. func (s PutBucketNotificationConfigurationInput) GoString() string {
  13528. return s.String()
  13529. }
  13530. // Validate inspects the fields of the type to determine if they are valid.
  13531. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  13532. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  13533. if s.Bucket == nil {
  13534. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13535. }
  13536. if s.NotificationConfiguration == nil {
  13537. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  13538. }
  13539. if s.NotificationConfiguration != nil {
  13540. if err := s.NotificationConfiguration.Validate(); err != nil {
  13541. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  13542. }
  13543. }
  13544. if invalidParams.Len() > 0 {
  13545. return invalidParams
  13546. }
  13547. return nil
  13548. }
  13549. // SetBucket sets the Bucket field's value.
  13550. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  13551. s.Bucket = &v
  13552. return s
  13553. }
  13554. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  13555. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  13556. s.NotificationConfiguration = v
  13557. return s
  13558. }
  13559. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationOutput
  13560. type PutBucketNotificationConfigurationOutput struct {
  13561. _ struct{} `type:"structure"`
  13562. }
  13563. // String returns the string representation
  13564. func (s PutBucketNotificationConfigurationOutput) String() string {
  13565. return awsutil.Prettify(s)
  13566. }
  13567. // GoString returns the string representation
  13568. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  13569. return s.String()
  13570. }
  13571. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationRequest
  13572. type PutBucketNotificationInput struct {
  13573. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  13574. // Bucket is a required field
  13575. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13576. // NotificationConfiguration is a required field
  13577. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true"`
  13578. }
  13579. // String returns the string representation
  13580. func (s PutBucketNotificationInput) String() string {
  13581. return awsutil.Prettify(s)
  13582. }
  13583. // GoString returns the string representation
  13584. func (s PutBucketNotificationInput) GoString() string {
  13585. return s.String()
  13586. }
  13587. // Validate inspects the fields of the type to determine if they are valid.
  13588. func (s *PutBucketNotificationInput) Validate() error {
  13589. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  13590. if s.Bucket == nil {
  13591. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13592. }
  13593. if s.NotificationConfiguration == nil {
  13594. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  13595. }
  13596. if invalidParams.Len() > 0 {
  13597. return invalidParams
  13598. }
  13599. return nil
  13600. }
  13601. // SetBucket sets the Bucket field's value.
  13602. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  13603. s.Bucket = &v
  13604. return s
  13605. }
  13606. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  13607. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  13608. s.NotificationConfiguration = v
  13609. return s
  13610. }
  13611. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationOutput
  13612. type PutBucketNotificationOutput struct {
  13613. _ struct{} `type:"structure"`
  13614. }
  13615. // String returns the string representation
  13616. func (s PutBucketNotificationOutput) String() string {
  13617. return awsutil.Prettify(s)
  13618. }
  13619. // GoString returns the string representation
  13620. func (s PutBucketNotificationOutput) GoString() string {
  13621. return s.String()
  13622. }
  13623. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyRequest
  13624. type PutBucketPolicyInput struct {
  13625. _ struct{} `type:"structure" payload:"Policy"`
  13626. // Bucket is a required field
  13627. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13628. // The bucket policy as a JSON document.
  13629. //
  13630. // Policy is a required field
  13631. Policy *string `type:"string" required:"true"`
  13632. }
  13633. // String returns the string representation
  13634. func (s PutBucketPolicyInput) String() string {
  13635. return awsutil.Prettify(s)
  13636. }
  13637. // GoString returns the string representation
  13638. func (s PutBucketPolicyInput) GoString() string {
  13639. return s.String()
  13640. }
  13641. // Validate inspects the fields of the type to determine if they are valid.
  13642. func (s *PutBucketPolicyInput) Validate() error {
  13643. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  13644. if s.Bucket == nil {
  13645. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13646. }
  13647. if s.Policy == nil {
  13648. invalidParams.Add(request.NewErrParamRequired("Policy"))
  13649. }
  13650. if invalidParams.Len() > 0 {
  13651. return invalidParams
  13652. }
  13653. return nil
  13654. }
  13655. // SetBucket sets the Bucket field's value.
  13656. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  13657. s.Bucket = &v
  13658. return s
  13659. }
  13660. // SetPolicy sets the Policy field's value.
  13661. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  13662. s.Policy = &v
  13663. return s
  13664. }
  13665. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyOutput
  13666. type PutBucketPolicyOutput struct {
  13667. _ struct{} `type:"structure"`
  13668. }
  13669. // String returns the string representation
  13670. func (s PutBucketPolicyOutput) String() string {
  13671. return awsutil.Prettify(s)
  13672. }
  13673. // GoString returns the string representation
  13674. func (s PutBucketPolicyOutput) GoString() string {
  13675. return s.String()
  13676. }
  13677. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationRequest
  13678. type PutBucketReplicationInput struct {
  13679. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  13680. // Bucket is a required field
  13681. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13682. // Container for replication rules. You can add as many as 1,000 rules. Total
  13683. // replication configuration size can be up to 2 MB.
  13684. //
  13685. // ReplicationConfiguration is a required field
  13686. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true"`
  13687. }
  13688. // String returns the string representation
  13689. func (s PutBucketReplicationInput) String() string {
  13690. return awsutil.Prettify(s)
  13691. }
  13692. // GoString returns the string representation
  13693. func (s PutBucketReplicationInput) GoString() string {
  13694. return s.String()
  13695. }
  13696. // Validate inspects the fields of the type to determine if they are valid.
  13697. func (s *PutBucketReplicationInput) Validate() error {
  13698. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  13699. if s.Bucket == nil {
  13700. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13701. }
  13702. if s.ReplicationConfiguration == nil {
  13703. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  13704. }
  13705. if s.ReplicationConfiguration != nil {
  13706. if err := s.ReplicationConfiguration.Validate(); err != nil {
  13707. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  13708. }
  13709. }
  13710. if invalidParams.Len() > 0 {
  13711. return invalidParams
  13712. }
  13713. return nil
  13714. }
  13715. // SetBucket sets the Bucket field's value.
  13716. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  13717. s.Bucket = &v
  13718. return s
  13719. }
  13720. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  13721. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  13722. s.ReplicationConfiguration = v
  13723. return s
  13724. }
  13725. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationOutput
  13726. type PutBucketReplicationOutput struct {
  13727. _ struct{} `type:"structure"`
  13728. }
  13729. // String returns the string representation
  13730. func (s PutBucketReplicationOutput) String() string {
  13731. return awsutil.Prettify(s)
  13732. }
  13733. // GoString returns the string representation
  13734. func (s PutBucketReplicationOutput) GoString() string {
  13735. return s.String()
  13736. }
  13737. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentRequest
  13738. type PutBucketRequestPaymentInput struct {
  13739. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  13740. // Bucket is a required field
  13741. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13742. // RequestPaymentConfiguration is a required field
  13743. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true"`
  13744. }
  13745. // String returns the string representation
  13746. func (s PutBucketRequestPaymentInput) String() string {
  13747. return awsutil.Prettify(s)
  13748. }
  13749. // GoString returns the string representation
  13750. func (s PutBucketRequestPaymentInput) GoString() string {
  13751. return s.String()
  13752. }
  13753. // Validate inspects the fields of the type to determine if they are valid.
  13754. func (s *PutBucketRequestPaymentInput) Validate() error {
  13755. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  13756. if s.Bucket == nil {
  13757. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13758. }
  13759. if s.RequestPaymentConfiguration == nil {
  13760. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  13761. }
  13762. if s.RequestPaymentConfiguration != nil {
  13763. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  13764. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  13765. }
  13766. }
  13767. if invalidParams.Len() > 0 {
  13768. return invalidParams
  13769. }
  13770. return nil
  13771. }
  13772. // SetBucket sets the Bucket field's value.
  13773. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  13774. s.Bucket = &v
  13775. return s
  13776. }
  13777. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  13778. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  13779. s.RequestPaymentConfiguration = v
  13780. return s
  13781. }
  13782. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentOutput
  13783. type PutBucketRequestPaymentOutput struct {
  13784. _ struct{} `type:"structure"`
  13785. }
  13786. // String returns the string representation
  13787. func (s PutBucketRequestPaymentOutput) String() string {
  13788. return awsutil.Prettify(s)
  13789. }
  13790. // GoString returns the string representation
  13791. func (s PutBucketRequestPaymentOutput) GoString() string {
  13792. return s.String()
  13793. }
  13794. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingRequest
  13795. type PutBucketTaggingInput struct {
  13796. _ struct{} `type:"structure" payload:"Tagging"`
  13797. // Bucket is a required field
  13798. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13799. // Tagging is a required field
  13800. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
  13801. }
  13802. // String returns the string representation
  13803. func (s PutBucketTaggingInput) String() string {
  13804. return awsutil.Prettify(s)
  13805. }
  13806. // GoString returns the string representation
  13807. func (s PutBucketTaggingInput) GoString() string {
  13808. return s.String()
  13809. }
  13810. // Validate inspects the fields of the type to determine if they are valid.
  13811. func (s *PutBucketTaggingInput) Validate() error {
  13812. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  13813. if s.Bucket == nil {
  13814. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13815. }
  13816. if s.Tagging == nil {
  13817. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  13818. }
  13819. if s.Tagging != nil {
  13820. if err := s.Tagging.Validate(); err != nil {
  13821. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  13822. }
  13823. }
  13824. if invalidParams.Len() > 0 {
  13825. return invalidParams
  13826. }
  13827. return nil
  13828. }
  13829. // SetBucket sets the Bucket field's value.
  13830. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  13831. s.Bucket = &v
  13832. return s
  13833. }
  13834. // SetTagging sets the Tagging field's value.
  13835. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  13836. s.Tagging = v
  13837. return s
  13838. }
  13839. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingOutput
  13840. type PutBucketTaggingOutput struct {
  13841. _ struct{} `type:"structure"`
  13842. }
  13843. // String returns the string representation
  13844. func (s PutBucketTaggingOutput) String() string {
  13845. return awsutil.Prettify(s)
  13846. }
  13847. // GoString returns the string representation
  13848. func (s PutBucketTaggingOutput) GoString() string {
  13849. return s.String()
  13850. }
  13851. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningRequest
  13852. type PutBucketVersioningInput struct {
  13853. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  13854. // Bucket is a required field
  13855. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13856. // The concatenation of the authentication device's serial number, a space,
  13857. // and the value that is displayed on your authentication device.
  13858. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  13859. // VersioningConfiguration is a required field
  13860. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true"`
  13861. }
  13862. // String returns the string representation
  13863. func (s PutBucketVersioningInput) String() string {
  13864. return awsutil.Prettify(s)
  13865. }
  13866. // GoString returns the string representation
  13867. func (s PutBucketVersioningInput) GoString() string {
  13868. return s.String()
  13869. }
  13870. // Validate inspects the fields of the type to determine if they are valid.
  13871. func (s *PutBucketVersioningInput) Validate() error {
  13872. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  13873. if s.Bucket == nil {
  13874. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13875. }
  13876. if s.VersioningConfiguration == nil {
  13877. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  13878. }
  13879. if invalidParams.Len() > 0 {
  13880. return invalidParams
  13881. }
  13882. return nil
  13883. }
  13884. // SetBucket sets the Bucket field's value.
  13885. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  13886. s.Bucket = &v
  13887. return s
  13888. }
  13889. // SetMFA sets the MFA field's value.
  13890. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  13891. s.MFA = &v
  13892. return s
  13893. }
  13894. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  13895. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  13896. s.VersioningConfiguration = v
  13897. return s
  13898. }
  13899. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningOutput
  13900. type PutBucketVersioningOutput struct {
  13901. _ struct{} `type:"structure"`
  13902. }
  13903. // String returns the string representation
  13904. func (s PutBucketVersioningOutput) String() string {
  13905. return awsutil.Prettify(s)
  13906. }
  13907. // GoString returns the string representation
  13908. func (s PutBucketVersioningOutput) GoString() string {
  13909. return s.String()
  13910. }
  13911. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteRequest
  13912. type PutBucketWebsiteInput struct {
  13913. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  13914. // Bucket is a required field
  13915. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13916. // WebsiteConfiguration is a required field
  13917. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true"`
  13918. }
  13919. // String returns the string representation
  13920. func (s PutBucketWebsiteInput) String() string {
  13921. return awsutil.Prettify(s)
  13922. }
  13923. // GoString returns the string representation
  13924. func (s PutBucketWebsiteInput) GoString() string {
  13925. return s.String()
  13926. }
  13927. // Validate inspects the fields of the type to determine if they are valid.
  13928. func (s *PutBucketWebsiteInput) Validate() error {
  13929. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  13930. if s.Bucket == nil {
  13931. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13932. }
  13933. if s.WebsiteConfiguration == nil {
  13934. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  13935. }
  13936. if s.WebsiteConfiguration != nil {
  13937. if err := s.WebsiteConfiguration.Validate(); err != nil {
  13938. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  13939. }
  13940. }
  13941. if invalidParams.Len() > 0 {
  13942. return invalidParams
  13943. }
  13944. return nil
  13945. }
  13946. // SetBucket sets the Bucket field's value.
  13947. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  13948. s.Bucket = &v
  13949. return s
  13950. }
  13951. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  13952. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  13953. s.WebsiteConfiguration = v
  13954. return s
  13955. }
  13956. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteOutput
  13957. type PutBucketWebsiteOutput struct {
  13958. _ struct{} `type:"structure"`
  13959. }
  13960. // String returns the string representation
  13961. func (s PutBucketWebsiteOutput) String() string {
  13962. return awsutil.Prettify(s)
  13963. }
  13964. // GoString returns the string representation
  13965. func (s PutBucketWebsiteOutput) GoString() string {
  13966. return s.String()
  13967. }
  13968. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclRequest
  13969. type PutObjectAclInput struct {
  13970. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  13971. // The canned ACL to apply to the object.
  13972. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  13973. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure"`
  13974. // Bucket is a required field
  13975. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13976. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  13977. // bucket.
  13978. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  13979. // Allows grantee to list the objects in the bucket.
  13980. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  13981. // Allows grantee to read the bucket ACL.
  13982. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  13983. // Allows grantee to create, overwrite, and delete any object in the bucket.
  13984. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  13985. // Allows grantee to write the ACL for the applicable bucket.
  13986. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  13987. // Key is a required field
  13988. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  13989. // Confirms that the requester knows that she or he will be charged for the
  13990. // request. Bucket owners need not specify this parameter in their requests.
  13991. // Documentation on downloading objects from requester pays buckets can be found
  13992. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  13993. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  13994. // VersionId used to reference a specific version of the object.
  13995. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  13996. }
  13997. // String returns the string representation
  13998. func (s PutObjectAclInput) String() string {
  13999. return awsutil.Prettify(s)
  14000. }
  14001. // GoString returns the string representation
  14002. func (s PutObjectAclInput) GoString() string {
  14003. return s.String()
  14004. }
  14005. // Validate inspects the fields of the type to determine if they are valid.
  14006. func (s *PutObjectAclInput) Validate() error {
  14007. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  14008. if s.Bucket == nil {
  14009. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14010. }
  14011. if s.Key == nil {
  14012. invalidParams.Add(request.NewErrParamRequired("Key"))
  14013. }
  14014. if s.Key != nil && len(*s.Key) < 1 {
  14015. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14016. }
  14017. if s.AccessControlPolicy != nil {
  14018. if err := s.AccessControlPolicy.Validate(); err != nil {
  14019. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  14020. }
  14021. }
  14022. if invalidParams.Len() > 0 {
  14023. return invalidParams
  14024. }
  14025. return nil
  14026. }
  14027. // SetACL sets the ACL field's value.
  14028. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  14029. s.ACL = &v
  14030. return s
  14031. }
  14032. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  14033. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  14034. s.AccessControlPolicy = v
  14035. return s
  14036. }
  14037. // SetBucket sets the Bucket field's value.
  14038. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  14039. s.Bucket = &v
  14040. return s
  14041. }
  14042. // SetGrantFullControl sets the GrantFullControl field's value.
  14043. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  14044. s.GrantFullControl = &v
  14045. return s
  14046. }
  14047. // SetGrantRead sets the GrantRead field's value.
  14048. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  14049. s.GrantRead = &v
  14050. return s
  14051. }
  14052. // SetGrantReadACP sets the GrantReadACP field's value.
  14053. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  14054. s.GrantReadACP = &v
  14055. return s
  14056. }
  14057. // SetGrantWrite sets the GrantWrite field's value.
  14058. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  14059. s.GrantWrite = &v
  14060. return s
  14061. }
  14062. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14063. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  14064. s.GrantWriteACP = &v
  14065. return s
  14066. }
  14067. // SetKey sets the Key field's value.
  14068. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  14069. s.Key = &v
  14070. return s
  14071. }
  14072. // SetRequestPayer sets the RequestPayer field's value.
  14073. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  14074. s.RequestPayer = &v
  14075. return s
  14076. }
  14077. // SetVersionId sets the VersionId field's value.
  14078. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  14079. s.VersionId = &v
  14080. return s
  14081. }
  14082. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclOutput
  14083. type PutObjectAclOutput struct {
  14084. _ struct{} `type:"structure"`
  14085. // If present, indicates that the requester was successfully charged for the
  14086. // request.
  14087. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14088. }
  14089. // String returns the string representation
  14090. func (s PutObjectAclOutput) String() string {
  14091. return awsutil.Prettify(s)
  14092. }
  14093. // GoString returns the string representation
  14094. func (s PutObjectAclOutput) GoString() string {
  14095. return s.String()
  14096. }
  14097. // SetRequestCharged sets the RequestCharged field's value.
  14098. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  14099. s.RequestCharged = &v
  14100. return s
  14101. }
  14102. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRequest
  14103. type PutObjectInput struct {
  14104. _ struct{} `type:"structure" payload:"Body"`
  14105. // The canned ACL to apply to the object.
  14106. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  14107. // Object data.
  14108. Body io.ReadSeeker `type:"blob"`
  14109. // Name of the bucket to which the PUT operation was initiated.
  14110. //
  14111. // Bucket is a required field
  14112. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14113. // Specifies caching behavior along the request/reply chain.
  14114. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  14115. // Specifies presentational information for the object.
  14116. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  14117. // Specifies what content encodings have been applied to the object and thus
  14118. // what decoding mechanisms must be applied to obtain the media-type referenced
  14119. // by the Content-Type header field.
  14120. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  14121. // The language the content is in.
  14122. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  14123. // Size of the body in bytes. This parameter is useful when the size of the
  14124. // body cannot be determined automatically.
  14125. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  14126. // A standard MIME type describing the format of the object data.
  14127. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  14128. // The date and time at which the object is no longer cacheable.
  14129. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  14130. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  14131. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  14132. // Allows grantee to read the object data and its metadata.
  14133. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  14134. // Allows grantee to read the object ACL.
  14135. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  14136. // Allows grantee to write the ACL for the applicable object.
  14137. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  14138. // Object key for which the PUT operation was initiated.
  14139. //
  14140. // Key is a required field
  14141. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14142. // A map of metadata to store with the object in S3.
  14143. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  14144. // Confirms that the requester knows that she or he will be charged for the
  14145. // request. Bucket owners need not specify this parameter in their requests.
  14146. // Documentation on downloading objects from requester pays buckets can be found
  14147. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14148. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14149. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  14150. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  14151. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  14152. // data. This value is used to store the object and then it is discarded; Amazon
  14153. // does not store the encryption key. The key must be appropriate for use with
  14154. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  14155. // header.
  14156. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  14157. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  14158. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  14159. // key was transmitted without error.
  14160. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  14161. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  14162. // requests for an object protected by AWS KMS will fail if not made via SSL
  14163. // or using SigV4. Documentation on configuring any of the officially supported
  14164. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  14165. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  14166. // The Server-side encryption algorithm used when storing this object in S3
  14167. // (e.g., AES256, aws:kms).
  14168. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  14169. // The type of storage to use for the object. Defaults to 'STANDARD'.
  14170. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  14171. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  14172. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  14173. // If the bucket is configured as a website, redirects requests for this object
  14174. // to another object in the same bucket or to an external URL. Amazon S3 stores
  14175. // the value of this header in the object metadata.
  14176. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  14177. }
  14178. // String returns the string representation
  14179. func (s PutObjectInput) String() string {
  14180. return awsutil.Prettify(s)
  14181. }
  14182. // GoString returns the string representation
  14183. func (s PutObjectInput) GoString() string {
  14184. return s.String()
  14185. }
  14186. // Validate inspects the fields of the type to determine if they are valid.
  14187. func (s *PutObjectInput) Validate() error {
  14188. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  14189. if s.Bucket == nil {
  14190. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14191. }
  14192. if s.Key == nil {
  14193. invalidParams.Add(request.NewErrParamRequired("Key"))
  14194. }
  14195. if s.Key != nil && len(*s.Key) < 1 {
  14196. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14197. }
  14198. if invalidParams.Len() > 0 {
  14199. return invalidParams
  14200. }
  14201. return nil
  14202. }
  14203. // SetACL sets the ACL field's value.
  14204. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  14205. s.ACL = &v
  14206. return s
  14207. }
  14208. // SetBody sets the Body field's value.
  14209. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  14210. s.Body = v
  14211. return s
  14212. }
  14213. // SetBucket sets the Bucket field's value.
  14214. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  14215. s.Bucket = &v
  14216. return s
  14217. }
  14218. // SetCacheControl sets the CacheControl field's value.
  14219. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  14220. s.CacheControl = &v
  14221. return s
  14222. }
  14223. // SetContentDisposition sets the ContentDisposition field's value.
  14224. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  14225. s.ContentDisposition = &v
  14226. return s
  14227. }
  14228. // SetContentEncoding sets the ContentEncoding field's value.
  14229. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  14230. s.ContentEncoding = &v
  14231. return s
  14232. }
  14233. // SetContentLanguage sets the ContentLanguage field's value.
  14234. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  14235. s.ContentLanguage = &v
  14236. return s
  14237. }
  14238. // SetContentLength sets the ContentLength field's value.
  14239. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  14240. s.ContentLength = &v
  14241. return s
  14242. }
  14243. // SetContentType sets the ContentType field's value.
  14244. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  14245. s.ContentType = &v
  14246. return s
  14247. }
  14248. // SetExpires sets the Expires field's value.
  14249. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  14250. s.Expires = &v
  14251. return s
  14252. }
  14253. // SetGrantFullControl sets the GrantFullControl field's value.
  14254. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  14255. s.GrantFullControl = &v
  14256. return s
  14257. }
  14258. // SetGrantRead sets the GrantRead field's value.
  14259. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  14260. s.GrantRead = &v
  14261. return s
  14262. }
  14263. // SetGrantReadACP sets the GrantReadACP field's value.
  14264. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  14265. s.GrantReadACP = &v
  14266. return s
  14267. }
  14268. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14269. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  14270. s.GrantWriteACP = &v
  14271. return s
  14272. }
  14273. // SetKey sets the Key field's value.
  14274. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  14275. s.Key = &v
  14276. return s
  14277. }
  14278. // SetMetadata sets the Metadata field's value.
  14279. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  14280. s.Metadata = v
  14281. return s
  14282. }
  14283. // SetRequestPayer sets the RequestPayer field's value.
  14284. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  14285. s.RequestPayer = &v
  14286. return s
  14287. }
  14288. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  14289. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  14290. s.SSECustomerAlgorithm = &v
  14291. return s
  14292. }
  14293. // SetSSECustomerKey sets the SSECustomerKey field's value.
  14294. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  14295. s.SSECustomerKey = &v
  14296. return s
  14297. }
  14298. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  14299. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  14300. s.SSECustomerKeyMD5 = &v
  14301. return s
  14302. }
  14303. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  14304. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  14305. s.SSEKMSKeyId = &v
  14306. return s
  14307. }
  14308. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  14309. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  14310. s.ServerSideEncryption = &v
  14311. return s
  14312. }
  14313. // SetStorageClass sets the StorageClass field's value.
  14314. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  14315. s.StorageClass = &v
  14316. return s
  14317. }
  14318. // SetTagging sets the Tagging field's value.
  14319. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  14320. s.Tagging = &v
  14321. return s
  14322. }
  14323. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  14324. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  14325. s.WebsiteRedirectLocation = &v
  14326. return s
  14327. }
  14328. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectOutput
  14329. type PutObjectOutput struct {
  14330. _ struct{} `type:"structure"`
  14331. // Entity tag for the uploaded object.
  14332. ETag *string `location:"header" locationName:"ETag" type:"string"`
  14333. // If the object expiration is configured, this will contain the expiration
  14334. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  14335. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  14336. // If present, indicates that the requester was successfully charged for the
  14337. // request.
  14338. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14339. // If server-side encryption with a customer-provided encryption key was requested,
  14340. // the response will include this header confirming the encryption algorithm
  14341. // used.
  14342. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  14343. // If server-side encryption with a customer-provided encryption key was requested,
  14344. // the response will include this header to provide round trip message integrity
  14345. // verification of the customer-provided encryption key.
  14346. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  14347. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  14348. // encryption key that was used for the object.
  14349. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  14350. // The Server-side encryption algorithm used when storing this object in S3
  14351. // (e.g., AES256, aws:kms).
  14352. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  14353. // Version of the object.
  14354. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  14355. }
  14356. // String returns the string representation
  14357. func (s PutObjectOutput) String() string {
  14358. return awsutil.Prettify(s)
  14359. }
  14360. // GoString returns the string representation
  14361. func (s PutObjectOutput) GoString() string {
  14362. return s.String()
  14363. }
  14364. // SetETag sets the ETag field's value.
  14365. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  14366. s.ETag = &v
  14367. return s
  14368. }
  14369. // SetExpiration sets the Expiration field's value.
  14370. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  14371. s.Expiration = &v
  14372. return s
  14373. }
  14374. // SetRequestCharged sets the RequestCharged field's value.
  14375. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  14376. s.RequestCharged = &v
  14377. return s
  14378. }
  14379. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  14380. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  14381. s.SSECustomerAlgorithm = &v
  14382. return s
  14383. }
  14384. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  14385. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  14386. s.SSECustomerKeyMD5 = &v
  14387. return s
  14388. }
  14389. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  14390. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  14391. s.SSEKMSKeyId = &v
  14392. return s
  14393. }
  14394. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  14395. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  14396. s.ServerSideEncryption = &v
  14397. return s
  14398. }
  14399. // SetVersionId sets the VersionId field's value.
  14400. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  14401. s.VersionId = &v
  14402. return s
  14403. }
  14404. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest
  14405. type PutObjectTaggingInput struct {
  14406. _ struct{} `type:"structure" payload:"Tagging"`
  14407. // Bucket is a required field
  14408. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14409. // Key is a required field
  14410. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14411. // Tagging is a required field
  14412. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true"`
  14413. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  14414. }
  14415. // String returns the string representation
  14416. func (s PutObjectTaggingInput) String() string {
  14417. return awsutil.Prettify(s)
  14418. }
  14419. // GoString returns the string representation
  14420. func (s PutObjectTaggingInput) GoString() string {
  14421. return s.String()
  14422. }
  14423. // Validate inspects the fields of the type to determine if they are valid.
  14424. func (s *PutObjectTaggingInput) Validate() error {
  14425. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  14426. if s.Bucket == nil {
  14427. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14428. }
  14429. if s.Key == nil {
  14430. invalidParams.Add(request.NewErrParamRequired("Key"))
  14431. }
  14432. if s.Key != nil && len(*s.Key) < 1 {
  14433. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14434. }
  14435. if s.Tagging == nil {
  14436. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  14437. }
  14438. if s.Tagging != nil {
  14439. if err := s.Tagging.Validate(); err != nil {
  14440. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14441. }
  14442. }
  14443. if invalidParams.Len() > 0 {
  14444. return invalidParams
  14445. }
  14446. return nil
  14447. }
  14448. // SetBucket sets the Bucket field's value.
  14449. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  14450. s.Bucket = &v
  14451. return s
  14452. }
  14453. // SetKey sets the Key field's value.
  14454. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  14455. s.Key = &v
  14456. return s
  14457. }
  14458. // SetTagging sets the Tagging field's value.
  14459. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  14460. s.Tagging = v
  14461. return s
  14462. }
  14463. // SetVersionId sets the VersionId field's value.
  14464. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  14465. s.VersionId = &v
  14466. return s
  14467. }
  14468. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingOutput
  14469. type PutObjectTaggingOutput struct {
  14470. _ struct{} `type:"structure"`
  14471. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  14472. }
  14473. // String returns the string representation
  14474. func (s PutObjectTaggingOutput) String() string {
  14475. return awsutil.Prettify(s)
  14476. }
  14477. // GoString returns the string representation
  14478. func (s PutObjectTaggingOutput) GoString() string {
  14479. return s.String()
  14480. }
  14481. // SetVersionId sets the VersionId field's value.
  14482. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  14483. s.VersionId = &v
  14484. return s
  14485. }
  14486. // Container for specifying an configuration when you want Amazon S3 to publish
  14487. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  14488. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfiguration
  14489. type QueueConfiguration struct {
  14490. _ struct{} `type:"structure"`
  14491. // Events is a required field
  14492. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  14493. // Container for object key name filtering rules. For information about key
  14494. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  14495. Filter *NotificationConfigurationFilter `type:"structure"`
  14496. // Optional unique identifier for configurations in a notification configuration.
  14497. // If you don't provide one, Amazon S3 will assign an ID.
  14498. Id *string `type:"string"`
  14499. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  14500. // events of specified type.
  14501. //
  14502. // QueueArn is a required field
  14503. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  14504. }
  14505. // String returns the string representation
  14506. func (s QueueConfiguration) String() string {
  14507. return awsutil.Prettify(s)
  14508. }
  14509. // GoString returns the string representation
  14510. func (s QueueConfiguration) GoString() string {
  14511. return s.String()
  14512. }
  14513. // Validate inspects the fields of the type to determine if they are valid.
  14514. func (s *QueueConfiguration) Validate() error {
  14515. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  14516. if s.Events == nil {
  14517. invalidParams.Add(request.NewErrParamRequired("Events"))
  14518. }
  14519. if s.QueueArn == nil {
  14520. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  14521. }
  14522. if invalidParams.Len() > 0 {
  14523. return invalidParams
  14524. }
  14525. return nil
  14526. }
  14527. // SetEvents sets the Events field's value.
  14528. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  14529. s.Events = v
  14530. return s
  14531. }
  14532. // SetFilter sets the Filter field's value.
  14533. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  14534. s.Filter = v
  14535. return s
  14536. }
  14537. // SetId sets the Id field's value.
  14538. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  14539. s.Id = &v
  14540. return s
  14541. }
  14542. // SetQueueArn sets the QueueArn field's value.
  14543. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  14544. s.QueueArn = &v
  14545. return s
  14546. }
  14547. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfigurationDeprecated
  14548. type QueueConfigurationDeprecated struct {
  14549. _ struct{} `type:"structure"`
  14550. // Bucket event for which to send notifications.
  14551. Event *string `deprecated:"true" type:"string" enum:"Event"`
  14552. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  14553. // Optional unique identifier for configurations in a notification configuration.
  14554. // If you don't provide one, Amazon S3 will assign an ID.
  14555. Id *string `type:"string"`
  14556. Queue *string `type:"string"`
  14557. }
  14558. // String returns the string representation
  14559. func (s QueueConfigurationDeprecated) String() string {
  14560. return awsutil.Prettify(s)
  14561. }
  14562. // GoString returns the string representation
  14563. func (s QueueConfigurationDeprecated) GoString() string {
  14564. return s.String()
  14565. }
  14566. // SetEvent sets the Event field's value.
  14567. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  14568. s.Event = &v
  14569. return s
  14570. }
  14571. // SetEvents sets the Events field's value.
  14572. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  14573. s.Events = v
  14574. return s
  14575. }
  14576. // SetId sets the Id field's value.
  14577. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  14578. s.Id = &v
  14579. return s
  14580. }
  14581. // SetQueue sets the Queue field's value.
  14582. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  14583. s.Queue = &v
  14584. return s
  14585. }
  14586. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect
  14587. type Redirect struct {
  14588. _ struct{} `type:"structure"`
  14589. // The host name to use in the redirect request.
  14590. HostName *string `type:"string"`
  14591. // The HTTP redirect code to use on the response. Not required if one of the
  14592. // siblings is present.
  14593. HttpRedirectCode *string `type:"string"`
  14594. // Protocol to use (http, https) when redirecting requests. The default is the
  14595. // protocol that is used in the original request.
  14596. Protocol *string `type:"string" enum:"Protocol"`
  14597. // The object key prefix to use in the redirect request. For example, to redirect
  14598. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  14599. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  14600. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  14601. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  14602. // is not provided.
  14603. ReplaceKeyPrefixWith *string `type:"string"`
  14604. // The specific object key to use in the redirect request. For example, redirect
  14605. // request to error.html. Not required if one of the sibling is present. Can
  14606. // be present only if ReplaceKeyPrefixWith is not provided.
  14607. ReplaceKeyWith *string `type:"string"`
  14608. }
  14609. // String returns the string representation
  14610. func (s Redirect) String() string {
  14611. return awsutil.Prettify(s)
  14612. }
  14613. // GoString returns the string representation
  14614. func (s Redirect) GoString() string {
  14615. return s.String()
  14616. }
  14617. // SetHostName sets the HostName field's value.
  14618. func (s *Redirect) SetHostName(v string) *Redirect {
  14619. s.HostName = &v
  14620. return s
  14621. }
  14622. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  14623. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  14624. s.HttpRedirectCode = &v
  14625. return s
  14626. }
  14627. // SetProtocol sets the Protocol field's value.
  14628. func (s *Redirect) SetProtocol(v string) *Redirect {
  14629. s.Protocol = &v
  14630. return s
  14631. }
  14632. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  14633. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  14634. s.ReplaceKeyPrefixWith = &v
  14635. return s
  14636. }
  14637. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  14638. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  14639. s.ReplaceKeyWith = &v
  14640. return s
  14641. }
  14642. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RedirectAllRequestsTo
  14643. type RedirectAllRequestsTo struct {
  14644. _ struct{} `type:"structure"`
  14645. // Name of the host where requests will be redirected.
  14646. //
  14647. // HostName is a required field
  14648. HostName *string `type:"string" required:"true"`
  14649. // Protocol to use (http, https) when redirecting requests. The default is the
  14650. // protocol that is used in the original request.
  14651. Protocol *string `type:"string" enum:"Protocol"`
  14652. }
  14653. // String returns the string representation
  14654. func (s RedirectAllRequestsTo) String() string {
  14655. return awsutil.Prettify(s)
  14656. }
  14657. // GoString returns the string representation
  14658. func (s RedirectAllRequestsTo) GoString() string {
  14659. return s.String()
  14660. }
  14661. // Validate inspects the fields of the type to determine if they are valid.
  14662. func (s *RedirectAllRequestsTo) Validate() error {
  14663. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  14664. if s.HostName == nil {
  14665. invalidParams.Add(request.NewErrParamRequired("HostName"))
  14666. }
  14667. if invalidParams.Len() > 0 {
  14668. return invalidParams
  14669. }
  14670. return nil
  14671. }
  14672. // SetHostName sets the HostName field's value.
  14673. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  14674. s.HostName = &v
  14675. return s
  14676. }
  14677. // SetProtocol sets the Protocol field's value.
  14678. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  14679. s.Protocol = &v
  14680. return s
  14681. }
  14682. // Container for replication rules. You can add as many as 1,000 rules. Total
  14683. // replication configuration size can be up to 2 MB.
  14684. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration
  14685. type ReplicationConfiguration struct {
  14686. _ struct{} `type:"structure"`
  14687. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  14688. // the objects.
  14689. //
  14690. // Role is a required field
  14691. Role *string `type:"string" required:"true"`
  14692. // Container for information about a particular replication rule. Replication
  14693. // configuration must have at least one rule and can contain up to 1,000 rules.
  14694. //
  14695. // Rules is a required field
  14696. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  14697. }
  14698. // String returns the string representation
  14699. func (s ReplicationConfiguration) String() string {
  14700. return awsutil.Prettify(s)
  14701. }
  14702. // GoString returns the string representation
  14703. func (s ReplicationConfiguration) GoString() string {
  14704. return s.String()
  14705. }
  14706. // Validate inspects the fields of the type to determine if they are valid.
  14707. func (s *ReplicationConfiguration) Validate() error {
  14708. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  14709. if s.Role == nil {
  14710. invalidParams.Add(request.NewErrParamRequired("Role"))
  14711. }
  14712. if s.Rules == nil {
  14713. invalidParams.Add(request.NewErrParamRequired("Rules"))
  14714. }
  14715. if s.Rules != nil {
  14716. for i, v := range s.Rules {
  14717. if v == nil {
  14718. continue
  14719. }
  14720. if err := v.Validate(); err != nil {
  14721. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  14722. }
  14723. }
  14724. }
  14725. if invalidParams.Len() > 0 {
  14726. return invalidParams
  14727. }
  14728. return nil
  14729. }
  14730. // SetRole sets the Role field's value.
  14731. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  14732. s.Role = &v
  14733. return s
  14734. }
  14735. // SetRules sets the Rules field's value.
  14736. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  14737. s.Rules = v
  14738. return s
  14739. }
  14740. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule
  14741. type ReplicationRule struct {
  14742. _ struct{} `type:"structure"`
  14743. // Destination is a required field
  14744. Destination *Destination `type:"structure" required:"true"`
  14745. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  14746. ID *string `type:"string"`
  14747. // Object keyname prefix identifying one or more objects to which the rule applies.
  14748. // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes
  14749. // are not supported.
  14750. //
  14751. // Prefix is a required field
  14752. Prefix *string `type:"string" required:"true"`
  14753. // The rule is ignored if status is not Enabled.
  14754. //
  14755. // Status is a required field
  14756. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  14757. }
  14758. // String returns the string representation
  14759. func (s ReplicationRule) String() string {
  14760. return awsutil.Prettify(s)
  14761. }
  14762. // GoString returns the string representation
  14763. func (s ReplicationRule) GoString() string {
  14764. return s.String()
  14765. }
  14766. // Validate inspects the fields of the type to determine if they are valid.
  14767. func (s *ReplicationRule) Validate() error {
  14768. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  14769. if s.Destination == nil {
  14770. invalidParams.Add(request.NewErrParamRequired("Destination"))
  14771. }
  14772. if s.Prefix == nil {
  14773. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  14774. }
  14775. if s.Status == nil {
  14776. invalidParams.Add(request.NewErrParamRequired("Status"))
  14777. }
  14778. if s.Destination != nil {
  14779. if err := s.Destination.Validate(); err != nil {
  14780. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  14781. }
  14782. }
  14783. if invalidParams.Len() > 0 {
  14784. return invalidParams
  14785. }
  14786. return nil
  14787. }
  14788. // SetDestination sets the Destination field's value.
  14789. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  14790. s.Destination = v
  14791. return s
  14792. }
  14793. // SetID sets the ID field's value.
  14794. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  14795. s.ID = &v
  14796. return s
  14797. }
  14798. // SetPrefix sets the Prefix field's value.
  14799. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  14800. s.Prefix = &v
  14801. return s
  14802. }
  14803. // SetStatus sets the Status field's value.
  14804. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  14805. s.Status = &v
  14806. return s
  14807. }
  14808. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RequestPaymentConfiguration
  14809. type RequestPaymentConfiguration struct {
  14810. _ struct{} `type:"structure"`
  14811. // Specifies who pays for the download and request fees.
  14812. //
  14813. // Payer is a required field
  14814. Payer *string `type:"string" required:"true" enum:"Payer"`
  14815. }
  14816. // String returns the string representation
  14817. func (s RequestPaymentConfiguration) String() string {
  14818. return awsutil.Prettify(s)
  14819. }
  14820. // GoString returns the string representation
  14821. func (s RequestPaymentConfiguration) GoString() string {
  14822. return s.String()
  14823. }
  14824. // Validate inspects the fields of the type to determine if they are valid.
  14825. func (s *RequestPaymentConfiguration) Validate() error {
  14826. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  14827. if s.Payer == nil {
  14828. invalidParams.Add(request.NewErrParamRequired("Payer"))
  14829. }
  14830. if invalidParams.Len() > 0 {
  14831. return invalidParams
  14832. }
  14833. return nil
  14834. }
  14835. // SetPayer sets the Payer field's value.
  14836. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  14837. s.Payer = &v
  14838. return s
  14839. }
  14840. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectRequest
  14841. type RestoreObjectInput struct {
  14842. _ struct{} `type:"structure" payload:"RestoreRequest"`
  14843. // Bucket is a required field
  14844. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14845. // Key is a required field
  14846. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14847. // Confirms that the requester knows that she or he will be charged for the
  14848. // request. Bucket owners need not specify this parameter in their requests.
  14849. // Documentation on downloading objects from requester pays buckets can be found
  14850. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14851. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14852. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure"`
  14853. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  14854. }
  14855. // String returns the string representation
  14856. func (s RestoreObjectInput) String() string {
  14857. return awsutil.Prettify(s)
  14858. }
  14859. // GoString returns the string representation
  14860. func (s RestoreObjectInput) GoString() string {
  14861. return s.String()
  14862. }
  14863. // Validate inspects the fields of the type to determine if they are valid.
  14864. func (s *RestoreObjectInput) Validate() error {
  14865. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  14866. if s.Bucket == nil {
  14867. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14868. }
  14869. if s.Key == nil {
  14870. invalidParams.Add(request.NewErrParamRequired("Key"))
  14871. }
  14872. if s.Key != nil && len(*s.Key) < 1 {
  14873. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14874. }
  14875. if s.RestoreRequest != nil {
  14876. if err := s.RestoreRequest.Validate(); err != nil {
  14877. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  14878. }
  14879. }
  14880. if invalidParams.Len() > 0 {
  14881. return invalidParams
  14882. }
  14883. return nil
  14884. }
  14885. // SetBucket sets the Bucket field's value.
  14886. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  14887. s.Bucket = &v
  14888. return s
  14889. }
  14890. // SetKey sets the Key field's value.
  14891. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  14892. s.Key = &v
  14893. return s
  14894. }
  14895. // SetRequestPayer sets the RequestPayer field's value.
  14896. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  14897. s.RequestPayer = &v
  14898. return s
  14899. }
  14900. // SetRestoreRequest sets the RestoreRequest field's value.
  14901. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  14902. s.RestoreRequest = v
  14903. return s
  14904. }
  14905. // SetVersionId sets the VersionId field's value.
  14906. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  14907. s.VersionId = &v
  14908. return s
  14909. }
  14910. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectOutput
  14911. type RestoreObjectOutput struct {
  14912. _ struct{} `type:"structure"`
  14913. // If present, indicates that the requester was successfully charged for the
  14914. // request.
  14915. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14916. }
  14917. // String returns the string representation
  14918. func (s RestoreObjectOutput) String() string {
  14919. return awsutil.Prettify(s)
  14920. }
  14921. // GoString returns the string representation
  14922. func (s RestoreObjectOutput) GoString() string {
  14923. return s.String()
  14924. }
  14925. // SetRequestCharged sets the RequestCharged field's value.
  14926. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  14927. s.RequestCharged = &v
  14928. return s
  14929. }
  14930. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreRequest
  14931. type RestoreRequest struct {
  14932. _ struct{} `type:"structure"`
  14933. // Lifetime of the active copy in days
  14934. //
  14935. // Days is a required field
  14936. Days *int64 `type:"integer" required:"true"`
  14937. // Glacier related prameters pertaining to this job.
  14938. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  14939. }
  14940. // String returns the string representation
  14941. func (s RestoreRequest) String() string {
  14942. return awsutil.Prettify(s)
  14943. }
  14944. // GoString returns the string representation
  14945. func (s RestoreRequest) GoString() string {
  14946. return s.String()
  14947. }
  14948. // Validate inspects the fields of the type to determine if they are valid.
  14949. func (s *RestoreRequest) Validate() error {
  14950. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  14951. if s.Days == nil {
  14952. invalidParams.Add(request.NewErrParamRequired("Days"))
  14953. }
  14954. if s.GlacierJobParameters != nil {
  14955. if err := s.GlacierJobParameters.Validate(); err != nil {
  14956. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  14957. }
  14958. }
  14959. if invalidParams.Len() > 0 {
  14960. return invalidParams
  14961. }
  14962. return nil
  14963. }
  14964. // SetDays sets the Days field's value.
  14965. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  14966. s.Days = &v
  14967. return s
  14968. }
  14969. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  14970. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  14971. s.GlacierJobParameters = v
  14972. return s
  14973. }
  14974. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RoutingRule
  14975. type RoutingRule struct {
  14976. _ struct{} `type:"structure"`
  14977. // A container for describing a condition that must be met for the specified
  14978. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  14979. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  14980. // redirect request to another host where you might process the error.
  14981. Condition *Condition `type:"structure"`
  14982. // Container for redirect information. You can redirect requests to another
  14983. // host, to another page, or with another protocol. In the event of an error,
  14984. // you can can specify a different error code to return.
  14985. //
  14986. // Redirect is a required field
  14987. Redirect *Redirect `type:"structure" required:"true"`
  14988. }
  14989. // String returns the string representation
  14990. func (s RoutingRule) String() string {
  14991. return awsutil.Prettify(s)
  14992. }
  14993. // GoString returns the string representation
  14994. func (s RoutingRule) GoString() string {
  14995. return s.String()
  14996. }
  14997. // Validate inspects the fields of the type to determine if they are valid.
  14998. func (s *RoutingRule) Validate() error {
  14999. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  15000. if s.Redirect == nil {
  15001. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  15002. }
  15003. if invalidParams.Len() > 0 {
  15004. return invalidParams
  15005. }
  15006. return nil
  15007. }
  15008. // SetCondition sets the Condition field's value.
  15009. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  15010. s.Condition = v
  15011. return s
  15012. }
  15013. // SetRedirect sets the Redirect field's value.
  15014. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  15015. s.Redirect = v
  15016. return s
  15017. }
  15018. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Rule
  15019. type Rule struct {
  15020. _ struct{} `type:"structure"`
  15021. // Specifies the days since the initiation of an Incomplete Multipart Upload
  15022. // that Lifecycle will wait before permanently removing all parts of the upload.
  15023. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  15024. Expiration *LifecycleExpiration `type:"structure"`
  15025. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  15026. ID *string `type:"string"`
  15027. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  15028. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  15029. // configuration action on a bucket that has versioning enabled (or suspended)
  15030. // to request that Amazon S3 delete noncurrent object versions at a specific
  15031. // period in the object's lifetime.
  15032. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  15033. // Container for the transition rule that describes when noncurrent objects
  15034. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  15035. // versioning-enabled (or versioning is suspended), you can set this action
  15036. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  15037. // or GLACIER storage class at a specific period in the object's lifetime.
  15038. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  15039. // Prefix identifying one or more objects to which the rule applies.
  15040. //
  15041. // Prefix is a required field
  15042. Prefix *string `type:"string" required:"true"`
  15043. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  15044. // is not currently being applied.
  15045. //
  15046. // Status is a required field
  15047. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  15048. Transition *Transition `type:"structure"`
  15049. }
  15050. // String returns the string representation
  15051. func (s Rule) String() string {
  15052. return awsutil.Prettify(s)
  15053. }
  15054. // GoString returns the string representation
  15055. func (s Rule) GoString() string {
  15056. return s.String()
  15057. }
  15058. // Validate inspects the fields of the type to determine if they are valid.
  15059. func (s *Rule) Validate() error {
  15060. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  15061. if s.Prefix == nil {
  15062. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  15063. }
  15064. if s.Status == nil {
  15065. invalidParams.Add(request.NewErrParamRequired("Status"))
  15066. }
  15067. if invalidParams.Len() > 0 {
  15068. return invalidParams
  15069. }
  15070. return nil
  15071. }
  15072. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  15073. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  15074. s.AbortIncompleteMultipartUpload = v
  15075. return s
  15076. }
  15077. // SetExpiration sets the Expiration field's value.
  15078. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  15079. s.Expiration = v
  15080. return s
  15081. }
  15082. // SetID sets the ID field's value.
  15083. func (s *Rule) SetID(v string) *Rule {
  15084. s.ID = &v
  15085. return s
  15086. }
  15087. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  15088. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  15089. s.NoncurrentVersionExpiration = v
  15090. return s
  15091. }
  15092. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  15093. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  15094. s.NoncurrentVersionTransition = v
  15095. return s
  15096. }
  15097. // SetPrefix sets the Prefix field's value.
  15098. func (s *Rule) SetPrefix(v string) *Rule {
  15099. s.Prefix = &v
  15100. return s
  15101. }
  15102. // SetStatus sets the Status field's value.
  15103. func (s *Rule) SetStatus(v string) *Rule {
  15104. s.Status = &v
  15105. return s
  15106. }
  15107. // SetTransition sets the Transition field's value.
  15108. func (s *Rule) SetTransition(v *Transition) *Rule {
  15109. s.Transition = v
  15110. return s
  15111. }
  15112. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis
  15113. type StorageClassAnalysis struct {
  15114. _ struct{} `type:"structure"`
  15115. // A container used to describe how data related to the storage class analysis
  15116. // should be exported.
  15117. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  15118. }
  15119. // String returns the string representation
  15120. func (s StorageClassAnalysis) String() string {
  15121. return awsutil.Prettify(s)
  15122. }
  15123. // GoString returns the string representation
  15124. func (s StorageClassAnalysis) GoString() string {
  15125. return s.String()
  15126. }
  15127. // Validate inspects the fields of the type to determine if they are valid.
  15128. func (s *StorageClassAnalysis) Validate() error {
  15129. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  15130. if s.DataExport != nil {
  15131. if err := s.DataExport.Validate(); err != nil {
  15132. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  15133. }
  15134. }
  15135. if invalidParams.Len() > 0 {
  15136. return invalidParams
  15137. }
  15138. return nil
  15139. }
  15140. // SetDataExport sets the DataExport field's value.
  15141. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  15142. s.DataExport = v
  15143. return s
  15144. }
  15145. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysisDataExport
  15146. type StorageClassAnalysisDataExport struct {
  15147. _ struct{} `type:"structure"`
  15148. // The place to store the data for an analysis.
  15149. //
  15150. // Destination is a required field
  15151. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  15152. // The version of the output schema to use when exporting data. Must be V_1.
  15153. //
  15154. // OutputSchemaVersion is a required field
  15155. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  15156. }
  15157. // String returns the string representation
  15158. func (s StorageClassAnalysisDataExport) String() string {
  15159. return awsutil.Prettify(s)
  15160. }
  15161. // GoString returns the string representation
  15162. func (s StorageClassAnalysisDataExport) GoString() string {
  15163. return s.String()
  15164. }
  15165. // Validate inspects the fields of the type to determine if they are valid.
  15166. func (s *StorageClassAnalysisDataExport) Validate() error {
  15167. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  15168. if s.Destination == nil {
  15169. invalidParams.Add(request.NewErrParamRequired("Destination"))
  15170. }
  15171. if s.OutputSchemaVersion == nil {
  15172. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  15173. }
  15174. if s.Destination != nil {
  15175. if err := s.Destination.Validate(); err != nil {
  15176. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  15177. }
  15178. }
  15179. if invalidParams.Len() > 0 {
  15180. return invalidParams
  15181. }
  15182. return nil
  15183. }
  15184. // SetDestination sets the Destination field's value.
  15185. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  15186. s.Destination = v
  15187. return s
  15188. }
  15189. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  15190. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  15191. s.OutputSchemaVersion = &v
  15192. return s
  15193. }
  15194. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag
  15195. type Tag struct {
  15196. _ struct{} `type:"structure"`
  15197. // Name of the tag.
  15198. //
  15199. // Key is a required field
  15200. Key *string `min:"1" type:"string" required:"true"`
  15201. // Value of the tag.
  15202. //
  15203. // Value is a required field
  15204. Value *string `type:"string" required:"true"`
  15205. }
  15206. // String returns the string representation
  15207. func (s Tag) String() string {
  15208. return awsutil.Prettify(s)
  15209. }
  15210. // GoString returns the string representation
  15211. func (s Tag) GoString() string {
  15212. return s.String()
  15213. }
  15214. // Validate inspects the fields of the type to determine if they are valid.
  15215. func (s *Tag) Validate() error {
  15216. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  15217. if s.Key == nil {
  15218. invalidParams.Add(request.NewErrParamRequired("Key"))
  15219. }
  15220. if s.Key != nil && len(*s.Key) < 1 {
  15221. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15222. }
  15223. if s.Value == nil {
  15224. invalidParams.Add(request.NewErrParamRequired("Value"))
  15225. }
  15226. if invalidParams.Len() > 0 {
  15227. return invalidParams
  15228. }
  15229. return nil
  15230. }
  15231. // SetKey sets the Key field's value.
  15232. func (s *Tag) SetKey(v string) *Tag {
  15233. s.Key = &v
  15234. return s
  15235. }
  15236. // SetValue sets the Value field's value.
  15237. func (s *Tag) SetValue(v string) *Tag {
  15238. s.Value = &v
  15239. return s
  15240. }
  15241. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging
  15242. type Tagging struct {
  15243. _ struct{} `type:"structure"`
  15244. // TagSet is a required field
  15245. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  15246. }
  15247. // String returns the string representation
  15248. func (s Tagging) String() string {
  15249. return awsutil.Prettify(s)
  15250. }
  15251. // GoString returns the string representation
  15252. func (s Tagging) GoString() string {
  15253. return s.String()
  15254. }
  15255. // Validate inspects the fields of the type to determine if they are valid.
  15256. func (s *Tagging) Validate() error {
  15257. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  15258. if s.TagSet == nil {
  15259. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  15260. }
  15261. if s.TagSet != nil {
  15262. for i, v := range s.TagSet {
  15263. if v == nil {
  15264. continue
  15265. }
  15266. if err := v.Validate(); err != nil {
  15267. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  15268. }
  15269. }
  15270. }
  15271. if invalidParams.Len() > 0 {
  15272. return invalidParams
  15273. }
  15274. return nil
  15275. }
  15276. // SetTagSet sets the TagSet field's value.
  15277. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  15278. s.TagSet = v
  15279. return s
  15280. }
  15281. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TargetGrant
  15282. type TargetGrant struct {
  15283. _ struct{} `type:"structure"`
  15284. Grantee *Grantee `type:"structure"`
  15285. // Logging permissions assigned to the Grantee for the bucket.
  15286. Permission *string `type:"string" enum:"BucketLogsPermission"`
  15287. }
  15288. // String returns the string representation
  15289. func (s TargetGrant) String() string {
  15290. return awsutil.Prettify(s)
  15291. }
  15292. // GoString returns the string representation
  15293. func (s TargetGrant) GoString() string {
  15294. return s.String()
  15295. }
  15296. // Validate inspects the fields of the type to determine if they are valid.
  15297. func (s *TargetGrant) Validate() error {
  15298. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  15299. if s.Grantee != nil {
  15300. if err := s.Grantee.Validate(); err != nil {
  15301. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  15302. }
  15303. }
  15304. if invalidParams.Len() > 0 {
  15305. return invalidParams
  15306. }
  15307. return nil
  15308. }
  15309. // SetGrantee sets the Grantee field's value.
  15310. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  15311. s.Grantee = v
  15312. return s
  15313. }
  15314. // SetPermission sets the Permission field's value.
  15315. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  15316. s.Permission = &v
  15317. return s
  15318. }
  15319. // Container for specifying the configuration when you want Amazon S3 to publish
  15320. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  15321. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfiguration
  15322. type TopicConfiguration struct {
  15323. _ struct{} `type:"structure"`
  15324. // Events is a required field
  15325. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  15326. // Container for object key name filtering rules. For information about key
  15327. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15328. Filter *NotificationConfigurationFilter `type:"structure"`
  15329. // Optional unique identifier for configurations in a notification configuration.
  15330. // If you don't provide one, Amazon S3 will assign an ID.
  15331. Id *string `type:"string"`
  15332. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  15333. // events of specified type.
  15334. //
  15335. // TopicArn is a required field
  15336. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  15337. }
  15338. // String returns the string representation
  15339. func (s TopicConfiguration) String() string {
  15340. return awsutil.Prettify(s)
  15341. }
  15342. // GoString returns the string representation
  15343. func (s TopicConfiguration) GoString() string {
  15344. return s.String()
  15345. }
  15346. // Validate inspects the fields of the type to determine if they are valid.
  15347. func (s *TopicConfiguration) Validate() error {
  15348. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  15349. if s.Events == nil {
  15350. invalidParams.Add(request.NewErrParamRequired("Events"))
  15351. }
  15352. if s.TopicArn == nil {
  15353. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  15354. }
  15355. if invalidParams.Len() > 0 {
  15356. return invalidParams
  15357. }
  15358. return nil
  15359. }
  15360. // SetEvents sets the Events field's value.
  15361. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  15362. s.Events = v
  15363. return s
  15364. }
  15365. // SetFilter sets the Filter field's value.
  15366. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  15367. s.Filter = v
  15368. return s
  15369. }
  15370. // SetId sets the Id field's value.
  15371. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  15372. s.Id = &v
  15373. return s
  15374. }
  15375. // SetTopicArn sets the TopicArn field's value.
  15376. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  15377. s.TopicArn = &v
  15378. return s
  15379. }
  15380. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfigurationDeprecated
  15381. type TopicConfigurationDeprecated struct {
  15382. _ struct{} `type:"structure"`
  15383. // Bucket event for which to send notifications.
  15384. Event *string `deprecated:"true" type:"string" enum:"Event"`
  15385. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  15386. // Optional unique identifier for configurations in a notification configuration.
  15387. // If you don't provide one, Amazon S3 will assign an ID.
  15388. Id *string `type:"string"`
  15389. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  15390. // specified events for the bucket.
  15391. Topic *string `type:"string"`
  15392. }
  15393. // String returns the string representation
  15394. func (s TopicConfigurationDeprecated) String() string {
  15395. return awsutil.Prettify(s)
  15396. }
  15397. // GoString returns the string representation
  15398. func (s TopicConfigurationDeprecated) GoString() string {
  15399. return s.String()
  15400. }
  15401. // SetEvent sets the Event field's value.
  15402. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  15403. s.Event = &v
  15404. return s
  15405. }
  15406. // SetEvents sets the Events field's value.
  15407. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  15408. s.Events = v
  15409. return s
  15410. }
  15411. // SetId sets the Id field's value.
  15412. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  15413. s.Id = &v
  15414. return s
  15415. }
  15416. // SetTopic sets the Topic field's value.
  15417. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  15418. s.Topic = &v
  15419. return s
  15420. }
  15421. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition
  15422. type Transition struct {
  15423. _ struct{} `type:"structure"`
  15424. // Indicates at what date the object is to be moved or deleted. Should be in
  15425. // GMT ISO 8601 Format.
  15426. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  15427. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  15428. // The value must be a non-zero positive integer.
  15429. Days *int64 `type:"integer"`
  15430. // The class of storage used to store the object.
  15431. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  15432. }
  15433. // String returns the string representation
  15434. func (s Transition) String() string {
  15435. return awsutil.Prettify(s)
  15436. }
  15437. // GoString returns the string representation
  15438. func (s Transition) GoString() string {
  15439. return s.String()
  15440. }
  15441. // SetDate sets the Date field's value.
  15442. func (s *Transition) SetDate(v time.Time) *Transition {
  15443. s.Date = &v
  15444. return s
  15445. }
  15446. // SetDays sets the Days field's value.
  15447. func (s *Transition) SetDays(v int64) *Transition {
  15448. s.Days = &v
  15449. return s
  15450. }
  15451. // SetStorageClass sets the StorageClass field's value.
  15452. func (s *Transition) SetStorageClass(v string) *Transition {
  15453. s.StorageClass = &v
  15454. return s
  15455. }
  15456. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyRequest
  15457. type UploadPartCopyInput struct {
  15458. _ struct{} `type:"structure"`
  15459. // Bucket is a required field
  15460. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15461. // The name of the source bucket and key name of the source object, separated
  15462. // by a slash (/). Must be URL-encoded.
  15463. //
  15464. // CopySource is a required field
  15465. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  15466. // Copies the object if its entity tag (ETag) matches the specified tag.
  15467. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  15468. // Copies the object if it has been modified since the specified time.
  15469. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  15470. // Copies the object if its entity tag (ETag) is different than the specified
  15471. // ETag.
  15472. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  15473. // Copies the object if it hasn't been modified since the specified time.
  15474. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  15475. // The range of bytes to copy from the source object. The range value must use
  15476. // the form bytes=first-last, where the first and last are the zero-based byte
  15477. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  15478. // first ten bytes of the source. You can copy a range only if the source object
  15479. // is greater than 5 GB.
  15480. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  15481. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  15482. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  15483. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  15484. // the source object. The encryption key provided in this header must be one
  15485. // that was used when the source object was created.
  15486. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  15487. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15488. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15489. // key was transmitted without error.
  15490. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  15491. // Key is a required field
  15492. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15493. // Part number of part being copied. This is a positive integer between 1 and
  15494. // 10,000.
  15495. //
  15496. // PartNumber is a required field
  15497. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  15498. // Confirms that the requester knows that she or he will be charged for the
  15499. // request. Bucket owners need not specify this parameter in their requests.
  15500. // Documentation on downloading objects from requester pays buckets can be found
  15501. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15502. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15503. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  15504. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15505. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  15506. // data. This value is used to store the object and then it is discarded; Amazon
  15507. // does not store the encryption key. The key must be appropriate for use with
  15508. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  15509. // header. This must be the same encryption key specified in the initiate multipart
  15510. // upload request.
  15511. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  15512. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15513. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15514. // key was transmitted without error.
  15515. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15516. // Upload ID identifying the multipart upload whose part is being copied.
  15517. //
  15518. // UploadId is a required field
  15519. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  15520. }
  15521. // String returns the string representation
  15522. func (s UploadPartCopyInput) String() string {
  15523. return awsutil.Prettify(s)
  15524. }
  15525. // GoString returns the string representation
  15526. func (s UploadPartCopyInput) GoString() string {
  15527. return s.String()
  15528. }
  15529. // Validate inspects the fields of the type to determine if they are valid.
  15530. func (s *UploadPartCopyInput) Validate() error {
  15531. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  15532. if s.Bucket == nil {
  15533. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15534. }
  15535. if s.CopySource == nil {
  15536. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  15537. }
  15538. if s.Key == nil {
  15539. invalidParams.Add(request.NewErrParamRequired("Key"))
  15540. }
  15541. if s.Key != nil && len(*s.Key) < 1 {
  15542. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15543. }
  15544. if s.PartNumber == nil {
  15545. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  15546. }
  15547. if s.UploadId == nil {
  15548. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  15549. }
  15550. if invalidParams.Len() > 0 {
  15551. return invalidParams
  15552. }
  15553. return nil
  15554. }
  15555. // SetBucket sets the Bucket field's value.
  15556. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  15557. s.Bucket = &v
  15558. return s
  15559. }
  15560. // SetCopySource sets the CopySource field's value.
  15561. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  15562. s.CopySource = &v
  15563. return s
  15564. }
  15565. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  15566. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  15567. s.CopySourceIfMatch = &v
  15568. return s
  15569. }
  15570. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  15571. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  15572. s.CopySourceIfModifiedSince = &v
  15573. return s
  15574. }
  15575. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  15576. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  15577. s.CopySourceIfNoneMatch = &v
  15578. return s
  15579. }
  15580. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  15581. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  15582. s.CopySourceIfUnmodifiedSince = &v
  15583. return s
  15584. }
  15585. // SetCopySourceRange sets the CopySourceRange field's value.
  15586. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  15587. s.CopySourceRange = &v
  15588. return s
  15589. }
  15590. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  15591. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  15592. s.CopySourceSSECustomerAlgorithm = &v
  15593. return s
  15594. }
  15595. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  15596. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  15597. s.CopySourceSSECustomerKey = &v
  15598. return s
  15599. }
  15600. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  15601. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  15602. s.CopySourceSSECustomerKeyMD5 = &v
  15603. return s
  15604. }
  15605. // SetKey sets the Key field's value.
  15606. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  15607. s.Key = &v
  15608. return s
  15609. }
  15610. // SetPartNumber sets the PartNumber field's value.
  15611. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  15612. s.PartNumber = &v
  15613. return s
  15614. }
  15615. // SetRequestPayer sets the RequestPayer field's value.
  15616. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  15617. s.RequestPayer = &v
  15618. return s
  15619. }
  15620. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15621. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  15622. s.SSECustomerAlgorithm = &v
  15623. return s
  15624. }
  15625. // SetSSECustomerKey sets the SSECustomerKey field's value.
  15626. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  15627. s.SSECustomerKey = &v
  15628. return s
  15629. }
  15630. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15631. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  15632. s.SSECustomerKeyMD5 = &v
  15633. return s
  15634. }
  15635. // SetUploadId sets the UploadId field's value.
  15636. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  15637. s.UploadId = &v
  15638. return s
  15639. }
  15640. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyOutput
  15641. type UploadPartCopyOutput struct {
  15642. _ struct{} `type:"structure" payload:"CopyPartResult"`
  15643. CopyPartResult *CopyPartResult `type:"structure"`
  15644. // The version of the source object that was copied, if you have enabled versioning
  15645. // on the source bucket.
  15646. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  15647. // If present, indicates that the requester was successfully charged for the
  15648. // request.
  15649. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15650. // If server-side encryption with a customer-provided encryption key was requested,
  15651. // the response will include this header confirming the encryption algorithm
  15652. // used.
  15653. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15654. // If server-side encryption with a customer-provided encryption key was requested,
  15655. // the response will include this header to provide round trip message integrity
  15656. // verification of the customer-provided encryption key.
  15657. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15658. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  15659. // encryption key that was used for the object.
  15660. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15661. // The Server-side encryption algorithm used when storing this object in S3
  15662. // (e.g., AES256, aws:kms).
  15663. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15664. }
  15665. // String returns the string representation
  15666. func (s UploadPartCopyOutput) String() string {
  15667. return awsutil.Prettify(s)
  15668. }
  15669. // GoString returns the string representation
  15670. func (s UploadPartCopyOutput) GoString() string {
  15671. return s.String()
  15672. }
  15673. // SetCopyPartResult sets the CopyPartResult field's value.
  15674. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  15675. s.CopyPartResult = v
  15676. return s
  15677. }
  15678. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  15679. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  15680. s.CopySourceVersionId = &v
  15681. return s
  15682. }
  15683. // SetRequestCharged sets the RequestCharged field's value.
  15684. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  15685. s.RequestCharged = &v
  15686. return s
  15687. }
  15688. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15689. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  15690. s.SSECustomerAlgorithm = &v
  15691. return s
  15692. }
  15693. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15694. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  15695. s.SSECustomerKeyMD5 = &v
  15696. return s
  15697. }
  15698. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15699. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  15700. s.SSEKMSKeyId = &v
  15701. return s
  15702. }
  15703. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15704. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  15705. s.ServerSideEncryption = &v
  15706. return s
  15707. }
  15708. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartRequest
  15709. type UploadPartInput struct {
  15710. _ struct{} `type:"structure" payload:"Body"`
  15711. // Object data.
  15712. Body io.ReadSeeker `type:"blob"`
  15713. // Name of the bucket to which the multipart upload was initiated.
  15714. //
  15715. // Bucket is a required field
  15716. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15717. // Size of the body in bytes. This parameter is useful when the size of the
  15718. // body cannot be determined automatically.
  15719. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  15720. // Object key for which the multipart upload was initiated.
  15721. //
  15722. // Key is a required field
  15723. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15724. // Part number of part being uploaded. This is a positive integer between 1
  15725. // and 10,000.
  15726. //
  15727. // PartNumber is a required field
  15728. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  15729. // Confirms that the requester knows that she or he will be charged for the
  15730. // request. Bucket owners need not specify this parameter in their requests.
  15731. // Documentation on downloading objects from requester pays buckets can be found
  15732. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15733. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15734. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  15735. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15736. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  15737. // data. This value is used to store the object and then it is discarded; Amazon
  15738. // does not store the encryption key. The key must be appropriate for use with
  15739. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  15740. // header. This must be the same encryption key specified in the initiate multipart
  15741. // upload request.
  15742. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  15743. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15744. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15745. // key was transmitted without error.
  15746. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15747. // Upload ID identifying the multipart upload whose part is being uploaded.
  15748. //
  15749. // UploadId is a required field
  15750. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  15751. }
  15752. // String returns the string representation
  15753. func (s UploadPartInput) String() string {
  15754. return awsutil.Prettify(s)
  15755. }
  15756. // GoString returns the string representation
  15757. func (s UploadPartInput) GoString() string {
  15758. return s.String()
  15759. }
  15760. // Validate inspects the fields of the type to determine if they are valid.
  15761. func (s *UploadPartInput) Validate() error {
  15762. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  15763. if s.Bucket == nil {
  15764. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15765. }
  15766. if s.Key == nil {
  15767. invalidParams.Add(request.NewErrParamRequired("Key"))
  15768. }
  15769. if s.Key != nil && len(*s.Key) < 1 {
  15770. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15771. }
  15772. if s.PartNumber == nil {
  15773. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  15774. }
  15775. if s.UploadId == nil {
  15776. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  15777. }
  15778. if invalidParams.Len() > 0 {
  15779. return invalidParams
  15780. }
  15781. return nil
  15782. }
  15783. // SetBody sets the Body field's value.
  15784. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  15785. s.Body = v
  15786. return s
  15787. }
  15788. // SetBucket sets the Bucket field's value.
  15789. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  15790. s.Bucket = &v
  15791. return s
  15792. }
  15793. // SetContentLength sets the ContentLength field's value.
  15794. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  15795. s.ContentLength = &v
  15796. return s
  15797. }
  15798. // SetKey sets the Key field's value.
  15799. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  15800. s.Key = &v
  15801. return s
  15802. }
  15803. // SetPartNumber sets the PartNumber field's value.
  15804. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  15805. s.PartNumber = &v
  15806. return s
  15807. }
  15808. // SetRequestPayer sets the RequestPayer field's value.
  15809. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  15810. s.RequestPayer = &v
  15811. return s
  15812. }
  15813. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15814. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  15815. s.SSECustomerAlgorithm = &v
  15816. return s
  15817. }
  15818. // SetSSECustomerKey sets the SSECustomerKey field's value.
  15819. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  15820. s.SSECustomerKey = &v
  15821. return s
  15822. }
  15823. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15824. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  15825. s.SSECustomerKeyMD5 = &v
  15826. return s
  15827. }
  15828. // SetUploadId sets the UploadId field's value.
  15829. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  15830. s.UploadId = &v
  15831. return s
  15832. }
  15833. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartOutput
  15834. type UploadPartOutput struct {
  15835. _ struct{} `type:"structure"`
  15836. // Entity tag for the uploaded object.
  15837. ETag *string `location:"header" locationName:"ETag" type:"string"`
  15838. // If present, indicates that the requester was successfully charged for the
  15839. // request.
  15840. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15841. // If server-side encryption with a customer-provided encryption key was requested,
  15842. // the response will include this header confirming the encryption algorithm
  15843. // used.
  15844. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15845. // If server-side encryption with a customer-provided encryption key was requested,
  15846. // the response will include this header to provide round trip message integrity
  15847. // verification of the customer-provided encryption key.
  15848. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15849. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  15850. // encryption key that was used for the object.
  15851. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15852. // The Server-side encryption algorithm used when storing this object in S3
  15853. // (e.g., AES256, aws:kms).
  15854. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15855. }
  15856. // String returns the string representation
  15857. func (s UploadPartOutput) String() string {
  15858. return awsutil.Prettify(s)
  15859. }
  15860. // GoString returns the string representation
  15861. func (s UploadPartOutput) GoString() string {
  15862. return s.String()
  15863. }
  15864. // SetETag sets the ETag field's value.
  15865. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  15866. s.ETag = &v
  15867. return s
  15868. }
  15869. // SetRequestCharged sets the RequestCharged field's value.
  15870. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  15871. s.RequestCharged = &v
  15872. return s
  15873. }
  15874. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15875. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  15876. s.SSECustomerAlgorithm = &v
  15877. return s
  15878. }
  15879. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15880. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  15881. s.SSECustomerKeyMD5 = &v
  15882. return s
  15883. }
  15884. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15885. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  15886. s.SSEKMSKeyId = &v
  15887. return s
  15888. }
  15889. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15890. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  15891. s.ServerSideEncryption = &v
  15892. return s
  15893. }
  15894. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/VersioningConfiguration
  15895. type VersioningConfiguration struct {
  15896. _ struct{} `type:"structure"`
  15897. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  15898. // This element is only returned if the bucket has been configured with MFA
  15899. // delete. If the bucket has never been so configured, this element is not returned.
  15900. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  15901. // The versioning state of the bucket.
  15902. Status *string `type:"string" enum:"BucketVersioningStatus"`
  15903. }
  15904. // String returns the string representation
  15905. func (s VersioningConfiguration) String() string {
  15906. return awsutil.Prettify(s)
  15907. }
  15908. // GoString returns the string representation
  15909. func (s VersioningConfiguration) GoString() string {
  15910. return s.String()
  15911. }
  15912. // SetMFADelete sets the MFADelete field's value.
  15913. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  15914. s.MFADelete = &v
  15915. return s
  15916. }
  15917. // SetStatus sets the Status field's value.
  15918. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  15919. s.Status = &v
  15920. return s
  15921. }
  15922. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WebsiteConfiguration
  15923. type WebsiteConfiguration struct {
  15924. _ struct{} `type:"structure"`
  15925. ErrorDocument *ErrorDocument `type:"structure"`
  15926. IndexDocument *IndexDocument `type:"structure"`
  15927. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  15928. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  15929. }
  15930. // String returns the string representation
  15931. func (s WebsiteConfiguration) String() string {
  15932. return awsutil.Prettify(s)
  15933. }
  15934. // GoString returns the string representation
  15935. func (s WebsiteConfiguration) GoString() string {
  15936. return s.String()
  15937. }
  15938. // Validate inspects the fields of the type to determine if they are valid.
  15939. func (s *WebsiteConfiguration) Validate() error {
  15940. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  15941. if s.ErrorDocument != nil {
  15942. if err := s.ErrorDocument.Validate(); err != nil {
  15943. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  15944. }
  15945. }
  15946. if s.IndexDocument != nil {
  15947. if err := s.IndexDocument.Validate(); err != nil {
  15948. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  15949. }
  15950. }
  15951. if s.RedirectAllRequestsTo != nil {
  15952. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  15953. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  15954. }
  15955. }
  15956. if s.RoutingRules != nil {
  15957. for i, v := range s.RoutingRules {
  15958. if v == nil {
  15959. continue
  15960. }
  15961. if err := v.Validate(); err != nil {
  15962. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  15963. }
  15964. }
  15965. }
  15966. if invalidParams.Len() > 0 {
  15967. return invalidParams
  15968. }
  15969. return nil
  15970. }
  15971. // SetErrorDocument sets the ErrorDocument field's value.
  15972. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  15973. s.ErrorDocument = v
  15974. return s
  15975. }
  15976. // SetIndexDocument sets the IndexDocument field's value.
  15977. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  15978. s.IndexDocument = v
  15979. return s
  15980. }
  15981. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  15982. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  15983. s.RedirectAllRequestsTo = v
  15984. return s
  15985. }
  15986. // SetRoutingRules sets the RoutingRules field's value.
  15987. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  15988. s.RoutingRules = v
  15989. return s
  15990. }
  15991. const (
  15992. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  15993. AnalyticsS3ExportFileFormatCsv = "CSV"
  15994. )
  15995. const (
  15996. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  15997. BucketAccelerateStatusEnabled = "Enabled"
  15998. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  15999. BucketAccelerateStatusSuspended = "Suspended"
  16000. )
  16001. const (
  16002. // BucketCannedACLPrivate is a BucketCannedACL enum value
  16003. BucketCannedACLPrivate = "private"
  16004. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  16005. BucketCannedACLPublicRead = "public-read"
  16006. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  16007. BucketCannedACLPublicReadWrite = "public-read-write"
  16008. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  16009. BucketCannedACLAuthenticatedRead = "authenticated-read"
  16010. )
  16011. const (
  16012. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  16013. BucketLocationConstraintEu = "EU"
  16014. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  16015. BucketLocationConstraintEuWest1 = "eu-west-1"
  16016. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  16017. BucketLocationConstraintUsWest1 = "us-west-1"
  16018. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  16019. BucketLocationConstraintUsWest2 = "us-west-2"
  16020. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  16021. BucketLocationConstraintApSouth1 = "ap-south-1"
  16022. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  16023. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  16024. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  16025. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  16026. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  16027. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  16028. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  16029. BucketLocationConstraintSaEast1 = "sa-east-1"
  16030. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  16031. BucketLocationConstraintCnNorth1 = "cn-north-1"
  16032. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  16033. BucketLocationConstraintEuCentral1 = "eu-central-1"
  16034. )
  16035. const (
  16036. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  16037. BucketLogsPermissionFullControl = "FULL_CONTROL"
  16038. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  16039. BucketLogsPermissionRead = "READ"
  16040. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  16041. BucketLogsPermissionWrite = "WRITE"
  16042. )
  16043. const (
  16044. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  16045. BucketVersioningStatusEnabled = "Enabled"
  16046. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  16047. BucketVersioningStatusSuspended = "Suspended"
  16048. )
  16049. // Requests Amazon S3 to encode the object keys in the response and specifies
  16050. // the encoding method to use. An object key may contain any Unicode character;
  16051. // however, XML 1.0 parser cannot parse some characters, such as characters
  16052. // with an ASCII value from 0 to 10. For characters that are not supported in
  16053. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  16054. // keys in the response.
  16055. const (
  16056. // EncodingTypeUrl is a EncodingType enum value
  16057. EncodingTypeUrl = "url"
  16058. )
  16059. // Bucket event for which to send notifications.
  16060. const (
  16061. // EventS3ReducedRedundancyLostObject is a Event enum value
  16062. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  16063. // EventS3ObjectCreated is a Event enum value
  16064. EventS3ObjectCreated = "s3:ObjectCreated:*"
  16065. // EventS3ObjectCreatedPut is a Event enum value
  16066. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  16067. // EventS3ObjectCreatedPost is a Event enum value
  16068. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  16069. // EventS3ObjectCreatedCopy is a Event enum value
  16070. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  16071. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  16072. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  16073. // EventS3ObjectRemoved is a Event enum value
  16074. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  16075. // EventS3ObjectRemovedDelete is a Event enum value
  16076. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  16077. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  16078. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  16079. )
  16080. const (
  16081. // ExpirationStatusEnabled is a ExpirationStatus enum value
  16082. ExpirationStatusEnabled = "Enabled"
  16083. // ExpirationStatusDisabled is a ExpirationStatus enum value
  16084. ExpirationStatusDisabled = "Disabled"
  16085. )
  16086. const (
  16087. // FilterRuleNamePrefix is a FilterRuleName enum value
  16088. FilterRuleNamePrefix = "prefix"
  16089. // FilterRuleNameSuffix is a FilterRuleName enum value
  16090. FilterRuleNameSuffix = "suffix"
  16091. )
  16092. const (
  16093. // InventoryFormatCsv is a InventoryFormat enum value
  16094. InventoryFormatCsv = "CSV"
  16095. )
  16096. const (
  16097. // InventoryFrequencyDaily is a InventoryFrequency enum value
  16098. InventoryFrequencyDaily = "Daily"
  16099. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  16100. InventoryFrequencyWeekly = "Weekly"
  16101. )
  16102. const (
  16103. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  16104. InventoryIncludedObjectVersionsAll = "All"
  16105. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  16106. InventoryIncludedObjectVersionsCurrent = "Current"
  16107. )
  16108. const (
  16109. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  16110. InventoryOptionalFieldSize = "Size"
  16111. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  16112. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  16113. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  16114. InventoryOptionalFieldStorageClass = "StorageClass"
  16115. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  16116. InventoryOptionalFieldEtag = "ETag"
  16117. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  16118. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  16119. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  16120. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  16121. )
  16122. const (
  16123. // MFADeleteEnabled is a MFADelete enum value
  16124. MFADeleteEnabled = "Enabled"
  16125. // MFADeleteDisabled is a MFADelete enum value
  16126. MFADeleteDisabled = "Disabled"
  16127. )
  16128. const (
  16129. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  16130. MFADeleteStatusEnabled = "Enabled"
  16131. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  16132. MFADeleteStatusDisabled = "Disabled"
  16133. )
  16134. const (
  16135. // MetadataDirectiveCopy is a MetadataDirective enum value
  16136. MetadataDirectiveCopy = "COPY"
  16137. // MetadataDirectiveReplace is a MetadataDirective enum value
  16138. MetadataDirectiveReplace = "REPLACE"
  16139. )
  16140. const (
  16141. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  16142. ObjectCannedACLPrivate = "private"
  16143. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  16144. ObjectCannedACLPublicRead = "public-read"
  16145. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  16146. ObjectCannedACLPublicReadWrite = "public-read-write"
  16147. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  16148. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  16149. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  16150. ObjectCannedACLAwsExecRead = "aws-exec-read"
  16151. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  16152. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  16153. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  16154. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  16155. )
  16156. const (
  16157. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  16158. ObjectStorageClassStandard = "STANDARD"
  16159. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  16160. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  16161. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  16162. ObjectStorageClassGlacier = "GLACIER"
  16163. )
  16164. const (
  16165. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  16166. ObjectVersionStorageClassStandard = "STANDARD"
  16167. )
  16168. const (
  16169. // PayerRequester is a Payer enum value
  16170. PayerRequester = "Requester"
  16171. // PayerBucketOwner is a Payer enum value
  16172. PayerBucketOwner = "BucketOwner"
  16173. )
  16174. const (
  16175. // PermissionFullControl is a Permission enum value
  16176. PermissionFullControl = "FULL_CONTROL"
  16177. // PermissionWrite is a Permission enum value
  16178. PermissionWrite = "WRITE"
  16179. // PermissionWriteAcp is a Permission enum value
  16180. PermissionWriteAcp = "WRITE_ACP"
  16181. // PermissionRead is a Permission enum value
  16182. PermissionRead = "READ"
  16183. // PermissionReadAcp is a Permission enum value
  16184. PermissionReadAcp = "READ_ACP"
  16185. )
  16186. const (
  16187. // ProtocolHttp is a Protocol enum value
  16188. ProtocolHttp = "http"
  16189. // ProtocolHttps is a Protocol enum value
  16190. ProtocolHttps = "https"
  16191. )
  16192. const (
  16193. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  16194. ReplicationRuleStatusEnabled = "Enabled"
  16195. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  16196. ReplicationRuleStatusDisabled = "Disabled"
  16197. )
  16198. const (
  16199. // ReplicationStatusComplete is a ReplicationStatus enum value
  16200. ReplicationStatusComplete = "COMPLETE"
  16201. // ReplicationStatusPending is a ReplicationStatus enum value
  16202. ReplicationStatusPending = "PENDING"
  16203. // ReplicationStatusFailed is a ReplicationStatus enum value
  16204. ReplicationStatusFailed = "FAILED"
  16205. // ReplicationStatusReplica is a ReplicationStatus enum value
  16206. ReplicationStatusReplica = "REPLICA"
  16207. )
  16208. // If present, indicates that the requester was successfully charged for the
  16209. // request.
  16210. const (
  16211. // RequestChargedRequester is a RequestCharged enum value
  16212. RequestChargedRequester = "requester"
  16213. )
  16214. // Confirms that the requester knows that she or he will be charged for the
  16215. // request. Bucket owners need not specify this parameter in their requests.
  16216. // Documentation on downloading objects from requester pays buckets can be found
  16217. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16218. const (
  16219. // RequestPayerRequester is a RequestPayer enum value
  16220. RequestPayerRequester = "requester"
  16221. )
  16222. const (
  16223. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  16224. ServerSideEncryptionAes256 = "AES256"
  16225. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  16226. ServerSideEncryptionAwsKms = "aws:kms"
  16227. )
  16228. const (
  16229. // StorageClassStandard is a StorageClass enum value
  16230. StorageClassStandard = "STANDARD"
  16231. // StorageClassReducedRedundancy is a StorageClass enum value
  16232. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  16233. // StorageClassStandardIa is a StorageClass enum value
  16234. StorageClassStandardIa = "STANDARD_IA"
  16235. )
  16236. const (
  16237. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  16238. StorageClassAnalysisSchemaVersionV1 = "V_1"
  16239. )
  16240. const (
  16241. // TaggingDirectiveCopy is a TaggingDirective enum value
  16242. TaggingDirectiveCopy = "COPY"
  16243. // TaggingDirectiveReplace is a TaggingDirective enum value
  16244. TaggingDirectiveReplace = "REPLACE"
  16245. )
  16246. const (
  16247. // TierStandard is a Tier enum value
  16248. TierStandard = "Standard"
  16249. // TierBulk is a Tier enum value
  16250. TierBulk = "Bulk"
  16251. // TierExpedited is a Tier enum value
  16252. TierExpedited = "Expedited"
  16253. )
  16254. const (
  16255. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  16256. TransitionStorageClassGlacier = "GLACIER"
  16257. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  16258. TransitionStorageClassStandardIa = "STANDARD_IA"
  16259. )
  16260. const (
  16261. // TypeCanonicalUser is a Type enum value
  16262. TypeCanonicalUser = "CanonicalUser"
  16263. // TypeAmazonCustomerByEmail is a Type enum value
  16264. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  16265. // TypeGroup is a Type enum value
  16266. TypeGroup = "Group"
  16267. )