api.go 672 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package s3
  3. import (
  4. "fmt"
  5. "io"
  6. "time"
  7. "github.com/aws/aws-sdk-go/aws"
  8. "github.com/aws/aws-sdk-go/aws/awsutil"
  9. "github.com/aws/aws-sdk-go/aws/request"
  10. "github.com/aws/aws-sdk-go/private/protocol"
  11. "github.com/aws/aws-sdk-go/private/protocol/restxml"
  12. )
  13. const opAbortMultipartUpload = "AbortMultipartUpload"
  14. // AbortMultipartUploadRequest generates a "aws/request.Request" representing the
  15. // client's request for the AbortMultipartUpload operation. The "output" return
  16. // value can be used to capture response data after the request's "Send" method
  17. // is called.
  18. //
  19. // See AbortMultipartUpload for usage and error information.
  20. //
  21. // Creating a request object using this method should be used when you want to inject
  22. // custom logic into the request's lifecycle using a custom handler, or if you want to
  23. // access properties on the request object before or after sending the request. If
  24. // you just want the service response, call the AbortMultipartUpload method directly
  25. // instead.
  26. //
  27. // Note: You must call the "Send" method on the returned request object in order
  28. // to execute the request.
  29. //
  30. // // Example sending a request using the AbortMultipartUploadRequest method.
  31. // req, resp := client.AbortMultipartUploadRequest(params)
  32. //
  33. // err := req.Send()
  34. // if err == nil { // resp is now filled
  35. // fmt.Println(resp)
  36. // }
  37. //
  38. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  39. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  40. op := &request.Operation{
  41. Name: opAbortMultipartUpload,
  42. HTTPMethod: "DELETE",
  43. HTTPPath: "/{Bucket}/{Key+}",
  44. }
  45. if input == nil {
  46. input = &AbortMultipartUploadInput{}
  47. }
  48. output = &AbortMultipartUploadOutput{}
  49. req = c.newRequest(op, input, output)
  50. return
  51. }
  52. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  53. //
  54. // Aborts a multipart upload.
  55. //
  56. // To verify that all parts have been removed, so you don't get charged for
  57. // the part storage, you should call the List Parts operation and ensure the
  58. // parts list is empty.
  59. //
  60. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  61. // with awserr.Error's Code and Message methods to get detailed information about
  62. // the error.
  63. //
  64. // See the AWS API reference guide for Amazon Simple Storage Service's
  65. // API operation AbortMultipartUpload for usage and error information.
  66. //
  67. // Returned Error Codes:
  68. // * ErrCodeNoSuchUpload "NoSuchUpload"
  69. // The specified multipart upload does not exist.
  70. //
  71. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  72. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  73. req, out := c.AbortMultipartUploadRequest(input)
  74. return out, req.Send()
  75. }
  76. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  77. // the ability to pass a context and additional request options.
  78. //
  79. // See AbortMultipartUpload for details on how to use this API operation.
  80. //
  81. // The context must be non-nil and will be used for request cancellation. If
  82. // the context is nil a panic will occur. In the future the SDK may create
  83. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  84. // for more information on using Contexts.
  85. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  86. req, out := c.AbortMultipartUploadRequest(input)
  87. req.SetContext(ctx)
  88. req.ApplyOptions(opts...)
  89. return out, req.Send()
  90. }
  91. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  92. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  93. // client's request for the CompleteMultipartUpload operation. The "output" return
  94. // value can be used to capture response data after the request's "Send" method
  95. // is called.
  96. //
  97. // See CompleteMultipartUpload for usage and error information.
  98. //
  99. // Creating a request object using this method should be used when you want to inject
  100. // custom logic into the request's lifecycle using a custom handler, or if you want to
  101. // access properties on the request object before or after sending the request. If
  102. // you just want the service response, call the CompleteMultipartUpload method directly
  103. // instead.
  104. //
  105. // Note: You must call the "Send" method on the returned request object in order
  106. // to execute the request.
  107. //
  108. // // Example sending a request using the CompleteMultipartUploadRequest method.
  109. // req, resp := client.CompleteMultipartUploadRequest(params)
  110. //
  111. // err := req.Send()
  112. // if err == nil { // resp is now filled
  113. // fmt.Println(resp)
  114. // }
  115. //
  116. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  117. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  118. op := &request.Operation{
  119. Name: opCompleteMultipartUpload,
  120. HTTPMethod: "POST",
  121. HTTPPath: "/{Bucket}/{Key+}",
  122. }
  123. if input == nil {
  124. input = &CompleteMultipartUploadInput{}
  125. }
  126. output = &CompleteMultipartUploadOutput{}
  127. req = c.newRequest(op, input, output)
  128. return
  129. }
  130. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  131. //
  132. // Completes a multipart upload by assembling previously uploaded parts.
  133. //
  134. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  135. // with awserr.Error's Code and Message methods to get detailed information about
  136. // the error.
  137. //
  138. // See the AWS API reference guide for Amazon Simple Storage Service's
  139. // API operation CompleteMultipartUpload for usage and error information.
  140. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  141. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  142. req, out := c.CompleteMultipartUploadRequest(input)
  143. return out, req.Send()
  144. }
  145. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  146. // the ability to pass a context and additional request options.
  147. //
  148. // See CompleteMultipartUpload for details on how to use this API operation.
  149. //
  150. // The context must be non-nil and will be used for request cancellation. If
  151. // the context is nil a panic will occur. In the future the SDK may create
  152. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  153. // for more information on using Contexts.
  154. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  155. req, out := c.CompleteMultipartUploadRequest(input)
  156. req.SetContext(ctx)
  157. req.ApplyOptions(opts...)
  158. return out, req.Send()
  159. }
  160. const opCopyObject = "CopyObject"
  161. // CopyObjectRequest generates a "aws/request.Request" representing the
  162. // client's request for the CopyObject operation. The "output" return
  163. // value can be used to capture response data after the request's "Send" method
  164. // is called.
  165. //
  166. // See CopyObject for usage and error information.
  167. //
  168. // Creating a request object using this method should be used when you want to inject
  169. // custom logic into the request's lifecycle using a custom handler, or if you want to
  170. // access properties on the request object before or after sending the request. If
  171. // you just want the service response, call the CopyObject method directly
  172. // instead.
  173. //
  174. // Note: You must call the "Send" method on the returned request object in order
  175. // to execute the request.
  176. //
  177. // // Example sending a request using the CopyObjectRequest method.
  178. // req, resp := client.CopyObjectRequest(params)
  179. //
  180. // err := req.Send()
  181. // if err == nil { // resp is now filled
  182. // fmt.Println(resp)
  183. // }
  184. //
  185. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  186. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  187. op := &request.Operation{
  188. Name: opCopyObject,
  189. HTTPMethod: "PUT",
  190. HTTPPath: "/{Bucket}/{Key+}",
  191. }
  192. if input == nil {
  193. input = &CopyObjectInput{}
  194. }
  195. output = &CopyObjectOutput{}
  196. req = c.newRequest(op, input, output)
  197. return
  198. }
  199. // CopyObject API operation for Amazon Simple Storage Service.
  200. //
  201. // Creates a copy of an object that is already stored in Amazon S3.
  202. //
  203. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  204. // with awserr.Error's Code and Message methods to get detailed information about
  205. // the error.
  206. //
  207. // See the AWS API reference guide for Amazon Simple Storage Service's
  208. // API operation CopyObject for usage and error information.
  209. //
  210. // Returned Error Codes:
  211. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  212. // The source object of the COPY operation is not in the active tier and is
  213. // only stored in Amazon Glacier.
  214. //
  215. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  216. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  217. req, out := c.CopyObjectRequest(input)
  218. return out, req.Send()
  219. }
  220. // CopyObjectWithContext is the same as CopyObject with the addition of
  221. // the ability to pass a context and additional request options.
  222. //
  223. // See CopyObject for details on how to use this API operation.
  224. //
  225. // The context must be non-nil and will be used for request cancellation. If
  226. // the context is nil a panic will occur. In the future the SDK may create
  227. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  228. // for more information on using Contexts.
  229. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  230. req, out := c.CopyObjectRequest(input)
  231. req.SetContext(ctx)
  232. req.ApplyOptions(opts...)
  233. return out, req.Send()
  234. }
  235. const opCreateBucket = "CreateBucket"
  236. // CreateBucketRequest generates a "aws/request.Request" representing the
  237. // client's request for the CreateBucket operation. The "output" return
  238. // value can be used to capture response data after the request's "Send" method
  239. // is called.
  240. //
  241. // See CreateBucket for usage and error information.
  242. //
  243. // Creating a request object using this method should be used when you want to inject
  244. // custom logic into the request's lifecycle using a custom handler, or if you want to
  245. // access properties on the request object before or after sending the request. If
  246. // you just want the service response, call the CreateBucket method directly
  247. // instead.
  248. //
  249. // Note: You must call the "Send" method on the returned request object in order
  250. // to execute the request.
  251. //
  252. // // Example sending a request using the CreateBucketRequest method.
  253. // req, resp := client.CreateBucketRequest(params)
  254. //
  255. // err := req.Send()
  256. // if err == nil { // resp is now filled
  257. // fmt.Println(resp)
  258. // }
  259. //
  260. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  261. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  262. op := &request.Operation{
  263. Name: opCreateBucket,
  264. HTTPMethod: "PUT",
  265. HTTPPath: "/{Bucket}",
  266. }
  267. if input == nil {
  268. input = &CreateBucketInput{}
  269. }
  270. output = &CreateBucketOutput{}
  271. req = c.newRequest(op, input, output)
  272. return
  273. }
  274. // CreateBucket API operation for Amazon Simple Storage Service.
  275. //
  276. // Creates a new bucket.
  277. //
  278. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  279. // with awserr.Error's Code and Message methods to get detailed information about
  280. // the error.
  281. //
  282. // See the AWS API reference guide for Amazon Simple Storage Service's
  283. // API operation CreateBucket for usage and error information.
  284. //
  285. // Returned Error Codes:
  286. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  287. // The requested bucket name is not available. The bucket namespace is shared
  288. // by all users of the system. Please select a different name and try again.
  289. //
  290. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  291. //
  292. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  293. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  294. req, out := c.CreateBucketRequest(input)
  295. return out, req.Send()
  296. }
  297. // CreateBucketWithContext is the same as CreateBucket with the addition of
  298. // the ability to pass a context and additional request options.
  299. //
  300. // See CreateBucket for details on how to use this API operation.
  301. //
  302. // The context must be non-nil and will be used for request cancellation. If
  303. // the context is nil a panic will occur. In the future the SDK may create
  304. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  305. // for more information on using Contexts.
  306. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  307. req, out := c.CreateBucketRequest(input)
  308. req.SetContext(ctx)
  309. req.ApplyOptions(opts...)
  310. return out, req.Send()
  311. }
  312. const opCreateMultipartUpload = "CreateMultipartUpload"
  313. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  314. // client's request for the CreateMultipartUpload operation. The "output" return
  315. // value can be used to capture response data after the request's "Send" method
  316. // is called.
  317. //
  318. // See CreateMultipartUpload for usage and error information.
  319. //
  320. // Creating a request object using this method should be used when you want to inject
  321. // custom logic into the request's lifecycle using a custom handler, or if you want to
  322. // access properties on the request object before or after sending the request. If
  323. // you just want the service response, call the CreateMultipartUpload method directly
  324. // instead.
  325. //
  326. // Note: You must call the "Send" method on the returned request object in order
  327. // to execute the request.
  328. //
  329. // // Example sending a request using the CreateMultipartUploadRequest method.
  330. // req, resp := client.CreateMultipartUploadRequest(params)
  331. //
  332. // err := req.Send()
  333. // if err == nil { // resp is now filled
  334. // fmt.Println(resp)
  335. // }
  336. //
  337. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  338. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  339. op := &request.Operation{
  340. Name: opCreateMultipartUpload,
  341. HTTPMethod: "POST",
  342. HTTPPath: "/{Bucket}/{Key+}?uploads",
  343. }
  344. if input == nil {
  345. input = &CreateMultipartUploadInput{}
  346. }
  347. output = &CreateMultipartUploadOutput{}
  348. req = c.newRequest(op, input, output)
  349. return
  350. }
  351. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  352. //
  353. // Initiates a multipart upload and returns an upload ID.
  354. //
  355. // Note: After you initiate multipart upload and upload one or more parts, you
  356. // must either complete or abort multipart upload in order to stop getting charged
  357. // for storage of the uploaded parts. Only after you either complete or abort
  358. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  359. // you for the parts storage.
  360. //
  361. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  362. // with awserr.Error's Code and Message methods to get detailed information about
  363. // the error.
  364. //
  365. // See the AWS API reference guide for Amazon Simple Storage Service's
  366. // API operation CreateMultipartUpload for usage and error information.
  367. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  368. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  369. req, out := c.CreateMultipartUploadRequest(input)
  370. return out, req.Send()
  371. }
  372. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  373. // the ability to pass a context and additional request options.
  374. //
  375. // See CreateMultipartUpload for details on how to use this API operation.
  376. //
  377. // The context must be non-nil and will be used for request cancellation. If
  378. // the context is nil a panic will occur. In the future the SDK may create
  379. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  380. // for more information on using Contexts.
  381. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  382. req, out := c.CreateMultipartUploadRequest(input)
  383. req.SetContext(ctx)
  384. req.ApplyOptions(opts...)
  385. return out, req.Send()
  386. }
  387. const opDeleteBucket = "DeleteBucket"
  388. // DeleteBucketRequest generates a "aws/request.Request" representing the
  389. // client's request for the DeleteBucket operation. The "output" return
  390. // value can be used to capture response data after the request's "Send" method
  391. // is called.
  392. //
  393. // See DeleteBucket for usage and error information.
  394. //
  395. // Creating a request object using this method should be used when you want to inject
  396. // custom logic into the request's lifecycle using a custom handler, or if you want to
  397. // access properties on the request object before or after sending the request. If
  398. // you just want the service response, call the DeleteBucket method directly
  399. // instead.
  400. //
  401. // Note: You must call the "Send" method on the returned request object in order
  402. // to execute the request.
  403. //
  404. // // Example sending a request using the DeleteBucketRequest method.
  405. // req, resp := client.DeleteBucketRequest(params)
  406. //
  407. // err := req.Send()
  408. // if err == nil { // resp is now filled
  409. // fmt.Println(resp)
  410. // }
  411. //
  412. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  413. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  414. op := &request.Operation{
  415. Name: opDeleteBucket,
  416. HTTPMethod: "DELETE",
  417. HTTPPath: "/{Bucket}",
  418. }
  419. if input == nil {
  420. input = &DeleteBucketInput{}
  421. }
  422. output = &DeleteBucketOutput{}
  423. req = c.newRequest(op, input, output)
  424. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  425. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  426. return
  427. }
  428. // DeleteBucket API operation for Amazon Simple Storage Service.
  429. //
  430. // Deletes the bucket. All objects (including all object versions and Delete
  431. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  432. //
  433. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  434. // with awserr.Error's Code and Message methods to get detailed information about
  435. // the error.
  436. //
  437. // See the AWS API reference guide for Amazon Simple Storage Service's
  438. // API operation DeleteBucket for usage and error information.
  439. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  440. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  441. req, out := c.DeleteBucketRequest(input)
  442. return out, req.Send()
  443. }
  444. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  445. // the ability to pass a context and additional request options.
  446. //
  447. // See DeleteBucket for details on how to use this API operation.
  448. //
  449. // The context must be non-nil and will be used for request cancellation. If
  450. // the context is nil a panic will occur. In the future the SDK may create
  451. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  452. // for more information on using Contexts.
  453. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  454. req, out := c.DeleteBucketRequest(input)
  455. req.SetContext(ctx)
  456. req.ApplyOptions(opts...)
  457. return out, req.Send()
  458. }
  459. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  460. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  461. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  462. // value can be used to capture response data after the request's "Send" method
  463. // is called.
  464. //
  465. // See DeleteBucketAnalyticsConfiguration for usage and error information.
  466. //
  467. // Creating a request object using this method should be used when you want to inject
  468. // custom logic into the request's lifecycle using a custom handler, or if you want to
  469. // access properties on the request object before or after sending the request. If
  470. // you just want the service response, call the DeleteBucketAnalyticsConfiguration method directly
  471. // instead.
  472. //
  473. // Note: You must call the "Send" method on the returned request object in order
  474. // to execute the request.
  475. //
  476. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  477. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  478. //
  479. // err := req.Send()
  480. // if err == nil { // resp is now filled
  481. // fmt.Println(resp)
  482. // }
  483. //
  484. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  485. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  486. op := &request.Operation{
  487. Name: opDeleteBucketAnalyticsConfiguration,
  488. HTTPMethod: "DELETE",
  489. HTTPPath: "/{Bucket}?analytics",
  490. }
  491. if input == nil {
  492. input = &DeleteBucketAnalyticsConfigurationInput{}
  493. }
  494. output = &DeleteBucketAnalyticsConfigurationOutput{}
  495. req = c.newRequest(op, input, output)
  496. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  497. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  498. return
  499. }
  500. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  501. //
  502. // Deletes an analytics configuration for the bucket (specified by the analytics
  503. // configuration ID).
  504. //
  505. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  506. // with awserr.Error's Code and Message methods to get detailed information about
  507. // the error.
  508. //
  509. // See the AWS API reference guide for Amazon Simple Storage Service's
  510. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  511. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  512. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  513. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  514. return out, req.Send()
  515. }
  516. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  517. // the ability to pass a context and additional request options.
  518. //
  519. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  520. //
  521. // The context must be non-nil and will be used for request cancellation. If
  522. // the context is nil a panic will occur. In the future the SDK may create
  523. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  524. // for more information on using Contexts.
  525. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  526. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  527. req.SetContext(ctx)
  528. req.ApplyOptions(opts...)
  529. return out, req.Send()
  530. }
  531. const opDeleteBucketCors = "DeleteBucketCors"
  532. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  533. // client's request for the DeleteBucketCors operation. The "output" return
  534. // value can be used to capture response data after the request's "Send" method
  535. // is called.
  536. //
  537. // See DeleteBucketCors for usage and error information.
  538. //
  539. // Creating a request object using this method should be used when you want to inject
  540. // custom logic into the request's lifecycle using a custom handler, or if you want to
  541. // access properties on the request object before or after sending the request. If
  542. // you just want the service response, call the DeleteBucketCors method directly
  543. // instead.
  544. //
  545. // Note: You must call the "Send" method on the returned request object in order
  546. // to execute the request.
  547. //
  548. // // Example sending a request using the DeleteBucketCorsRequest method.
  549. // req, resp := client.DeleteBucketCorsRequest(params)
  550. //
  551. // err := req.Send()
  552. // if err == nil { // resp is now filled
  553. // fmt.Println(resp)
  554. // }
  555. //
  556. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  557. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  558. op := &request.Operation{
  559. Name: opDeleteBucketCors,
  560. HTTPMethod: "DELETE",
  561. HTTPPath: "/{Bucket}?cors",
  562. }
  563. if input == nil {
  564. input = &DeleteBucketCorsInput{}
  565. }
  566. output = &DeleteBucketCorsOutput{}
  567. req = c.newRequest(op, input, output)
  568. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  569. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  570. return
  571. }
  572. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  573. //
  574. // Deletes the cors configuration information set for the bucket.
  575. //
  576. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  577. // with awserr.Error's Code and Message methods to get detailed information about
  578. // the error.
  579. //
  580. // See the AWS API reference guide for Amazon Simple Storage Service's
  581. // API operation DeleteBucketCors for usage and error information.
  582. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  583. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  584. req, out := c.DeleteBucketCorsRequest(input)
  585. return out, req.Send()
  586. }
  587. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  588. // the ability to pass a context and additional request options.
  589. //
  590. // See DeleteBucketCors for details on how to use this API operation.
  591. //
  592. // The context must be non-nil and will be used for request cancellation. If
  593. // the context is nil a panic will occur. In the future the SDK may create
  594. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  595. // for more information on using Contexts.
  596. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  597. req, out := c.DeleteBucketCorsRequest(input)
  598. req.SetContext(ctx)
  599. req.ApplyOptions(opts...)
  600. return out, req.Send()
  601. }
  602. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  603. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  604. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  605. // value can be used to capture response data after the request's "Send" method
  606. // is called.
  607. //
  608. // See DeleteBucketInventoryConfiguration for usage and error information.
  609. //
  610. // Creating a request object using this method should be used when you want to inject
  611. // custom logic into the request's lifecycle using a custom handler, or if you want to
  612. // access properties on the request object before or after sending the request. If
  613. // you just want the service response, call the DeleteBucketInventoryConfiguration method directly
  614. // instead.
  615. //
  616. // Note: You must call the "Send" method on the returned request object in order
  617. // to execute the request.
  618. //
  619. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  620. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  621. //
  622. // err := req.Send()
  623. // if err == nil { // resp is now filled
  624. // fmt.Println(resp)
  625. // }
  626. //
  627. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  628. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  629. op := &request.Operation{
  630. Name: opDeleteBucketInventoryConfiguration,
  631. HTTPMethod: "DELETE",
  632. HTTPPath: "/{Bucket}?inventory",
  633. }
  634. if input == nil {
  635. input = &DeleteBucketInventoryConfigurationInput{}
  636. }
  637. output = &DeleteBucketInventoryConfigurationOutput{}
  638. req = c.newRequest(op, input, output)
  639. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  640. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  641. return
  642. }
  643. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  644. //
  645. // Deletes an inventory configuration (identified by the inventory ID) from
  646. // the bucket.
  647. //
  648. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  649. // with awserr.Error's Code and Message methods to get detailed information about
  650. // the error.
  651. //
  652. // See the AWS API reference guide for Amazon Simple Storage Service's
  653. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  654. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  655. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  656. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  657. return out, req.Send()
  658. }
  659. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  660. // the ability to pass a context and additional request options.
  661. //
  662. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  663. //
  664. // The context must be non-nil and will be used for request cancellation. If
  665. // the context is nil a panic will occur. In the future the SDK may create
  666. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  667. // for more information on using Contexts.
  668. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  669. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  670. req.SetContext(ctx)
  671. req.ApplyOptions(opts...)
  672. return out, req.Send()
  673. }
  674. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  675. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  676. // client's request for the DeleteBucketLifecycle operation. The "output" return
  677. // value can be used to capture response data after the request's "Send" method
  678. // is called.
  679. //
  680. // See DeleteBucketLifecycle for usage and error information.
  681. //
  682. // Creating a request object using this method should be used when you want to inject
  683. // custom logic into the request's lifecycle using a custom handler, or if you want to
  684. // access properties on the request object before or after sending the request. If
  685. // you just want the service response, call the DeleteBucketLifecycle method directly
  686. // instead.
  687. //
  688. // Note: You must call the "Send" method on the returned request object in order
  689. // to execute the request.
  690. //
  691. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  692. // req, resp := client.DeleteBucketLifecycleRequest(params)
  693. //
  694. // err := req.Send()
  695. // if err == nil { // resp is now filled
  696. // fmt.Println(resp)
  697. // }
  698. //
  699. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  700. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  701. op := &request.Operation{
  702. Name: opDeleteBucketLifecycle,
  703. HTTPMethod: "DELETE",
  704. HTTPPath: "/{Bucket}?lifecycle",
  705. }
  706. if input == nil {
  707. input = &DeleteBucketLifecycleInput{}
  708. }
  709. output = &DeleteBucketLifecycleOutput{}
  710. req = c.newRequest(op, input, output)
  711. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  712. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  713. return
  714. }
  715. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  716. //
  717. // Deletes the lifecycle configuration from the bucket.
  718. //
  719. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  720. // with awserr.Error's Code and Message methods to get detailed information about
  721. // the error.
  722. //
  723. // See the AWS API reference guide for Amazon Simple Storage Service's
  724. // API operation DeleteBucketLifecycle for usage and error information.
  725. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  726. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  727. req, out := c.DeleteBucketLifecycleRequest(input)
  728. return out, req.Send()
  729. }
  730. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  731. // the ability to pass a context and additional request options.
  732. //
  733. // See DeleteBucketLifecycle for details on how to use this API operation.
  734. //
  735. // The context must be non-nil and will be used for request cancellation. If
  736. // the context is nil a panic will occur. In the future the SDK may create
  737. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  738. // for more information on using Contexts.
  739. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  740. req, out := c.DeleteBucketLifecycleRequest(input)
  741. req.SetContext(ctx)
  742. req.ApplyOptions(opts...)
  743. return out, req.Send()
  744. }
  745. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  746. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  747. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  748. // value can be used to capture response data after the request's "Send" method
  749. // is called.
  750. //
  751. // See DeleteBucketMetricsConfiguration for usage and error information.
  752. //
  753. // Creating a request object using this method should be used when you want to inject
  754. // custom logic into the request's lifecycle using a custom handler, or if you want to
  755. // access properties on the request object before or after sending the request. If
  756. // you just want the service response, call the DeleteBucketMetricsConfiguration method directly
  757. // instead.
  758. //
  759. // Note: You must call the "Send" method on the returned request object in order
  760. // to execute the request.
  761. //
  762. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  763. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  764. //
  765. // err := req.Send()
  766. // if err == nil { // resp is now filled
  767. // fmt.Println(resp)
  768. // }
  769. //
  770. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  771. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  772. op := &request.Operation{
  773. Name: opDeleteBucketMetricsConfiguration,
  774. HTTPMethod: "DELETE",
  775. HTTPPath: "/{Bucket}?metrics",
  776. }
  777. if input == nil {
  778. input = &DeleteBucketMetricsConfigurationInput{}
  779. }
  780. output = &DeleteBucketMetricsConfigurationOutput{}
  781. req = c.newRequest(op, input, output)
  782. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  783. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  784. return
  785. }
  786. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  787. //
  788. // Deletes a metrics configuration (specified by the metrics configuration ID)
  789. // from the bucket.
  790. //
  791. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  792. // with awserr.Error's Code and Message methods to get detailed information about
  793. // the error.
  794. //
  795. // See the AWS API reference guide for Amazon Simple Storage Service's
  796. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  797. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  798. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  799. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  800. return out, req.Send()
  801. }
  802. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  803. // the ability to pass a context and additional request options.
  804. //
  805. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  806. //
  807. // The context must be non-nil and will be used for request cancellation. If
  808. // the context is nil a panic will occur. In the future the SDK may create
  809. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  810. // for more information on using Contexts.
  811. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  812. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  813. req.SetContext(ctx)
  814. req.ApplyOptions(opts...)
  815. return out, req.Send()
  816. }
  817. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  818. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  819. // client's request for the DeleteBucketPolicy operation. The "output" return
  820. // value can be used to capture response data after the request's "Send" method
  821. // is called.
  822. //
  823. // See DeleteBucketPolicy for usage and error information.
  824. //
  825. // Creating a request object using this method should be used when you want to inject
  826. // custom logic into the request's lifecycle using a custom handler, or if you want to
  827. // access properties on the request object before or after sending the request. If
  828. // you just want the service response, call the DeleteBucketPolicy method directly
  829. // instead.
  830. //
  831. // Note: You must call the "Send" method on the returned request object in order
  832. // to execute the request.
  833. //
  834. // // Example sending a request using the DeleteBucketPolicyRequest method.
  835. // req, resp := client.DeleteBucketPolicyRequest(params)
  836. //
  837. // err := req.Send()
  838. // if err == nil { // resp is now filled
  839. // fmt.Println(resp)
  840. // }
  841. //
  842. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  843. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  844. op := &request.Operation{
  845. Name: opDeleteBucketPolicy,
  846. HTTPMethod: "DELETE",
  847. HTTPPath: "/{Bucket}?policy",
  848. }
  849. if input == nil {
  850. input = &DeleteBucketPolicyInput{}
  851. }
  852. output = &DeleteBucketPolicyOutput{}
  853. req = c.newRequest(op, input, output)
  854. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  855. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  856. return
  857. }
  858. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  859. //
  860. // Deletes the policy from the bucket.
  861. //
  862. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  863. // with awserr.Error's Code and Message methods to get detailed information about
  864. // the error.
  865. //
  866. // See the AWS API reference guide for Amazon Simple Storage Service's
  867. // API operation DeleteBucketPolicy for usage and error information.
  868. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  869. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  870. req, out := c.DeleteBucketPolicyRequest(input)
  871. return out, req.Send()
  872. }
  873. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  874. // the ability to pass a context and additional request options.
  875. //
  876. // See DeleteBucketPolicy for details on how to use this API operation.
  877. //
  878. // The context must be non-nil and will be used for request cancellation. If
  879. // the context is nil a panic will occur. In the future the SDK may create
  880. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  881. // for more information on using Contexts.
  882. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  883. req, out := c.DeleteBucketPolicyRequest(input)
  884. req.SetContext(ctx)
  885. req.ApplyOptions(opts...)
  886. return out, req.Send()
  887. }
  888. const opDeleteBucketReplication = "DeleteBucketReplication"
  889. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  890. // client's request for the DeleteBucketReplication operation. The "output" return
  891. // value can be used to capture response data after the request's "Send" method
  892. // is called.
  893. //
  894. // See DeleteBucketReplication for usage and error information.
  895. //
  896. // Creating a request object using this method should be used when you want to inject
  897. // custom logic into the request's lifecycle using a custom handler, or if you want to
  898. // access properties on the request object before or after sending the request. If
  899. // you just want the service response, call the DeleteBucketReplication method directly
  900. // instead.
  901. //
  902. // Note: You must call the "Send" method on the returned request object in order
  903. // to execute the request.
  904. //
  905. // // Example sending a request using the DeleteBucketReplicationRequest method.
  906. // req, resp := client.DeleteBucketReplicationRequest(params)
  907. //
  908. // err := req.Send()
  909. // if err == nil { // resp is now filled
  910. // fmt.Println(resp)
  911. // }
  912. //
  913. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  914. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  915. op := &request.Operation{
  916. Name: opDeleteBucketReplication,
  917. HTTPMethod: "DELETE",
  918. HTTPPath: "/{Bucket}?replication",
  919. }
  920. if input == nil {
  921. input = &DeleteBucketReplicationInput{}
  922. }
  923. output = &DeleteBucketReplicationOutput{}
  924. req = c.newRequest(op, input, output)
  925. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  926. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  927. return
  928. }
  929. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  930. //
  931. // Deletes the replication configuration from the bucket.
  932. //
  933. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  934. // with awserr.Error's Code and Message methods to get detailed information about
  935. // the error.
  936. //
  937. // See the AWS API reference guide for Amazon Simple Storage Service's
  938. // API operation DeleteBucketReplication for usage and error information.
  939. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  940. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  941. req, out := c.DeleteBucketReplicationRequest(input)
  942. return out, req.Send()
  943. }
  944. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  945. // the ability to pass a context and additional request options.
  946. //
  947. // See DeleteBucketReplication for details on how to use this API operation.
  948. //
  949. // The context must be non-nil and will be used for request cancellation. If
  950. // the context is nil a panic will occur. In the future the SDK may create
  951. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  952. // for more information on using Contexts.
  953. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  954. req, out := c.DeleteBucketReplicationRequest(input)
  955. req.SetContext(ctx)
  956. req.ApplyOptions(opts...)
  957. return out, req.Send()
  958. }
  959. const opDeleteBucketTagging = "DeleteBucketTagging"
  960. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  961. // client's request for the DeleteBucketTagging operation. The "output" return
  962. // value can be used to capture response data after the request's "Send" method
  963. // is called.
  964. //
  965. // See DeleteBucketTagging for usage and error information.
  966. //
  967. // Creating a request object using this method should be used when you want to inject
  968. // custom logic into the request's lifecycle using a custom handler, or if you want to
  969. // access properties on the request object before or after sending the request. If
  970. // you just want the service response, call the DeleteBucketTagging method directly
  971. // instead.
  972. //
  973. // Note: You must call the "Send" method on the returned request object in order
  974. // to execute the request.
  975. //
  976. // // Example sending a request using the DeleteBucketTaggingRequest method.
  977. // req, resp := client.DeleteBucketTaggingRequest(params)
  978. //
  979. // err := req.Send()
  980. // if err == nil { // resp is now filled
  981. // fmt.Println(resp)
  982. // }
  983. //
  984. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  985. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  986. op := &request.Operation{
  987. Name: opDeleteBucketTagging,
  988. HTTPMethod: "DELETE",
  989. HTTPPath: "/{Bucket}?tagging",
  990. }
  991. if input == nil {
  992. input = &DeleteBucketTaggingInput{}
  993. }
  994. output = &DeleteBucketTaggingOutput{}
  995. req = c.newRequest(op, input, output)
  996. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  997. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  998. return
  999. }
  1000. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1001. //
  1002. // Deletes the tags from the bucket.
  1003. //
  1004. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1005. // with awserr.Error's Code and Message methods to get detailed information about
  1006. // the error.
  1007. //
  1008. // See the AWS API reference guide for Amazon Simple Storage Service's
  1009. // API operation DeleteBucketTagging for usage and error information.
  1010. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1011. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1012. req, out := c.DeleteBucketTaggingRequest(input)
  1013. return out, req.Send()
  1014. }
  1015. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1016. // the ability to pass a context and additional request options.
  1017. //
  1018. // See DeleteBucketTagging for details on how to use this API operation.
  1019. //
  1020. // The context must be non-nil and will be used for request cancellation. If
  1021. // the context is nil a panic will occur. In the future the SDK may create
  1022. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1023. // for more information on using Contexts.
  1024. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1025. req, out := c.DeleteBucketTaggingRequest(input)
  1026. req.SetContext(ctx)
  1027. req.ApplyOptions(opts...)
  1028. return out, req.Send()
  1029. }
  1030. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1031. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1032. // client's request for the DeleteBucketWebsite operation. The "output" return
  1033. // value can be used to capture response data after the request's "Send" method
  1034. // is called.
  1035. //
  1036. // See DeleteBucketWebsite for usage and error information.
  1037. //
  1038. // Creating a request object using this method should be used when you want to inject
  1039. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1040. // access properties on the request object before or after sending the request. If
  1041. // you just want the service response, call the DeleteBucketWebsite method directly
  1042. // instead.
  1043. //
  1044. // Note: You must call the "Send" method on the returned request object in order
  1045. // to execute the request.
  1046. //
  1047. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1048. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1049. //
  1050. // err := req.Send()
  1051. // if err == nil { // resp is now filled
  1052. // fmt.Println(resp)
  1053. // }
  1054. //
  1055. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1056. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1057. op := &request.Operation{
  1058. Name: opDeleteBucketWebsite,
  1059. HTTPMethod: "DELETE",
  1060. HTTPPath: "/{Bucket}?website",
  1061. }
  1062. if input == nil {
  1063. input = &DeleteBucketWebsiteInput{}
  1064. }
  1065. output = &DeleteBucketWebsiteOutput{}
  1066. req = c.newRequest(op, input, output)
  1067. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1068. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1069. return
  1070. }
  1071. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1072. //
  1073. // This operation removes the website configuration from the bucket.
  1074. //
  1075. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1076. // with awserr.Error's Code and Message methods to get detailed information about
  1077. // the error.
  1078. //
  1079. // See the AWS API reference guide for Amazon Simple Storage Service's
  1080. // API operation DeleteBucketWebsite for usage and error information.
  1081. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1082. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1083. req, out := c.DeleteBucketWebsiteRequest(input)
  1084. return out, req.Send()
  1085. }
  1086. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1087. // the ability to pass a context and additional request options.
  1088. //
  1089. // See DeleteBucketWebsite for details on how to use this API operation.
  1090. //
  1091. // The context must be non-nil and will be used for request cancellation. If
  1092. // the context is nil a panic will occur. In the future the SDK may create
  1093. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1094. // for more information on using Contexts.
  1095. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1096. req, out := c.DeleteBucketWebsiteRequest(input)
  1097. req.SetContext(ctx)
  1098. req.ApplyOptions(opts...)
  1099. return out, req.Send()
  1100. }
  1101. const opDeleteObject = "DeleteObject"
  1102. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1103. // client's request for the DeleteObject operation. The "output" return
  1104. // value can be used to capture response data after the request's "Send" method
  1105. // is called.
  1106. //
  1107. // See DeleteObject for usage and error information.
  1108. //
  1109. // Creating a request object using this method should be used when you want to inject
  1110. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1111. // access properties on the request object before or after sending the request. If
  1112. // you just want the service response, call the DeleteObject method directly
  1113. // instead.
  1114. //
  1115. // Note: You must call the "Send" method on the returned request object in order
  1116. // to execute the request.
  1117. //
  1118. // // Example sending a request using the DeleteObjectRequest method.
  1119. // req, resp := client.DeleteObjectRequest(params)
  1120. //
  1121. // err := req.Send()
  1122. // if err == nil { // resp is now filled
  1123. // fmt.Println(resp)
  1124. // }
  1125. //
  1126. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1127. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1128. op := &request.Operation{
  1129. Name: opDeleteObject,
  1130. HTTPMethod: "DELETE",
  1131. HTTPPath: "/{Bucket}/{Key+}",
  1132. }
  1133. if input == nil {
  1134. input = &DeleteObjectInput{}
  1135. }
  1136. output = &DeleteObjectOutput{}
  1137. req = c.newRequest(op, input, output)
  1138. return
  1139. }
  1140. // DeleteObject API operation for Amazon Simple Storage Service.
  1141. //
  1142. // Removes the null version (if there is one) of an object and inserts a delete
  1143. // marker, which becomes the latest version of the object. If there isn't a
  1144. // null version, Amazon S3 does not remove any objects.
  1145. //
  1146. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1147. // with awserr.Error's Code and Message methods to get detailed information about
  1148. // the error.
  1149. //
  1150. // See the AWS API reference guide for Amazon Simple Storage Service's
  1151. // API operation DeleteObject for usage and error information.
  1152. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1153. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1154. req, out := c.DeleteObjectRequest(input)
  1155. return out, req.Send()
  1156. }
  1157. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1158. // the ability to pass a context and additional request options.
  1159. //
  1160. // See DeleteObject for details on how to use this API operation.
  1161. //
  1162. // The context must be non-nil and will be used for request cancellation. If
  1163. // the context is nil a panic will occur. In the future the SDK may create
  1164. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1165. // for more information on using Contexts.
  1166. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1167. req, out := c.DeleteObjectRequest(input)
  1168. req.SetContext(ctx)
  1169. req.ApplyOptions(opts...)
  1170. return out, req.Send()
  1171. }
  1172. const opDeleteObjectTagging = "DeleteObjectTagging"
  1173. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1174. // client's request for the DeleteObjectTagging operation. The "output" return
  1175. // value can be used to capture response data after the request's "Send" method
  1176. // is called.
  1177. //
  1178. // See DeleteObjectTagging for usage and error information.
  1179. //
  1180. // Creating a request object using this method should be used when you want to inject
  1181. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1182. // access properties on the request object before or after sending the request. If
  1183. // you just want the service response, call the DeleteObjectTagging method directly
  1184. // instead.
  1185. //
  1186. // Note: You must call the "Send" method on the returned request object in order
  1187. // to execute the request.
  1188. //
  1189. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1190. // req, resp := client.DeleteObjectTaggingRequest(params)
  1191. //
  1192. // err := req.Send()
  1193. // if err == nil { // resp is now filled
  1194. // fmt.Println(resp)
  1195. // }
  1196. //
  1197. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1198. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1199. op := &request.Operation{
  1200. Name: opDeleteObjectTagging,
  1201. HTTPMethod: "DELETE",
  1202. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1203. }
  1204. if input == nil {
  1205. input = &DeleteObjectTaggingInput{}
  1206. }
  1207. output = &DeleteObjectTaggingOutput{}
  1208. req = c.newRequest(op, input, output)
  1209. return
  1210. }
  1211. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1212. //
  1213. // Removes the tag-set from an existing object.
  1214. //
  1215. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1216. // with awserr.Error's Code and Message methods to get detailed information about
  1217. // the error.
  1218. //
  1219. // See the AWS API reference guide for Amazon Simple Storage Service's
  1220. // API operation DeleteObjectTagging for usage and error information.
  1221. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1222. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1223. req, out := c.DeleteObjectTaggingRequest(input)
  1224. return out, req.Send()
  1225. }
  1226. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1227. // the ability to pass a context and additional request options.
  1228. //
  1229. // See DeleteObjectTagging for details on how to use this API operation.
  1230. //
  1231. // The context must be non-nil and will be used for request cancellation. If
  1232. // the context is nil a panic will occur. In the future the SDK may create
  1233. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1234. // for more information on using Contexts.
  1235. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1236. req, out := c.DeleteObjectTaggingRequest(input)
  1237. req.SetContext(ctx)
  1238. req.ApplyOptions(opts...)
  1239. return out, req.Send()
  1240. }
  1241. const opDeleteObjects = "DeleteObjects"
  1242. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1243. // client's request for the DeleteObjects operation. The "output" return
  1244. // value can be used to capture response data after the request's "Send" method
  1245. // is called.
  1246. //
  1247. // See DeleteObjects for usage and error information.
  1248. //
  1249. // Creating a request object using this method should be used when you want to inject
  1250. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1251. // access properties on the request object before or after sending the request. If
  1252. // you just want the service response, call the DeleteObjects method directly
  1253. // instead.
  1254. //
  1255. // Note: You must call the "Send" method on the returned request object in order
  1256. // to execute the request.
  1257. //
  1258. // // Example sending a request using the DeleteObjectsRequest method.
  1259. // req, resp := client.DeleteObjectsRequest(params)
  1260. //
  1261. // err := req.Send()
  1262. // if err == nil { // resp is now filled
  1263. // fmt.Println(resp)
  1264. // }
  1265. //
  1266. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1267. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1268. op := &request.Operation{
  1269. Name: opDeleteObjects,
  1270. HTTPMethod: "POST",
  1271. HTTPPath: "/{Bucket}?delete",
  1272. }
  1273. if input == nil {
  1274. input = &DeleteObjectsInput{}
  1275. }
  1276. output = &DeleteObjectsOutput{}
  1277. req = c.newRequest(op, input, output)
  1278. return
  1279. }
  1280. // DeleteObjects API operation for Amazon Simple Storage Service.
  1281. //
  1282. // This operation enables you to delete multiple objects from a bucket using
  1283. // a single HTTP request. You may specify up to 1000 keys.
  1284. //
  1285. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1286. // with awserr.Error's Code and Message methods to get detailed information about
  1287. // the error.
  1288. //
  1289. // See the AWS API reference guide for Amazon Simple Storage Service's
  1290. // API operation DeleteObjects for usage and error information.
  1291. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1292. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1293. req, out := c.DeleteObjectsRequest(input)
  1294. return out, req.Send()
  1295. }
  1296. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1297. // the ability to pass a context and additional request options.
  1298. //
  1299. // See DeleteObjects for details on how to use this API operation.
  1300. //
  1301. // The context must be non-nil and will be used for request cancellation. If
  1302. // the context is nil a panic will occur. In the future the SDK may create
  1303. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1304. // for more information on using Contexts.
  1305. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1306. req, out := c.DeleteObjectsRequest(input)
  1307. req.SetContext(ctx)
  1308. req.ApplyOptions(opts...)
  1309. return out, req.Send()
  1310. }
  1311. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1312. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1313. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1314. // value can be used to capture response data after the request's "Send" method
  1315. // is called.
  1316. //
  1317. // See GetBucketAccelerateConfiguration for usage and error information.
  1318. //
  1319. // Creating a request object using this method should be used when you want to inject
  1320. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1321. // access properties on the request object before or after sending the request. If
  1322. // you just want the service response, call the GetBucketAccelerateConfiguration method directly
  1323. // instead.
  1324. //
  1325. // Note: You must call the "Send" method on the returned request object in order
  1326. // to execute the request.
  1327. //
  1328. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1329. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1330. //
  1331. // err := req.Send()
  1332. // if err == nil { // resp is now filled
  1333. // fmt.Println(resp)
  1334. // }
  1335. //
  1336. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1337. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1338. op := &request.Operation{
  1339. Name: opGetBucketAccelerateConfiguration,
  1340. HTTPMethod: "GET",
  1341. HTTPPath: "/{Bucket}?accelerate",
  1342. }
  1343. if input == nil {
  1344. input = &GetBucketAccelerateConfigurationInput{}
  1345. }
  1346. output = &GetBucketAccelerateConfigurationOutput{}
  1347. req = c.newRequest(op, input, output)
  1348. return
  1349. }
  1350. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1351. //
  1352. // Returns the accelerate configuration of a bucket.
  1353. //
  1354. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1355. // with awserr.Error's Code and Message methods to get detailed information about
  1356. // the error.
  1357. //
  1358. // See the AWS API reference guide for Amazon Simple Storage Service's
  1359. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1360. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1361. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1362. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1363. return out, req.Send()
  1364. }
  1365. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1366. // the ability to pass a context and additional request options.
  1367. //
  1368. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1369. //
  1370. // The context must be non-nil and will be used for request cancellation. If
  1371. // the context is nil a panic will occur. In the future the SDK may create
  1372. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1373. // for more information on using Contexts.
  1374. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1375. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1376. req.SetContext(ctx)
  1377. req.ApplyOptions(opts...)
  1378. return out, req.Send()
  1379. }
  1380. const opGetBucketAcl = "GetBucketAcl"
  1381. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1382. // client's request for the GetBucketAcl operation. The "output" return
  1383. // value can be used to capture response data after the request's "Send" method
  1384. // is called.
  1385. //
  1386. // See GetBucketAcl for usage and error information.
  1387. //
  1388. // Creating a request object using this method should be used when you want to inject
  1389. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1390. // access properties on the request object before or after sending the request. If
  1391. // you just want the service response, call the GetBucketAcl method directly
  1392. // instead.
  1393. //
  1394. // Note: You must call the "Send" method on the returned request object in order
  1395. // to execute the request.
  1396. //
  1397. // // Example sending a request using the GetBucketAclRequest method.
  1398. // req, resp := client.GetBucketAclRequest(params)
  1399. //
  1400. // err := req.Send()
  1401. // if err == nil { // resp is now filled
  1402. // fmt.Println(resp)
  1403. // }
  1404. //
  1405. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1406. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1407. op := &request.Operation{
  1408. Name: opGetBucketAcl,
  1409. HTTPMethod: "GET",
  1410. HTTPPath: "/{Bucket}?acl",
  1411. }
  1412. if input == nil {
  1413. input = &GetBucketAclInput{}
  1414. }
  1415. output = &GetBucketAclOutput{}
  1416. req = c.newRequest(op, input, output)
  1417. return
  1418. }
  1419. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1420. //
  1421. // Gets the access control policy for the bucket.
  1422. //
  1423. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1424. // with awserr.Error's Code and Message methods to get detailed information about
  1425. // the error.
  1426. //
  1427. // See the AWS API reference guide for Amazon Simple Storage Service's
  1428. // API operation GetBucketAcl for usage and error information.
  1429. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1430. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1431. req, out := c.GetBucketAclRequest(input)
  1432. return out, req.Send()
  1433. }
  1434. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1435. // the ability to pass a context and additional request options.
  1436. //
  1437. // See GetBucketAcl for details on how to use this API operation.
  1438. //
  1439. // The context must be non-nil and will be used for request cancellation. If
  1440. // the context is nil a panic will occur. In the future the SDK may create
  1441. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1442. // for more information on using Contexts.
  1443. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1444. req, out := c.GetBucketAclRequest(input)
  1445. req.SetContext(ctx)
  1446. req.ApplyOptions(opts...)
  1447. return out, req.Send()
  1448. }
  1449. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1450. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1451. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1452. // value can be used to capture response data after the request's "Send" method
  1453. // is called.
  1454. //
  1455. // See GetBucketAnalyticsConfiguration for usage and error information.
  1456. //
  1457. // Creating a request object using this method should be used when you want to inject
  1458. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1459. // access properties on the request object before or after sending the request. If
  1460. // you just want the service response, call the GetBucketAnalyticsConfiguration method directly
  1461. // instead.
  1462. //
  1463. // Note: You must call the "Send" method on the returned request object in order
  1464. // to execute the request.
  1465. //
  1466. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1467. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1468. //
  1469. // err := req.Send()
  1470. // if err == nil { // resp is now filled
  1471. // fmt.Println(resp)
  1472. // }
  1473. //
  1474. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1475. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1476. op := &request.Operation{
  1477. Name: opGetBucketAnalyticsConfiguration,
  1478. HTTPMethod: "GET",
  1479. HTTPPath: "/{Bucket}?analytics",
  1480. }
  1481. if input == nil {
  1482. input = &GetBucketAnalyticsConfigurationInput{}
  1483. }
  1484. output = &GetBucketAnalyticsConfigurationOutput{}
  1485. req = c.newRequest(op, input, output)
  1486. return
  1487. }
  1488. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1489. //
  1490. // Gets an analytics configuration for the bucket (specified by the analytics
  1491. // configuration ID).
  1492. //
  1493. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1494. // with awserr.Error's Code and Message methods to get detailed information about
  1495. // the error.
  1496. //
  1497. // See the AWS API reference guide for Amazon Simple Storage Service's
  1498. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1499. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1500. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1501. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1502. return out, req.Send()
  1503. }
  1504. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1505. // the ability to pass a context and additional request options.
  1506. //
  1507. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1508. //
  1509. // The context must be non-nil and will be used for request cancellation. If
  1510. // the context is nil a panic will occur. In the future the SDK may create
  1511. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1512. // for more information on using Contexts.
  1513. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1514. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1515. req.SetContext(ctx)
  1516. req.ApplyOptions(opts...)
  1517. return out, req.Send()
  1518. }
  1519. const opGetBucketCors = "GetBucketCors"
  1520. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1521. // client's request for the GetBucketCors operation. The "output" return
  1522. // value can be used to capture response data after the request's "Send" method
  1523. // is called.
  1524. //
  1525. // See GetBucketCors for usage and error information.
  1526. //
  1527. // Creating a request object using this method should be used when you want to inject
  1528. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1529. // access properties on the request object before or after sending the request. If
  1530. // you just want the service response, call the GetBucketCors method directly
  1531. // instead.
  1532. //
  1533. // Note: You must call the "Send" method on the returned request object in order
  1534. // to execute the request.
  1535. //
  1536. // // Example sending a request using the GetBucketCorsRequest method.
  1537. // req, resp := client.GetBucketCorsRequest(params)
  1538. //
  1539. // err := req.Send()
  1540. // if err == nil { // resp is now filled
  1541. // fmt.Println(resp)
  1542. // }
  1543. //
  1544. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1545. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1546. op := &request.Operation{
  1547. Name: opGetBucketCors,
  1548. HTTPMethod: "GET",
  1549. HTTPPath: "/{Bucket}?cors",
  1550. }
  1551. if input == nil {
  1552. input = &GetBucketCorsInput{}
  1553. }
  1554. output = &GetBucketCorsOutput{}
  1555. req = c.newRequest(op, input, output)
  1556. return
  1557. }
  1558. // GetBucketCors API operation for Amazon Simple Storage Service.
  1559. //
  1560. // Returns the cors configuration for the bucket.
  1561. //
  1562. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1563. // with awserr.Error's Code and Message methods to get detailed information about
  1564. // the error.
  1565. //
  1566. // See the AWS API reference guide for Amazon Simple Storage Service's
  1567. // API operation GetBucketCors for usage and error information.
  1568. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1569. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1570. req, out := c.GetBucketCorsRequest(input)
  1571. return out, req.Send()
  1572. }
  1573. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1574. // the ability to pass a context and additional request options.
  1575. //
  1576. // See GetBucketCors for details on how to use this API operation.
  1577. //
  1578. // The context must be non-nil and will be used for request cancellation. If
  1579. // the context is nil a panic will occur. In the future the SDK may create
  1580. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1581. // for more information on using Contexts.
  1582. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1583. req, out := c.GetBucketCorsRequest(input)
  1584. req.SetContext(ctx)
  1585. req.ApplyOptions(opts...)
  1586. return out, req.Send()
  1587. }
  1588. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1589. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1590. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1591. // value can be used to capture response data after the request's "Send" method
  1592. // is called.
  1593. //
  1594. // See GetBucketInventoryConfiguration for usage and error information.
  1595. //
  1596. // Creating a request object using this method should be used when you want to inject
  1597. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1598. // access properties on the request object before or after sending the request. If
  1599. // you just want the service response, call the GetBucketInventoryConfiguration method directly
  1600. // instead.
  1601. //
  1602. // Note: You must call the "Send" method on the returned request object in order
  1603. // to execute the request.
  1604. //
  1605. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1606. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1607. //
  1608. // err := req.Send()
  1609. // if err == nil { // resp is now filled
  1610. // fmt.Println(resp)
  1611. // }
  1612. //
  1613. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1614. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1615. op := &request.Operation{
  1616. Name: opGetBucketInventoryConfiguration,
  1617. HTTPMethod: "GET",
  1618. HTTPPath: "/{Bucket}?inventory",
  1619. }
  1620. if input == nil {
  1621. input = &GetBucketInventoryConfigurationInput{}
  1622. }
  1623. output = &GetBucketInventoryConfigurationOutput{}
  1624. req = c.newRequest(op, input, output)
  1625. return
  1626. }
  1627. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1628. //
  1629. // Returns an inventory configuration (identified by the inventory ID) from
  1630. // the bucket.
  1631. //
  1632. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1633. // with awserr.Error's Code and Message methods to get detailed information about
  1634. // the error.
  1635. //
  1636. // See the AWS API reference guide for Amazon Simple Storage Service's
  1637. // API operation GetBucketInventoryConfiguration for usage and error information.
  1638. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1639. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1640. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1641. return out, req.Send()
  1642. }
  1643. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1644. // the ability to pass a context and additional request options.
  1645. //
  1646. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1647. //
  1648. // The context must be non-nil and will be used for request cancellation. If
  1649. // the context is nil a panic will occur. In the future the SDK may create
  1650. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1651. // for more information on using Contexts.
  1652. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1653. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1654. req.SetContext(ctx)
  1655. req.ApplyOptions(opts...)
  1656. return out, req.Send()
  1657. }
  1658. const opGetBucketLifecycle = "GetBucketLifecycle"
  1659. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1660. // client's request for the GetBucketLifecycle operation. The "output" return
  1661. // value can be used to capture response data after the request's "Send" method
  1662. // is called.
  1663. //
  1664. // See GetBucketLifecycle for usage and error information.
  1665. //
  1666. // Creating a request object using this method should be used when you want to inject
  1667. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1668. // access properties on the request object before or after sending the request. If
  1669. // you just want the service response, call the GetBucketLifecycle method directly
  1670. // instead.
  1671. //
  1672. // Note: You must call the "Send" method on the returned request object in order
  1673. // to execute the request.
  1674. //
  1675. // // Example sending a request using the GetBucketLifecycleRequest method.
  1676. // req, resp := client.GetBucketLifecycleRequest(params)
  1677. //
  1678. // err := req.Send()
  1679. // if err == nil { // resp is now filled
  1680. // fmt.Println(resp)
  1681. // }
  1682. //
  1683. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1684. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1685. if c.Client.Config.Logger != nil {
  1686. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1687. }
  1688. op := &request.Operation{
  1689. Name: opGetBucketLifecycle,
  1690. HTTPMethod: "GET",
  1691. HTTPPath: "/{Bucket}?lifecycle",
  1692. }
  1693. if input == nil {
  1694. input = &GetBucketLifecycleInput{}
  1695. }
  1696. output = &GetBucketLifecycleOutput{}
  1697. req = c.newRequest(op, input, output)
  1698. return
  1699. }
  1700. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1701. //
  1702. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1703. //
  1704. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1705. // with awserr.Error's Code and Message methods to get detailed information about
  1706. // the error.
  1707. //
  1708. // See the AWS API reference guide for Amazon Simple Storage Service's
  1709. // API operation GetBucketLifecycle for usage and error information.
  1710. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1711. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1712. req, out := c.GetBucketLifecycleRequest(input)
  1713. return out, req.Send()
  1714. }
  1715. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1716. // the ability to pass a context and additional request options.
  1717. //
  1718. // See GetBucketLifecycle for details on how to use this API operation.
  1719. //
  1720. // The context must be non-nil and will be used for request cancellation. If
  1721. // the context is nil a panic will occur. In the future the SDK may create
  1722. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1723. // for more information on using Contexts.
  1724. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1725. req, out := c.GetBucketLifecycleRequest(input)
  1726. req.SetContext(ctx)
  1727. req.ApplyOptions(opts...)
  1728. return out, req.Send()
  1729. }
  1730. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1731. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1732. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1733. // value can be used to capture response data after the request's "Send" method
  1734. // is called.
  1735. //
  1736. // See GetBucketLifecycleConfiguration for usage and error information.
  1737. //
  1738. // Creating a request object using this method should be used when you want to inject
  1739. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1740. // access properties on the request object before or after sending the request. If
  1741. // you just want the service response, call the GetBucketLifecycleConfiguration method directly
  1742. // instead.
  1743. //
  1744. // Note: You must call the "Send" method on the returned request object in order
  1745. // to execute the request.
  1746. //
  1747. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1748. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1749. //
  1750. // err := req.Send()
  1751. // if err == nil { // resp is now filled
  1752. // fmt.Println(resp)
  1753. // }
  1754. //
  1755. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1756. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1757. op := &request.Operation{
  1758. Name: opGetBucketLifecycleConfiguration,
  1759. HTTPMethod: "GET",
  1760. HTTPPath: "/{Bucket}?lifecycle",
  1761. }
  1762. if input == nil {
  1763. input = &GetBucketLifecycleConfigurationInput{}
  1764. }
  1765. output = &GetBucketLifecycleConfigurationOutput{}
  1766. req = c.newRequest(op, input, output)
  1767. return
  1768. }
  1769. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1770. //
  1771. // Returns the lifecycle configuration information set on the bucket.
  1772. //
  1773. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1774. // with awserr.Error's Code and Message methods to get detailed information about
  1775. // the error.
  1776. //
  1777. // See the AWS API reference guide for Amazon Simple Storage Service's
  1778. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1779. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1780. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1781. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1782. return out, req.Send()
  1783. }
  1784. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1785. // the ability to pass a context and additional request options.
  1786. //
  1787. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1788. //
  1789. // The context must be non-nil and will be used for request cancellation. If
  1790. // the context is nil a panic will occur. In the future the SDK may create
  1791. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1792. // for more information on using Contexts.
  1793. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1794. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1795. req.SetContext(ctx)
  1796. req.ApplyOptions(opts...)
  1797. return out, req.Send()
  1798. }
  1799. const opGetBucketLocation = "GetBucketLocation"
  1800. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1801. // client's request for the GetBucketLocation operation. The "output" return
  1802. // value can be used to capture response data after the request's "Send" method
  1803. // is called.
  1804. //
  1805. // See GetBucketLocation for usage and error information.
  1806. //
  1807. // Creating a request object using this method should be used when you want to inject
  1808. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1809. // access properties on the request object before or after sending the request. If
  1810. // you just want the service response, call the GetBucketLocation method directly
  1811. // instead.
  1812. //
  1813. // Note: You must call the "Send" method on the returned request object in order
  1814. // to execute the request.
  1815. //
  1816. // // Example sending a request using the GetBucketLocationRequest method.
  1817. // req, resp := client.GetBucketLocationRequest(params)
  1818. //
  1819. // err := req.Send()
  1820. // if err == nil { // resp is now filled
  1821. // fmt.Println(resp)
  1822. // }
  1823. //
  1824. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1825. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1826. op := &request.Operation{
  1827. Name: opGetBucketLocation,
  1828. HTTPMethod: "GET",
  1829. HTTPPath: "/{Bucket}?location",
  1830. }
  1831. if input == nil {
  1832. input = &GetBucketLocationInput{}
  1833. }
  1834. output = &GetBucketLocationOutput{}
  1835. req = c.newRequest(op, input, output)
  1836. return
  1837. }
  1838. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1839. //
  1840. // Returns the region the bucket resides in.
  1841. //
  1842. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1843. // with awserr.Error's Code and Message methods to get detailed information about
  1844. // the error.
  1845. //
  1846. // See the AWS API reference guide for Amazon Simple Storage Service's
  1847. // API operation GetBucketLocation for usage and error information.
  1848. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1849. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1850. req, out := c.GetBucketLocationRequest(input)
  1851. return out, req.Send()
  1852. }
  1853. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  1854. // the ability to pass a context and additional request options.
  1855. //
  1856. // See GetBucketLocation for details on how to use this API operation.
  1857. //
  1858. // The context must be non-nil and will be used for request cancellation. If
  1859. // the context is nil a panic will occur. In the future the SDK may create
  1860. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1861. // for more information on using Contexts.
  1862. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  1863. req, out := c.GetBucketLocationRequest(input)
  1864. req.SetContext(ctx)
  1865. req.ApplyOptions(opts...)
  1866. return out, req.Send()
  1867. }
  1868. const opGetBucketLogging = "GetBucketLogging"
  1869. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1870. // client's request for the GetBucketLogging operation. The "output" return
  1871. // value can be used to capture response data after the request's "Send" method
  1872. // is called.
  1873. //
  1874. // See GetBucketLogging for usage and error information.
  1875. //
  1876. // Creating a request object using this method should be used when you want to inject
  1877. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1878. // access properties on the request object before or after sending the request. If
  1879. // you just want the service response, call the GetBucketLogging method directly
  1880. // instead.
  1881. //
  1882. // Note: You must call the "Send" method on the returned request object in order
  1883. // to execute the request.
  1884. //
  1885. // // Example sending a request using the GetBucketLoggingRequest method.
  1886. // req, resp := client.GetBucketLoggingRequest(params)
  1887. //
  1888. // err := req.Send()
  1889. // if err == nil { // resp is now filled
  1890. // fmt.Println(resp)
  1891. // }
  1892. //
  1893. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  1894. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  1895. op := &request.Operation{
  1896. Name: opGetBucketLogging,
  1897. HTTPMethod: "GET",
  1898. HTTPPath: "/{Bucket}?logging",
  1899. }
  1900. if input == nil {
  1901. input = &GetBucketLoggingInput{}
  1902. }
  1903. output = &GetBucketLoggingOutput{}
  1904. req = c.newRequest(op, input, output)
  1905. return
  1906. }
  1907. // GetBucketLogging API operation for Amazon Simple Storage Service.
  1908. //
  1909. // Returns the logging status of a bucket and the permissions users have to
  1910. // view and modify that status. To use GET, you must be the bucket owner.
  1911. //
  1912. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1913. // with awserr.Error's Code and Message methods to get detailed information about
  1914. // the error.
  1915. //
  1916. // See the AWS API reference guide for Amazon Simple Storage Service's
  1917. // API operation GetBucketLogging for usage and error information.
  1918. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  1919. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  1920. req, out := c.GetBucketLoggingRequest(input)
  1921. return out, req.Send()
  1922. }
  1923. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  1924. // the ability to pass a context and additional request options.
  1925. //
  1926. // See GetBucketLogging for details on how to use this API operation.
  1927. //
  1928. // The context must be non-nil and will be used for request cancellation. If
  1929. // the context is nil a panic will occur. In the future the SDK may create
  1930. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1931. // for more information on using Contexts.
  1932. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  1933. req, out := c.GetBucketLoggingRequest(input)
  1934. req.SetContext(ctx)
  1935. req.ApplyOptions(opts...)
  1936. return out, req.Send()
  1937. }
  1938. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  1939. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  1940. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  1941. // value can be used to capture response data after the request's "Send" method
  1942. // is called.
  1943. //
  1944. // See GetBucketMetricsConfiguration for usage and error information.
  1945. //
  1946. // Creating a request object using this method should be used when you want to inject
  1947. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1948. // access properties on the request object before or after sending the request. If
  1949. // you just want the service response, call the GetBucketMetricsConfiguration method directly
  1950. // instead.
  1951. //
  1952. // Note: You must call the "Send" method on the returned request object in order
  1953. // to execute the request.
  1954. //
  1955. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  1956. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  1957. //
  1958. // err := req.Send()
  1959. // if err == nil { // resp is now filled
  1960. // fmt.Println(resp)
  1961. // }
  1962. //
  1963. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  1964. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  1965. op := &request.Operation{
  1966. Name: opGetBucketMetricsConfiguration,
  1967. HTTPMethod: "GET",
  1968. HTTPPath: "/{Bucket}?metrics",
  1969. }
  1970. if input == nil {
  1971. input = &GetBucketMetricsConfigurationInput{}
  1972. }
  1973. output = &GetBucketMetricsConfigurationOutput{}
  1974. req = c.newRequest(op, input, output)
  1975. return
  1976. }
  1977. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  1978. //
  1979. // Gets a metrics configuration (specified by the metrics configuration ID)
  1980. // from the bucket.
  1981. //
  1982. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1983. // with awserr.Error's Code and Message methods to get detailed information about
  1984. // the error.
  1985. //
  1986. // See the AWS API reference guide for Amazon Simple Storage Service's
  1987. // API operation GetBucketMetricsConfiguration for usage and error information.
  1988. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  1989. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  1990. req, out := c.GetBucketMetricsConfigurationRequest(input)
  1991. return out, req.Send()
  1992. }
  1993. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  1994. // the ability to pass a context and additional request options.
  1995. //
  1996. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  1997. //
  1998. // The context must be non-nil and will be used for request cancellation. If
  1999. // the context is nil a panic will occur. In the future the SDK may create
  2000. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2001. // for more information on using Contexts.
  2002. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2003. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2004. req.SetContext(ctx)
  2005. req.ApplyOptions(opts...)
  2006. return out, req.Send()
  2007. }
  2008. const opGetBucketNotification = "GetBucketNotification"
  2009. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2010. // client's request for the GetBucketNotification operation. The "output" return
  2011. // value can be used to capture response data after the request's "Send" method
  2012. // is called.
  2013. //
  2014. // See GetBucketNotification for usage and error information.
  2015. //
  2016. // Creating a request object using this method should be used when you want to inject
  2017. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2018. // access properties on the request object before or after sending the request. If
  2019. // you just want the service response, call the GetBucketNotification method directly
  2020. // instead.
  2021. //
  2022. // Note: You must call the "Send" method on the returned request object in order
  2023. // to execute the request.
  2024. //
  2025. // // Example sending a request using the GetBucketNotificationRequest method.
  2026. // req, resp := client.GetBucketNotificationRequest(params)
  2027. //
  2028. // err := req.Send()
  2029. // if err == nil { // resp is now filled
  2030. // fmt.Println(resp)
  2031. // }
  2032. //
  2033. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2034. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2035. if c.Client.Config.Logger != nil {
  2036. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2037. }
  2038. op := &request.Operation{
  2039. Name: opGetBucketNotification,
  2040. HTTPMethod: "GET",
  2041. HTTPPath: "/{Bucket}?notification",
  2042. }
  2043. if input == nil {
  2044. input = &GetBucketNotificationConfigurationRequest{}
  2045. }
  2046. output = &NotificationConfigurationDeprecated{}
  2047. req = c.newRequest(op, input, output)
  2048. return
  2049. }
  2050. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2051. //
  2052. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2053. //
  2054. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2055. // with awserr.Error's Code and Message methods to get detailed information about
  2056. // the error.
  2057. //
  2058. // See the AWS API reference guide for Amazon Simple Storage Service's
  2059. // API operation GetBucketNotification for usage and error information.
  2060. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2061. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2062. req, out := c.GetBucketNotificationRequest(input)
  2063. return out, req.Send()
  2064. }
  2065. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2066. // the ability to pass a context and additional request options.
  2067. //
  2068. // See GetBucketNotification for details on how to use this API operation.
  2069. //
  2070. // The context must be non-nil and will be used for request cancellation. If
  2071. // the context is nil a panic will occur. In the future the SDK may create
  2072. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2073. // for more information on using Contexts.
  2074. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2075. req, out := c.GetBucketNotificationRequest(input)
  2076. req.SetContext(ctx)
  2077. req.ApplyOptions(opts...)
  2078. return out, req.Send()
  2079. }
  2080. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2081. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2082. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2083. // value can be used to capture response data after the request's "Send" method
  2084. // is called.
  2085. //
  2086. // See GetBucketNotificationConfiguration for usage and error information.
  2087. //
  2088. // Creating a request object using this method should be used when you want to inject
  2089. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2090. // access properties on the request object before or after sending the request. If
  2091. // you just want the service response, call the GetBucketNotificationConfiguration method directly
  2092. // instead.
  2093. //
  2094. // Note: You must call the "Send" method on the returned request object in order
  2095. // to execute the request.
  2096. //
  2097. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2098. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2099. //
  2100. // err := req.Send()
  2101. // if err == nil { // resp is now filled
  2102. // fmt.Println(resp)
  2103. // }
  2104. //
  2105. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2106. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2107. op := &request.Operation{
  2108. Name: opGetBucketNotificationConfiguration,
  2109. HTTPMethod: "GET",
  2110. HTTPPath: "/{Bucket}?notification",
  2111. }
  2112. if input == nil {
  2113. input = &GetBucketNotificationConfigurationRequest{}
  2114. }
  2115. output = &NotificationConfiguration{}
  2116. req = c.newRequest(op, input, output)
  2117. return
  2118. }
  2119. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2120. //
  2121. // Returns the notification configuration of a bucket.
  2122. //
  2123. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2124. // with awserr.Error's Code and Message methods to get detailed information about
  2125. // the error.
  2126. //
  2127. // See the AWS API reference guide for Amazon Simple Storage Service's
  2128. // API operation GetBucketNotificationConfiguration for usage and error information.
  2129. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2130. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2131. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2132. return out, req.Send()
  2133. }
  2134. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2135. // the ability to pass a context and additional request options.
  2136. //
  2137. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2138. //
  2139. // The context must be non-nil and will be used for request cancellation. If
  2140. // the context is nil a panic will occur. In the future the SDK may create
  2141. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2142. // for more information on using Contexts.
  2143. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2144. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2145. req.SetContext(ctx)
  2146. req.ApplyOptions(opts...)
  2147. return out, req.Send()
  2148. }
  2149. const opGetBucketPolicy = "GetBucketPolicy"
  2150. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2151. // client's request for the GetBucketPolicy operation. The "output" return
  2152. // value can be used to capture response data after the request's "Send" method
  2153. // is called.
  2154. //
  2155. // See GetBucketPolicy for usage and error information.
  2156. //
  2157. // Creating a request object using this method should be used when you want to inject
  2158. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2159. // access properties on the request object before or after sending the request. If
  2160. // you just want the service response, call the GetBucketPolicy method directly
  2161. // instead.
  2162. //
  2163. // Note: You must call the "Send" method on the returned request object in order
  2164. // to execute the request.
  2165. //
  2166. // // Example sending a request using the GetBucketPolicyRequest method.
  2167. // req, resp := client.GetBucketPolicyRequest(params)
  2168. //
  2169. // err := req.Send()
  2170. // if err == nil { // resp is now filled
  2171. // fmt.Println(resp)
  2172. // }
  2173. //
  2174. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2175. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2176. op := &request.Operation{
  2177. Name: opGetBucketPolicy,
  2178. HTTPMethod: "GET",
  2179. HTTPPath: "/{Bucket}?policy",
  2180. }
  2181. if input == nil {
  2182. input = &GetBucketPolicyInput{}
  2183. }
  2184. output = &GetBucketPolicyOutput{}
  2185. req = c.newRequest(op, input, output)
  2186. return
  2187. }
  2188. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2189. //
  2190. // Returns the policy of a specified bucket.
  2191. //
  2192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2193. // with awserr.Error's Code and Message methods to get detailed information about
  2194. // the error.
  2195. //
  2196. // See the AWS API reference guide for Amazon Simple Storage Service's
  2197. // API operation GetBucketPolicy for usage and error information.
  2198. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2199. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2200. req, out := c.GetBucketPolicyRequest(input)
  2201. return out, req.Send()
  2202. }
  2203. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2204. // the ability to pass a context and additional request options.
  2205. //
  2206. // See GetBucketPolicy for details on how to use this API operation.
  2207. //
  2208. // The context must be non-nil and will be used for request cancellation. If
  2209. // the context is nil a panic will occur. In the future the SDK may create
  2210. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2211. // for more information on using Contexts.
  2212. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2213. req, out := c.GetBucketPolicyRequest(input)
  2214. req.SetContext(ctx)
  2215. req.ApplyOptions(opts...)
  2216. return out, req.Send()
  2217. }
  2218. const opGetBucketReplication = "GetBucketReplication"
  2219. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2220. // client's request for the GetBucketReplication operation. The "output" return
  2221. // value can be used to capture response data after the request's "Send" method
  2222. // is called.
  2223. //
  2224. // See GetBucketReplication for usage and error information.
  2225. //
  2226. // Creating a request object using this method should be used when you want to inject
  2227. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2228. // access properties on the request object before or after sending the request. If
  2229. // you just want the service response, call the GetBucketReplication method directly
  2230. // instead.
  2231. //
  2232. // Note: You must call the "Send" method on the returned request object in order
  2233. // to execute the request.
  2234. //
  2235. // // Example sending a request using the GetBucketReplicationRequest method.
  2236. // req, resp := client.GetBucketReplicationRequest(params)
  2237. //
  2238. // err := req.Send()
  2239. // if err == nil { // resp is now filled
  2240. // fmt.Println(resp)
  2241. // }
  2242. //
  2243. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2244. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2245. op := &request.Operation{
  2246. Name: opGetBucketReplication,
  2247. HTTPMethod: "GET",
  2248. HTTPPath: "/{Bucket}?replication",
  2249. }
  2250. if input == nil {
  2251. input = &GetBucketReplicationInput{}
  2252. }
  2253. output = &GetBucketReplicationOutput{}
  2254. req = c.newRequest(op, input, output)
  2255. return
  2256. }
  2257. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2258. //
  2259. // Returns the replication configuration of a bucket.
  2260. //
  2261. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2262. // with awserr.Error's Code and Message methods to get detailed information about
  2263. // the error.
  2264. //
  2265. // See the AWS API reference guide for Amazon Simple Storage Service's
  2266. // API operation GetBucketReplication for usage and error information.
  2267. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2268. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2269. req, out := c.GetBucketReplicationRequest(input)
  2270. return out, req.Send()
  2271. }
  2272. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2273. // the ability to pass a context and additional request options.
  2274. //
  2275. // See GetBucketReplication for details on how to use this API operation.
  2276. //
  2277. // The context must be non-nil and will be used for request cancellation. If
  2278. // the context is nil a panic will occur. In the future the SDK may create
  2279. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2280. // for more information on using Contexts.
  2281. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2282. req, out := c.GetBucketReplicationRequest(input)
  2283. req.SetContext(ctx)
  2284. req.ApplyOptions(opts...)
  2285. return out, req.Send()
  2286. }
  2287. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2288. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2289. // client's request for the GetBucketRequestPayment operation. The "output" return
  2290. // value can be used to capture response data after the request's "Send" method
  2291. // is called.
  2292. //
  2293. // See GetBucketRequestPayment for usage and error information.
  2294. //
  2295. // Creating a request object using this method should be used when you want to inject
  2296. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2297. // access properties on the request object before or after sending the request. If
  2298. // you just want the service response, call the GetBucketRequestPayment method directly
  2299. // instead.
  2300. //
  2301. // Note: You must call the "Send" method on the returned request object in order
  2302. // to execute the request.
  2303. //
  2304. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2305. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2306. //
  2307. // err := req.Send()
  2308. // if err == nil { // resp is now filled
  2309. // fmt.Println(resp)
  2310. // }
  2311. //
  2312. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2313. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2314. op := &request.Operation{
  2315. Name: opGetBucketRequestPayment,
  2316. HTTPMethod: "GET",
  2317. HTTPPath: "/{Bucket}?requestPayment",
  2318. }
  2319. if input == nil {
  2320. input = &GetBucketRequestPaymentInput{}
  2321. }
  2322. output = &GetBucketRequestPaymentOutput{}
  2323. req = c.newRequest(op, input, output)
  2324. return
  2325. }
  2326. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2327. //
  2328. // Returns the request payment configuration of a bucket.
  2329. //
  2330. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2331. // with awserr.Error's Code and Message methods to get detailed information about
  2332. // the error.
  2333. //
  2334. // See the AWS API reference guide for Amazon Simple Storage Service's
  2335. // API operation GetBucketRequestPayment for usage and error information.
  2336. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2337. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2338. req, out := c.GetBucketRequestPaymentRequest(input)
  2339. return out, req.Send()
  2340. }
  2341. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2342. // the ability to pass a context and additional request options.
  2343. //
  2344. // See GetBucketRequestPayment for details on how to use this API operation.
  2345. //
  2346. // The context must be non-nil and will be used for request cancellation. If
  2347. // the context is nil a panic will occur. In the future the SDK may create
  2348. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2349. // for more information on using Contexts.
  2350. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2351. req, out := c.GetBucketRequestPaymentRequest(input)
  2352. req.SetContext(ctx)
  2353. req.ApplyOptions(opts...)
  2354. return out, req.Send()
  2355. }
  2356. const opGetBucketTagging = "GetBucketTagging"
  2357. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2358. // client's request for the GetBucketTagging operation. The "output" return
  2359. // value can be used to capture response data after the request's "Send" method
  2360. // is called.
  2361. //
  2362. // See GetBucketTagging for usage and error information.
  2363. //
  2364. // Creating a request object using this method should be used when you want to inject
  2365. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2366. // access properties on the request object before or after sending the request. If
  2367. // you just want the service response, call the GetBucketTagging method directly
  2368. // instead.
  2369. //
  2370. // Note: You must call the "Send" method on the returned request object in order
  2371. // to execute the request.
  2372. //
  2373. // // Example sending a request using the GetBucketTaggingRequest method.
  2374. // req, resp := client.GetBucketTaggingRequest(params)
  2375. //
  2376. // err := req.Send()
  2377. // if err == nil { // resp is now filled
  2378. // fmt.Println(resp)
  2379. // }
  2380. //
  2381. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2382. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2383. op := &request.Operation{
  2384. Name: opGetBucketTagging,
  2385. HTTPMethod: "GET",
  2386. HTTPPath: "/{Bucket}?tagging",
  2387. }
  2388. if input == nil {
  2389. input = &GetBucketTaggingInput{}
  2390. }
  2391. output = &GetBucketTaggingOutput{}
  2392. req = c.newRequest(op, input, output)
  2393. return
  2394. }
  2395. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2396. //
  2397. // Returns the tag set associated with the bucket.
  2398. //
  2399. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2400. // with awserr.Error's Code and Message methods to get detailed information about
  2401. // the error.
  2402. //
  2403. // See the AWS API reference guide for Amazon Simple Storage Service's
  2404. // API operation GetBucketTagging for usage and error information.
  2405. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2406. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2407. req, out := c.GetBucketTaggingRequest(input)
  2408. return out, req.Send()
  2409. }
  2410. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2411. // the ability to pass a context and additional request options.
  2412. //
  2413. // See GetBucketTagging for details on how to use this API operation.
  2414. //
  2415. // The context must be non-nil and will be used for request cancellation. If
  2416. // the context is nil a panic will occur. In the future the SDK may create
  2417. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2418. // for more information on using Contexts.
  2419. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2420. req, out := c.GetBucketTaggingRequest(input)
  2421. req.SetContext(ctx)
  2422. req.ApplyOptions(opts...)
  2423. return out, req.Send()
  2424. }
  2425. const opGetBucketVersioning = "GetBucketVersioning"
  2426. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2427. // client's request for the GetBucketVersioning operation. The "output" return
  2428. // value can be used to capture response data after the request's "Send" method
  2429. // is called.
  2430. //
  2431. // See GetBucketVersioning for usage and error information.
  2432. //
  2433. // Creating a request object using this method should be used when you want to inject
  2434. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2435. // access properties on the request object before or after sending the request. If
  2436. // you just want the service response, call the GetBucketVersioning method directly
  2437. // instead.
  2438. //
  2439. // Note: You must call the "Send" method on the returned request object in order
  2440. // to execute the request.
  2441. //
  2442. // // Example sending a request using the GetBucketVersioningRequest method.
  2443. // req, resp := client.GetBucketVersioningRequest(params)
  2444. //
  2445. // err := req.Send()
  2446. // if err == nil { // resp is now filled
  2447. // fmt.Println(resp)
  2448. // }
  2449. //
  2450. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2451. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2452. op := &request.Operation{
  2453. Name: opGetBucketVersioning,
  2454. HTTPMethod: "GET",
  2455. HTTPPath: "/{Bucket}?versioning",
  2456. }
  2457. if input == nil {
  2458. input = &GetBucketVersioningInput{}
  2459. }
  2460. output = &GetBucketVersioningOutput{}
  2461. req = c.newRequest(op, input, output)
  2462. return
  2463. }
  2464. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2465. //
  2466. // Returns the versioning state of a bucket.
  2467. //
  2468. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2469. // with awserr.Error's Code and Message methods to get detailed information about
  2470. // the error.
  2471. //
  2472. // See the AWS API reference guide for Amazon Simple Storage Service's
  2473. // API operation GetBucketVersioning for usage and error information.
  2474. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2475. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2476. req, out := c.GetBucketVersioningRequest(input)
  2477. return out, req.Send()
  2478. }
  2479. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2480. // the ability to pass a context and additional request options.
  2481. //
  2482. // See GetBucketVersioning for details on how to use this API operation.
  2483. //
  2484. // The context must be non-nil and will be used for request cancellation. If
  2485. // the context is nil a panic will occur. In the future the SDK may create
  2486. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2487. // for more information on using Contexts.
  2488. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2489. req, out := c.GetBucketVersioningRequest(input)
  2490. req.SetContext(ctx)
  2491. req.ApplyOptions(opts...)
  2492. return out, req.Send()
  2493. }
  2494. const opGetBucketWebsite = "GetBucketWebsite"
  2495. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2496. // client's request for the GetBucketWebsite operation. The "output" return
  2497. // value can be used to capture response data after the request's "Send" method
  2498. // is called.
  2499. //
  2500. // See GetBucketWebsite for usage and error information.
  2501. //
  2502. // Creating a request object using this method should be used when you want to inject
  2503. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2504. // access properties on the request object before or after sending the request. If
  2505. // you just want the service response, call the GetBucketWebsite method directly
  2506. // instead.
  2507. //
  2508. // Note: You must call the "Send" method on the returned request object in order
  2509. // to execute the request.
  2510. //
  2511. // // Example sending a request using the GetBucketWebsiteRequest method.
  2512. // req, resp := client.GetBucketWebsiteRequest(params)
  2513. //
  2514. // err := req.Send()
  2515. // if err == nil { // resp is now filled
  2516. // fmt.Println(resp)
  2517. // }
  2518. //
  2519. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2520. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2521. op := &request.Operation{
  2522. Name: opGetBucketWebsite,
  2523. HTTPMethod: "GET",
  2524. HTTPPath: "/{Bucket}?website",
  2525. }
  2526. if input == nil {
  2527. input = &GetBucketWebsiteInput{}
  2528. }
  2529. output = &GetBucketWebsiteOutput{}
  2530. req = c.newRequest(op, input, output)
  2531. return
  2532. }
  2533. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2534. //
  2535. // Returns the website configuration for a bucket.
  2536. //
  2537. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2538. // with awserr.Error's Code and Message methods to get detailed information about
  2539. // the error.
  2540. //
  2541. // See the AWS API reference guide for Amazon Simple Storage Service's
  2542. // API operation GetBucketWebsite for usage and error information.
  2543. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2544. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2545. req, out := c.GetBucketWebsiteRequest(input)
  2546. return out, req.Send()
  2547. }
  2548. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2549. // the ability to pass a context and additional request options.
  2550. //
  2551. // See GetBucketWebsite for details on how to use this API operation.
  2552. //
  2553. // The context must be non-nil and will be used for request cancellation. If
  2554. // the context is nil a panic will occur. In the future the SDK may create
  2555. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2556. // for more information on using Contexts.
  2557. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2558. req, out := c.GetBucketWebsiteRequest(input)
  2559. req.SetContext(ctx)
  2560. req.ApplyOptions(opts...)
  2561. return out, req.Send()
  2562. }
  2563. const opGetObject = "GetObject"
  2564. // GetObjectRequest generates a "aws/request.Request" representing the
  2565. // client's request for the GetObject operation. The "output" return
  2566. // value can be used to capture response data after the request's "Send" method
  2567. // is called.
  2568. //
  2569. // See GetObject for usage and error information.
  2570. //
  2571. // Creating a request object using this method should be used when you want to inject
  2572. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2573. // access properties on the request object before or after sending the request. If
  2574. // you just want the service response, call the GetObject method directly
  2575. // instead.
  2576. //
  2577. // Note: You must call the "Send" method on the returned request object in order
  2578. // to execute the request.
  2579. //
  2580. // // Example sending a request using the GetObjectRequest method.
  2581. // req, resp := client.GetObjectRequest(params)
  2582. //
  2583. // err := req.Send()
  2584. // if err == nil { // resp is now filled
  2585. // fmt.Println(resp)
  2586. // }
  2587. //
  2588. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2589. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2590. op := &request.Operation{
  2591. Name: opGetObject,
  2592. HTTPMethod: "GET",
  2593. HTTPPath: "/{Bucket}/{Key+}",
  2594. }
  2595. if input == nil {
  2596. input = &GetObjectInput{}
  2597. }
  2598. output = &GetObjectOutput{}
  2599. req = c.newRequest(op, input, output)
  2600. return
  2601. }
  2602. // GetObject API operation for Amazon Simple Storage Service.
  2603. //
  2604. // Retrieves objects from Amazon S3.
  2605. //
  2606. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2607. // with awserr.Error's Code and Message methods to get detailed information about
  2608. // the error.
  2609. //
  2610. // See the AWS API reference guide for Amazon Simple Storage Service's
  2611. // API operation GetObject for usage and error information.
  2612. //
  2613. // Returned Error Codes:
  2614. // * ErrCodeNoSuchKey "NoSuchKey"
  2615. // The specified key does not exist.
  2616. //
  2617. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2618. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2619. req, out := c.GetObjectRequest(input)
  2620. return out, req.Send()
  2621. }
  2622. // GetObjectWithContext is the same as GetObject with the addition of
  2623. // the ability to pass a context and additional request options.
  2624. //
  2625. // See GetObject for details on how to use this API operation.
  2626. //
  2627. // The context must be non-nil and will be used for request cancellation. If
  2628. // the context is nil a panic will occur. In the future the SDK may create
  2629. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2630. // for more information on using Contexts.
  2631. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2632. req, out := c.GetObjectRequest(input)
  2633. req.SetContext(ctx)
  2634. req.ApplyOptions(opts...)
  2635. return out, req.Send()
  2636. }
  2637. const opGetObjectAcl = "GetObjectAcl"
  2638. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2639. // client's request for the GetObjectAcl operation. The "output" return
  2640. // value can be used to capture response data after the request's "Send" method
  2641. // is called.
  2642. //
  2643. // See GetObjectAcl for usage and error information.
  2644. //
  2645. // Creating a request object using this method should be used when you want to inject
  2646. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2647. // access properties on the request object before or after sending the request. If
  2648. // you just want the service response, call the GetObjectAcl method directly
  2649. // instead.
  2650. //
  2651. // Note: You must call the "Send" method on the returned request object in order
  2652. // to execute the request.
  2653. //
  2654. // // Example sending a request using the GetObjectAclRequest method.
  2655. // req, resp := client.GetObjectAclRequest(params)
  2656. //
  2657. // err := req.Send()
  2658. // if err == nil { // resp is now filled
  2659. // fmt.Println(resp)
  2660. // }
  2661. //
  2662. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2663. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2664. op := &request.Operation{
  2665. Name: opGetObjectAcl,
  2666. HTTPMethod: "GET",
  2667. HTTPPath: "/{Bucket}/{Key+}?acl",
  2668. }
  2669. if input == nil {
  2670. input = &GetObjectAclInput{}
  2671. }
  2672. output = &GetObjectAclOutput{}
  2673. req = c.newRequest(op, input, output)
  2674. return
  2675. }
  2676. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2677. //
  2678. // Returns the access control list (ACL) of an object.
  2679. //
  2680. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2681. // with awserr.Error's Code and Message methods to get detailed information about
  2682. // the error.
  2683. //
  2684. // See the AWS API reference guide for Amazon Simple Storage Service's
  2685. // API operation GetObjectAcl for usage and error information.
  2686. //
  2687. // Returned Error Codes:
  2688. // * ErrCodeNoSuchKey "NoSuchKey"
  2689. // The specified key does not exist.
  2690. //
  2691. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2692. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2693. req, out := c.GetObjectAclRequest(input)
  2694. return out, req.Send()
  2695. }
  2696. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2697. // the ability to pass a context and additional request options.
  2698. //
  2699. // See GetObjectAcl for details on how to use this API operation.
  2700. //
  2701. // The context must be non-nil and will be used for request cancellation. If
  2702. // the context is nil a panic will occur. In the future the SDK may create
  2703. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2704. // for more information on using Contexts.
  2705. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2706. req, out := c.GetObjectAclRequest(input)
  2707. req.SetContext(ctx)
  2708. req.ApplyOptions(opts...)
  2709. return out, req.Send()
  2710. }
  2711. const opGetObjectTagging = "GetObjectTagging"
  2712. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  2713. // client's request for the GetObjectTagging operation. The "output" return
  2714. // value can be used to capture response data after the request's "Send" method
  2715. // is called.
  2716. //
  2717. // See GetObjectTagging for usage and error information.
  2718. //
  2719. // Creating a request object using this method should be used when you want to inject
  2720. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2721. // access properties on the request object before or after sending the request. If
  2722. // you just want the service response, call the GetObjectTagging method directly
  2723. // instead.
  2724. //
  2725. // Note: You must call the "Send" method on the returned request object in order
  2726. // to execute the request.
  2727. //
  2728. // // Example sending a request using the GetObjectTaggingRequest method.
  2729. // req, resp := client.GetObjectTaggingRequest(params)
  2730. //
  2731. // err := req.Send()
  2732. // if err == nil { // resp is now filled
  2733. // fmt.Println(resp)
  2734. // }
  2735. //
  2736. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2737. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  2738. op := &request.Operation{
  2739. Name: opGetObjectTagging,
  2740. HTTPMethod: "GET",
  2741. HTTPPath: "/{Bucket}/{Key+}?tagging",
  2742. }
  2743. if input == nil {
  2744. input = &GetObjectTaggingInput{}
  2745. }
  2746. output = &GetObjectTaggingOutput{}
  2747. req = c.newRequest(op, input, output)
  2748. return
  2749. }
  2750. // GetObjectTagging API operation for Amazon Simple Storage Service.
  2751. //
  2752. // Returns the tag-set of an object.
  2753. //
  2754. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2755. // with awserr.Error's Code and Message methods to get detailed information about
  2756. // the error.
  2757. //
  2758. // See the AWS API reference guide for Amazon Simple Storage Service's
  2759. // API operation GetObjectTagging for usage and error information.
  2760. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2761. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  2762. req, out := c.GetObjectTaggingRequest(input)
  2763. return out, req.Send()
  2764. }
  2765. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  2766. // the ability to pass a context and additional request options.
  2767. //
  2768. // See GetObjectTagging for details on how to use this API operation.
  2769. //
  2770. // The context must be non-nil and will be used for request cancellation. If
  2771. // the context is nil a panic will occur. In the future the SDK may create
  2772. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2773. // for more information on using Contexts.
  2774. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  2775. req, out := c.GetObjectTaggingRequest(input)
  2776. req.SetContext(ctx)
  2777. req.ApplyOptions(opts...)
  2778. return out, req.Send()
  2779. }
  2780. const opGetObjectTorrent = "GetObjectTorrent"
  2781. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  2782. // client's request for the GetObjectTorrent operation. The "output" return
  2783. // value can be used to capture response data after the request's "Send" method
  2784. // is called.
  2785. //
  2786. // See GetObjectTorrent for usage and error information.
  2787. //
  2788. // Creating a request object using this method should be used when you want to inject
  2789. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2790. // access properties on the request object before or after sending the request. If
  2791. // you just want the service response, call the GetObjectTorrent method directly
  2792. // instead.
  2793. //
  2794. // Note: You must call the "Send" method on the returned request object in order
  2795. // to execute the request.
  2796. //
  2797. // // Example sending a request using the GetObjectTorrentRequest method.
  2798. // req, resp := client.GetObjectTorrentRequest(params)
  2799. //
  2800. // err := req.Send()
  2801. // if err == nil { // resp is now filled
  2802. // fmt.Println(resp)
  2803. // }
  2804. //
  2805. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2806. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  2807. op := &request.Operation{
  2808. Name: opGetObjectTorrent,
  2809. HTTPMethod: "GET",
  2810. HTTPPath: "/{Bucket}/{Key+}?torrent",
  2811. }
  2812. if input == nil {
  2813. input = &GetObjectTorrentInput{}
  2814. }
  2815. output = &GetObjectTorrentOutput{}
  2816. req = c.newRequest(op, input, output)
  2817. return
  2818. }
  2819. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  2820. //
  2821. // Return torrent files from a bucket.
  2822. //
  2823. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2824. // with awserr.Error's Code and Message methods to get detailed information about
  2825. // the error.
  2826. //
  2827. // See the AWS API reference guide for Amazon Simple Storage Service's
  2828. // API operation GetObjectTorrent for usage and error information.
  2829. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2830. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  2831. req, out := c.GetObjectTorrentRequest(input)
  2832. return out, req.Send()
  2833. }
  2834. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  2835. // the ability to pass a context and additional request options.
  2836. //
  2837. // See GetObjectTorrent for details on how to use this API operation.
  2838. //
  2839. // The context must be non-nil and will be used for request cancellation. If
  2840. // the context is nil a panic will occur. In the future the SDK may create
  2841. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2842. // for more information on using Contexts.
  2843. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  2844. req, out := c.GetObjectTorrentRequest(input)
  2845. req.SetContext(ctx)
  2846. req.ApplyOptions(opts...)
  2847. return out, req.Send()
  2848. }
  2849. const opHeadBucket = "HeadBucket"
  2850. // HeadBucketRequest generates a "aws/request.Request" representing the
  2851. // client's request for the HeadBucket operation. The "output" return
  2852. // value can be used to capture response data after the request's "Send" method
  2853. // is called.
  2854. //
  2855. // See HeadBucket for usage and error information.
  2856. //
  2857. // Creating a request object using this method should be used when you want to inject
  2858. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2859. // access properties on the request object before or after sending the request. If
  2860. // you just want the service response, call the HeadBucket method directly
  2861. // instead.
  2862. //
  2863. // Note: You must call the "Send" method on the returned request object in order
  2864. // to execute the request.
  2865. //
  2866. // // Example sending a request using the HeadBucketRequest method.
  2867. // req, resp := client.HeadBucketRequest(params)
  2868. //
  2869. // err := req.Send()
  2870. // if err == nil { // resp is now filled
  2871. // fmt.Println(resp)
  2872. // }
  2873. //
  2874. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2875. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  2876. op := &request.Operation{
  2877. Name: opHeadBucket,
  2878. HTTPMethod: "HEAD",
  2879. HTTPPath: "/{Bucket}",
  2880. }
  2881. if input == nil {
  2882. input = &HeadBucketInput{}
  2883. }
  2884. output = &HeadBucketOutput{}
  2885. req = c.newRequest(op, input, output)
  2886. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2887. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2888. return
  2889. }
  2890. // HeadBucket API operation for Amazon Simple Storage Service.
  2891. //
  2892. // This operation is useful to determine if a bucket exists and you have permission
  2893. // to access it.
  2894. //
  2895. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2896. // with awserr.Error's Code and Message methods to get detailed information about
  2897. // the error.
  2898. //
  2899. // See the AWS API reference guide for Amazon Simple Storage Service's
  2900. // API operation HeadBucket for usage and error information.
  2901. //
  2902. // Returned Error Codes:
  2903. // * ErrCodeNoSuchBucket "NoSuchBucket"
  2904. // The specified bucket does not exist.
  2905. //
  2906. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2907. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  2908. req, out := c.HeadBucketRequest(input)
  2909. return out, req.Send()
  2910. }
  2911. // HeadBucketWithContext is the same as HeadBucket with the addition of
  2912. // the ability to pass a context and additional request options.
  2913. //
  2914. // See HeadBucket for details on how to use this API operation.
  2915. //
  2916. // The context must be non-nil and will be used for request cancellation. If
  2917. // the context is nil a panic will occur. In the future the SDK may create
  2918. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2919. // for more information on using Contexts.
  2920. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  2921. req, out := c.HeadBucketRequest(input)
  2922. req.SetContext(ctx)
  2923. req.ApplyOptions(opts...)
  2924. return out, req.Send()
  2925. }
  2926. const opHeadObject = "HeadObject"
  2927. // HeadObjectRequest generates a "aws/request.Request" representing the
  2928. // client's request for the HeadObject operation. The "output" return
  2929. // value can be used to capture response data after the request's "Send" method
  2930. // is called.
  2931. //
  2932. // See HeadObject for usage and error information.
  2933. //
  2934. // Creating a request object using this method should be used when you want to inject
  2935. // custom logic into the request's lifecycle using a custom handler, or if you want to
  2936. // access properties on the request object before or after sending the request. If
  2937. // you just want the service response, call the HeadObject method directly
  2938. // instead.
  2939. //
  2940. // Note: You must call the "Send" method on the returned request object in order
  2941. // to execute the request.
  2942. //
  2943. // // Example sending a request using the HeadObjectRequest method.
  2944. // req, resp := client.HeadObjectRequest(params)
  2945. //
  2946. // err := req.Send()
  2947. // if err == nil { // resp is now filled
  2948. // fmt.Println(resp)
  2949. // }
  2950. //
  2951. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  2952. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  2953. op := &request.Operation{
  2954. Name: opHeadObject,
  2955. HTTPMethod: "HEAD",
  2956. HTTPPath: "/{Bucket}/{Key+}",
  2957. }
  2958. if input == nil {
  2959. input = &HeadObjectInput{}
  2960. }
  2961. output = &HeadObjectOutput{}
  2962. req = c.newRequest(op, input, output)
  2963. return
  2964. }
  2965. // HeadObject API operation for Amazon Simple Storage Service.
  2966. //
  2967. // The HEAD operation retrieves metadata from an object without returning the
  2968. // object itself. This operation is useful if you're only interested in an object's
  2969. // metadata. To use HEAD, you must have READ access to the object.
  2970. //
  2971. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  2972. // for more information on returned errors.
  2973. //
  2974. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2975. // with awserr.Error's Code and Message methods to get detailed information about
  2976. // the error.
  2977. //
  2978. // See the AWS API reference guide for Amazon Simple Storage Service's
  2979. // API operation HeadObject for usage and error information.
  2980. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  2981. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  2982. req, out := c.HeadObjectRequest(input)
  2983. return out, req.Send()
  2984. }
  2985. // HeadObjectWithContext is the same as HeadObject with the addition of
  2986. // the ability to pass a context and additional request options.
  2987. //
  2988. // See HeadObject for details on how to use this API operation.
  2989. //
  2990. // The context must be non-nil and will be used for request cancellation. If
  2991. // the context is nil a panic will occur. In the future the SDK may create
  2992. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2993. // for more information on using Contexts.
  2994. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  2995. req, out := c.HeadObjectRequest(input)
  2996. req.SetContext(ctx)
  2997. req.ApplyOptions(opts...)
  2998. return out, req.Send()
  2999. }
  3000. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3001. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3002. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3003. // value can be used to capture response data after the request's "Send" method
  3004. // is called.
  3005. //
  3006. // See ListBucketAnalyticsConfigurations for usage and error information.
  3007. //
  3008. // Creating a request object using this method should be used when you want to inject
  3009. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3010. // access properties on the request object before or after sending the request. If
  3011. // you just want the service response, call the ListBucketAnalyticsConfigurations method directly
  3012. // instead.
  3013. //
  3014. // Note: You must call the "Send" method on the returned request object in order
  3015. // to execute the request.
  3016. //
  3017. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3018. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3019. //
  3020. // err := req.Send()
  3021. // if err == nil { // resp is now filled
  3022. // fmt.Println(resp)
  3023. // }
  3024. //
  3025. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3026. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3027. op := &request.Operation{
  3028. Name: opListBucketAnalyticsConfigurations,
  3029. HTTPMethod: "GET",
  3030. HTTPPath: "/{Bucket}?analytics",
  3031. }
  3032. if input == nil {
  3033. input = &ListBucketAnalyticsConfigurationsInput{}
  3034. }
  3035. output = &ListBucketAnalyticsConfigurationsOutput{}
  3036. req = c.newRequest(op, input, output)
  3037. return
  3038. }
  3039. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3040. //
  3041. // Lists the analytics configurations for the bucket.
  3042. //
  3043. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3044. // with awserr.Error's Code and Message methods to get detailed information about
  3045. // the error.
  3046. //
  3047. // See the AWS API reference guide for Amazon Simple Storage Service's
  3048. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3049. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3050. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3051. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3052. return out, req.Send()
  3053. }
  3054. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3055. // the ability to pass a context and additional request options.
  3056. //
  3057. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3058. //
  3059. // The context must be non-nil and will be used for request cancellation. If
  3060. // the context is nil a panic will occur. In the future the SDK may create
  3061. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3062. // for more information on using Contexts.
  3063. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3064. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3065. req.SetContext(ctx)
  3066. req.ApplyOptions(opts...)
  3067. return out, req.Send()
  3068. }
  3069. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3070. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3071. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3072. // value can be used to capture response data after the request's "Send" method
  3073. // is called.
  3074. //
  3075. // See ListBucketInventoryConfigurations for usage and error information.
  3076. //
  3077. // Creating a request object using this method should be used when you want to inject
  3078. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3079. // access properties on the request object before or after sending the request. If
  3080. // you just want the service response, call the ListBucketInventoryConfigurations method directly
  3081. // instead.
  3082. //
  3083. // Note: You must call the "Send" method on the returned request object in order
  3084. // to execute the request.
  3085. //
  3086. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3087. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3088. //
  3089. // err := req.Send()
  3090. // if err == nil { // resp is now filled
  3091. // fmt.Println(resp)
  3092. // }
  3093. //
  3094. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3095. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3096. op := &request.Operation{
  3097. Name: opListBucketInventoryConfigurations,
  3098. HTTPMethod: "GET",
  3099. HTTPPath: "/{Bucket}?inventory",
  3100. }
  3101. if input == nil {
  3102. input = &ListBucketInventoryConfigurationsInput{}
  3103. }
  3104. output = &ListBucketInventoryConfigurationsOutput{}
  3105. req = c.newRequest(op, input, output)
  3106. return
  3107. }
  3108. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3109. //
  3110. // Returns a list of inventory configurations for the bucket.
  3111. //
  3112. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3113. // with awserr.Error's Code and Message methods to get detailed information about
  3114. // the error.
  3115. //
  3116. // See the AWS API reference guide for Amazon Simple Storage Service's
  3117. // API operation ListBucketInventoryConfigurations for usage and error information.
  3118. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3119. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3120. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3121. return out, req.Send()
  3122. }
  3123. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3124. // the ability to pass a context and additional request options.
  3125. //
  3126. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3127. //
  3128. // The context must be non-nil and will be used for request cancellation. If
  3129. // the context is nil a panic will occur. In the future the SDK may create
  3130. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3131. // for more information on using Contexts.
  3132. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3133. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3134. req.SetContext(ctx)
  3135. req.ApplyOptions(opts...)
  3136. return out, req.Send()
  3137. }
  3138. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3139. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3140. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3141. // value can be used to capture response data after the request's "Send" method
  3142. // is called.
  3143. //
  3144. // See ListBucketMetricsConfigurations for usage and error information.
  3145. //
  3146. // Creating a request object using this method should be used when you want to inject
  3147. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3148. // access properties on the request object before or after sending the request. If
  3149. // you just want the service response, call the ListBucketMetricsConfigurations method directly
  3150. // instead.
  3151. //
  3152. // Note: You must call the "Send" method on the returned request object in order
  3153. // to execute the request.
  3154. //
  3155. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3156. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3157. //
  3158. // err := req.Send()
  3159. // if err == nil { // resp is now filled
  3160. // fmt.Println(resp)
  3161. // }
  3162. //
  3163. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3164. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3165. op := &request.Operation{
  3166. Name: opListBucketMetricsConfigurations,
  3167. HTTPMethod: "GET",
  3168. HTTPPath: "/{Bucket}?metrics",
  3169. }
  3170. if input == nil {
  3171. input = &ListBucketMetricsConfigurationsInput{}
  3172. }
  3173. output = &ListBucketMetricsConfigurationsOutput{}
  3174. req = c.newRequest(op, input, output)
  3175. return
  3176. }
  3177. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3178. //
  3179. // Lists the metrics configurations for the bucket.
  3180. //
  3181. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3182. // with awserr.Error's Code and Message methods to get detailed information about
  3183. // the error.
  3184. //
  3185. // See the AWS API reference guide for Amazon Simple Storage Service's
  3186. // API operation ListBucketMetricsConfigurations for usage and error information.
  3187. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3188. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3189. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3190. return out, req.Send()
  3191. }
  3192. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3193. // the ability to pass a context and additional request options.
  3194. //
  3195. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3196. //
  3197. // The context must be non-nil and will be used for request cancellation. If
  3198. // the context is nil a panic will occur. In the future the SDK may create
  3199. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3200. // for more information on using Contexts.
  3201. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3202. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3203. req.SetContext(ctx)
  3204. req.ApplyOptions(opts...)
  3205. return out, req.Send()
  3206. }
  3207. const opListBuckets = "ListBuckets"
  3208. // ListBucketsRequest generates a "aws/request.Request" representing the
  3209. // client's request for the ListBuckets operation. The "output" return
  3210. // value can be used to capture response data after the request's "Send" method
  3211. // is called.
  3212. //
  3213. // See ListBuckets for usage and error information.
  3214. //
  3215. // Creating a request object using this method should be used when you want to inject
  3216. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3217. // access properties on the request object before or after sending the request. If
  3218. // you just want the service response, call the ListBuckets method directly
  3219. // instead.
  3220. //
  3221. // Note: You must call the "Send" method on the returned request object in order
  3222. // to execute the request.
  3223. //
  3224. // // Example sending a request using the ListBucketsRequest method.
  3225. // req, resp := client.ListBucketsRequest(params)
  3226. //
  3227. // err := req.Send()
  3228. // if err == nil { // resp is now filled
  3229. // fmt.Println(resp)
  3230. // }
  3231. //
  3232. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3233. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3234. op := &request.Operation{
  3235. Name: opListBuckets,
  3236. HTTPMethod: "GET",
  3237. HTTPPath: "/",
  3238. }
  3239. if input == nil {
  3240. input = &ListBucketsInput{}
  3241. }
  3242. output = &ListBucketsOutput{}
  3243. req = c.newRequest(op, input, output)
  3244. return
  3245. }
  3246. // ListBuckets API operation for Amazon Simple Storage Service.
  3247. //
  3248. // Returns a list of all buckets owned by the authenticated sender of the request.
  3249. //
  3250. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3251. // with awserr.Error's Code and Message methods to get detailed information about
  3252. // the error.
  3253. //
  3254. // See the AWS API reference guide for Amazon Simple Storage Service's
  3255. // API operation ListBuckets for usage and error information.
  3256. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3257. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3258. req, out := c.ListBucketsRequest(input)
  3259. return out, req.Send()
  3260. }
  3261. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3262. // the ability to pass a context and additional request options.
  3263. //
  3264. // See ListBuckets for details on how to use this API operation.
  3265. //
  3266. // The context must be non-nil and will be used for request cancellation. If
  3267. // the context is nil a panic will occur. In the future the SDK may create
  3268. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3269. // for more information on using Contexts.
  3270. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3271. req, out := c.ListBucketsRequest(input)
  3272. req.SetContext(ctx)
  3273. req.ApplyOptions(opts...)
  3274. return out, req.Send()
  3275. }
  3276. const opListMultipartUploads = "ListMultipartUploads"
  3277. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3278. // client's request for the ListMultipartUploads operation. The "output" return
  3279. // value can be used to capture response data after the request's "Send" method
  3280. // is called.
  3281. //
  3282. // See ListMultipartUploads for usage and error information.
  3283. //
  3284. // Creating a request object using this method should be used when you want to inject
  3285. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3286. // access properties on the request object before or after sending the request. If
  3287. // you just want the service response, call the ListMultipartUploads method directly
  3288. // instead.
  3289. //
  3290. // Note: You must call the "Send" method on the returned request object in order
  3291. // to execute the request.
  3292. //
  3293. // // Example sending a request using the ListMultipartUploadsRequest method.
  3294. // req, resp := client.ListMultipartUploadsRequest(params)
  3295. //
  3296. // err := req.Send()
  3297. // if err == nil { // resp is now filled
  3298. // fmt.Println(resp)
  3299. // }
  3300. //
  3301. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3302. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3303. op := &request.Operation{
  3304. Name: opListMultipartUploads,
  3305. HTTPMethod: "GET",
  3306. HTTPPath: "/{Bucket}?uploads",
  3307. Paginator: &request.Paginator{
  3308. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3309. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3310. LimitToken: "MaxUploads",
  3311. TruncationToken: "IsTruncated",
  3312. },
  3313. }
  3314. if input == nil {
  3315. input = &ListMultipartUploadsInput{}
  3316. }
  3317. output = &ListMultipartUploadsOutput{}
  3318. req = c.newRequest(op, input, output)
  3319. return
  3320. }
  3321. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3322. //
  3323. // This operation lists in-progress multipart uploads.
  3324. //
  3325. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3326. // with awserr.Error's Code and Message methods to get detailed information about
  3327. // the error.
  3328. //
  3329. // See the AWS API reference guide for Amazon Simple Storage Service's
  3330. // API operation ListMultipartUploads for usage and error information.
  3331. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3332. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3333. req, out := c.ListMultipartUploadsRequest(input)
  3334. return out, req.Send()
  3335. }
  3336. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3337. // the ability to pass a context and additional request options.
  3338. //
  3339. // See ListMultipartUploads for details on how to use this API operation.
  3340. //
  3341. // The context must be non-nil and will be used for request cancellation. If
  3342. // the context is nil a panic will occur. In the future the SDK may create
  3343. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3344. // for more information on using Contexts.
  3345. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3346. req, out := c.ListMultipartUploadsRequest(input)
  3347. req.SetContext(ctx)
  3348. req.ApplyOptions(opts...)
  3349. return out, req.Send()
  3350. }
  3351. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3352. // calling the "fn" function with the response data for each page. To stop
  3353. // iterating, return false from the fn function.
  3354. //
  3355. // See ListMultipartUploads method for more information on how to use this operation.
  3356. //
  3357. // Note: This operation can generate multiple requests to a service.
  3358. //
  3359. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3360. // pageNum := 0
  3361. // err := client.ListMultipartUploadsPages(params,
  3362. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3363. // pageNum++
  3364. // fmt.Println(page)
  3365. // return pageNum <= 3
  3366. // })
  3367. //
  3368. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3369. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3370. }
  3371. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3372. // it takes a Context and allows setting request options on the pages.
  3373. //
  3374. // The context must be non-nil and will be used for request cancellation. If
  3375. // the context is nil a panic will occur. In the future the SDK may create
  3376. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3377. // for more information on using Contexts.
  3378. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3379. p := request.Pagination{
  3380. NewRequest: func() (*request.Request, error) {
  3381. var inCpy *ListMultipartUploadsInput
  3382. if input != nil {
  3383. tmp := *input
  3384. inCpy = &tmp
  3385. }
  3386. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3387. req.SetContext(ctx)
  3388. req.ApplyOptions(opts...)
  3389. return req, nil
  3390. },
  3391. }
  3392. cont := true
  3393. for p.Next() && cont {
  3394. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3395. }
  3396. return p.Err()
  3397. }
  3398. const opListObjectVersions = "ListObjectVersions"
  3399. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3400. // client's request for the ListObjectVersions operation. The "output" return
  3401. // value can be used to capture response data after the request's "Send" method
  3402. // is called.
  3403. //
  3404. // See ListObjectVersions for usage and error information.
  3405. //
  3406. // Creating a request object using this method should be used when you want to inject
  3407. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3408. // access properties on the request object before or after sending the request. If
  3409. // you just want the service response, call the ListObjectVersions method directly
  3410. // instead.
  3411. //
  3412. // Note: You must call the "Send" method on the returned request object in order
  3413. // to execute the request.
  3414. //
  3415. // // Example sending a request using the ListObjectVersionsRequest method.
  3416. // req, resp := client.ListObjectVersionsRequest(params)
  3417. //
  3418. // err := req.Send()
  3419. // if err == nil { // resp is now filled
  3420. // fmt.Println(resp)
  3421. // }
  3422. //
  3423. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3424. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3425. op := &request.Operation{
  3426. Name: opListObjectVersions,
  3427. HTTPMethod: "GET",
  3428. HTTPPath: "/{Bucket}?versions",
  3429. Paginator: &request.Paginator{
  3430. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3431. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3432. LimitToken: "MaxKeys",
  3433. TruncationToken: "IsTruncated",
  3434. },
  3435. }
  3436. if input == nil {
  3437. input = &ListObjectVersionsInput{}
  3438. }
  3439. output = &ListObjectVersionsOutput{}
  3440. req = c.newRequest(op, input, output)
  3441. return
  3442. }
  3443. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3444. //
  3445. // Returns metadata about all of the versions of objects in a bucket.
  3446. //
  3447. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3448. // with awserr.Error's Code and Message methods to get detailed information about
  3449. // the error.
  3450. //
  3451. // See the AWS API reference guide for Amazon Simple Storage Service's
  3452. // API operation ListObjectVersions for usage and error information.
  3453. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3454. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3455. req, out := c.ListObjectVersionsRequest(input)
  3456. return out, req.Send()
  3457. }
  3458. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3459. // the ability to pass a context and additional request options.
  3460. //
  3461. // See ListObjectVersions for details on how to use this API operation.
  3462. //
  3463. // The context must be non-nil and will be used for request cancellation. If
  3464. // the context is nil a panic will occur. In the future the SDK may create
  3465. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3466. // for more information on using Contexts.
  3467. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3468. req, out := c.ListObjectVersionsRequest(input)
  3469. req.SetContext(ctx)
  3470. req.ApplyOptions(opts...)
  3471. return out, req.Send()
  3472. }
  3473. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3474. // calling the "fn" function with the response data for each page. To stop
  3475. // iterating, return false from the fn function.
  3476. //
  3477. // See ListObjectVersions method for more information on how to use this operation.
  3478. //
  3479. // Note: This operation can generate multiple requests to a service.
  3480. //
  3481. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3482. // pageNum := 0
  3483. // err := client.ListObjectVersionsPages(params,
  3484. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  3485. // pageNum++
  3486. // fmt.Println(page)
  3487. // return pageNum <= 3
  3488. // })
  3489. //
  3490. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  3491. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  3492. }
  3493. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  3494. // it takes a Context and allows setting request options on the pages.
  3495. //
  3496. // The context must be non-nil and will be used for request cancellation. If
  3497. // the context is nil a panic will occur. In the future the SDK may create
  3498. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3499. // for more information on using Contexts.
  3500. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  3501. p := request.Pagination{
  3502. NewRequest: func() (*request.Request, error) {
  3503. var inCpy *ListObjectVersionsInput
  3504. if input != nil {
  3505. tmp := *input
  3506. inCpy = &tmp
  3507. }
  3508. req, _ := c.ListObjectVersionsRequest(inCpy)
  3509. req.SetContext(ctx)
  3510. req.ApplyOptions(opts...)
  3511. return req, nil
  3512. },
  3513. }
  3514. cont := true
  3515. for p.Next() && cont {
  3516. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  3517. }
  3518. return p.Err()
  3519. }
  3520. const opListObjects = "ListObjects"
  3521. // ListObjectsRequest generates a "aws/request.Request" representing the
  3522. // client's request for the ListObjects operation. The "output" return
  3523. // value can be used to capture response data after the request's "Send" method
  3524. // is called.
  3525. //
  3526. // See ListObjects for usage and error information.
  3527. //
  3528. // Creating a request object using this method should be used when you want to inject
  3529. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3530. // access properties on the request object before or after sending the request. If
  3531. // you just want the service response, call the ListObjects method directly
  3532. // instead.
  3533. //
  3534. // Note: You must call the "Send" method on the returned request object in order
  3535. // to execute the request.
  3536. //
  3537. // // Example sending a request using the ListObjectsRequest method.
  3538. // req, resp := client.ListObjectsRequest(params)
  3539. //
  3540. // err := req.Send()
  3541. // if err == nil { // resp is now filled
  3542. // fmt.Println(resp)
  3543. // }
  3544. //
  3545. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3546. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  3547. op := &request.Operation{
  3548. Name: opListObjects,
  3549. HTTPMethod: "GET",
  3550. HTTPPath: "/{Bucket}",
  3551. Paginator: &request.Paginator{
  3552. InputTokens: []string{"Marker"},
  3553. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  3554. LimitToken: "MaxKeys",
  3555. TruncationToken: "IsTruncated",
  3556. },
  3557. }
  3558. if input == nil {
  3559. input = &ListObjectsInput{}
  3560. }
  3561. output = &ListObjectsOutput{}
  3562. req = c.newRequest(op, input, output)
  3563. return
  3564. }
  3565. // ListObjects API operation for Amazon Simple Storage Service.
  3566. //
  3567. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3568. // the request parameters as selection criteria to return a subset of the objects
  3569. // in a bucket.
  3570. //
  3571. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3572. // with awserr.Error's Code and Message methods to get detailed information about
  3573. // the error.
  3574. //
  3575. // See the AWS API reference guide for Amazon Simple Storage Service's
  3576. // API operation ListObjects for usage and error information.
  3577. //
  3578. // Returned Error Codes:
  3579. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3580. // The specified bucket does not exist.
  3581. //
  3582. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3583. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  3584. req, out := c.ListObjectsRequest(input)
  3585. return out, req.Send()
  3586. }
  3587. // ListObjectsWithContext is the same as ListObjects with the addition of
  3588. // the ability to pass a context and additional request options.
  3589. //
  3590. // See ListObjects for details on how to use this API operation.
  3591. //
  3592. // The context must be non-nil and will be used for request cancellation. If
  3593. // the context is nil a panic will occur. In the future the SDK may create
  3594. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3595. // for more information on using Contexts.
  3596. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  3597. req, out := c.ListObjectsRequest(input)
  3598. req.SetContext(ctx)
  3599. req.ApplyOptions(opts...)
  3600. return out, req.Send()
  3601. }
  3602. // ListObjectsPages iterates over the pages of a ListObjects operation,
  3603. // calling the "fn" function with the response data for each page. To stop
  3604. // iterating, return false from the fn function.
  3605. //
  3606. // See ListObjects method for more information on how to use this operation.
  3607. //
  3608. // Note: This operation can generate multiple requests to a service.
  3609. //
  3610. // // Example iterating over at most 3 pages of a ListObjects operation.
  3611. // pageNum := 0
  3612. // err := client.ListObjectsPages(params,
  3613. // func(page *ListObjectsOutput, lastPage bool) bool {
  3614. // pageNum++
  3615. // fmt.Println(page)
  3616. // return pageNum <= 3
  3617. // })
  3618. //
  3619. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  3620. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  3621. }
  3622. // ListObjectsPagesWithContext same as ListObjectsPages except
  3623. // it takes a Context and allows setting request options on the pages.
  3624. //
  3625. // The context must be non-nil and will be used for request cancellation. If
  3626. // the context is nil a panic will occur. In the future the SDK may create
  3627. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3628. // for more information on using Contexts.
  3629. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  3630. p := request.Pagination{
  3631. NewRequest: func() (*request.Request, error) {
  3632. var inCpy *ListObjectsInput
  3633. if input != nil {
  3634. tmp := *input
  3635. inCpy = &tmp
  3636. }
  3637. req, _ := c.ListObjectsRequest(inCpy)
  3638. req.SetContext(ctx)
  3639. req.ApplyOptions(opts...)
  3640. return req, nil
  3641. },
  3642. }
  3643. cont := true
  3644. for p.Next() && cont {
  3645. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  3646. }
  3647. return p.Err()
  3648. }
  3649. const opListObjectsV2 = "ListObjectsV2"
  3650. // ListObjectsV2Request generates a "aws/request.Request" representing the
  3651. // client's request for the ListObjectsV2 operation. The "output" return
  3652. // value can be used to capture response data after the request's "Send" method
  3653. // is called.
  3654. //
  3655. // See ListObjectsV2 for usage and error information.
  3656. //
  3657. // Creating a request object using this method should be used when you want to inject
  3658. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3659. // access properties on the request object before or after sending the request. If
  3660. // you just want the service response, call the ListObjectsV2 method directly
  3661. // instead.
  3662. //
  3663. // Note: You must call the "Send" method on the returned request object in order
  3664. // to execute the request.
  3665. //
  3666. // // Example sending a request using the ListObjectsV2Request method.
  3667. // req, resp := client.ListObjectsV2Request(params)
  3668. //
  3669. // err := req.Send()
  3670. // if err == nil { // resp is now filled
  3671. // fmt.Println(resp)
  3672. // }
  3673. //
  3674. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3675. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  3676. op := &request.Operation{
  3677. Name: opListObjectsV2,
  3678. HTTPMethod: "GET",
  3679. HTTPPath: "/{Bucket}?list-type=2",
  3680. Paginator: &request.Paginator{
  3681. InputTokens: []string{"ContinuationToken"},
  3682. OutputTokens: []string{"NextContinuationToken"},
  3683. LimitToken: "MaxKeys",
  3684. TruncationToken: "",
  3685. },
  3686. }
  3687. if input == nil {
  3688. input = &ListObjectsV2Input{}
  3689. }
  3690. output = &ListObjectsV2Output{}
  3691. req = c.newRequest(op, input, output)
  3692. return
  3693. }
  3694. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  3695. //
  3696. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3697. // the request parameters as selection criteria to return a subset of the objects
  3698. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  3699. // you use this revised API for new application development.
  3700. //
  3701. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3702. // with awserr.Error's Code and Message methods to get detailed information about
  3703. // the error.
  3704. //
  3705. // See the AWS API reference guide for Amazon Simple Storage Service's
  3706. // API operation ListObjectsV2 for usage and error information.
  3707. //
  3708. // Returned Error Codes:
  3709. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3710. // The specified bucket does not exist.
  3711. //
  3712. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3713. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  3714. req, out := c.ListObjectsV2Request(input)
  3715. return out, req.Send()
  3716. }
  3717. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  3718. // the ability to pass a context and additional request options.
  3719. //
  3720. // See ListObjectsV2 for details on how to use this API operation.
  3721. //
  3722. // The context must be non-nil and will be used for request cancellation. If
  3723. // the context is nil a panic will occur. In the future the SDK may create
  3724. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3725. // for more information on using Contexts.
  3726. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  3727. req, out := c.ListObjectsV2Request(input)
  3728. req.SetContext(ctx)
  3729. req.ApplyOptions(opts...)
  3730. return out, req.Send()
  3731. }
  3732. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  3733. // calling the "fn" function with the response data for each page. To stop
  3734. // iterating, return false from the fn function.
  3735. //
  3736. // See ListObjectsV2 method for more information on how to use this operation.
  3737. //
  3738. // Note: This operation can generate multiple requests to a service.
  3739. //
  3740. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  3741. // pageNum := 0
  3742. // err := client.ListObjectsV2Pages(params,
  3743. // func(page *ListObjectsV2Output, lastPage bool) bool {
  3744. // pageNum++
  3745. // fmt.Println(page)
  3746. // return pageNum <= 3
  3747. // })
  3748. //
  3749. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  3750. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  3751. }
  3752. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  3753. // it takes a Context and allows setting request options on the pages.
  3754. //
  3755. // The context must be non-nil and will be used for request cancellation. If
  3756. // the context is nil a panic will occur. In the future the SDK may create
  3757. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3758. // for more information on using Contexts.
  3759. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  3760. p := request.Pagination{
  3761. NewRequest: func() (*request.Request, error) {
  3762. var inCpy *ListObjectsV2Input
  3763. if input != nil {
  3764. tmp := *input
  3765. inCpy = &tmp
  3766. }
  3767. req, _ := c.ListObjectsV2Request(inCpy)
  3768. req.SetContext(ctx)
  3769. req.ApplyOptions(opts...)
  3770. return req, nil
  3771. },
  3772. }
  3773. cont := true
  3774. for p.Next() && cont {
  3775. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  3776. }
  3777. return p.Err()
  3778. }
  3779. const opListParts = "ListParts"
  3780. // ListPartsRequest generates a "aws/request.Request" representing the
  3781. // client's request for the ListParts operation. The "output" return
  3782. // value can be used to capture response data after the request's "Send" method
  3783. // is called.
  3784. //
  3785. // See ListParts for usage and error information.
  3786. //
  3787. // Creating a request object using this method should be used when you want to inject
  3788. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3789. // access properties on the request object before or after sending the request. If
  3790. // you just want the service response, call the ListParts method directly
  3791. // instead.
  3792. //
  3793. // Note: You must call the "Send" method on the returned request object in order
  3794. // to execute the request.
  3795. //
  3796. // // Example sending a request using the ListPartsRequest method.
  3797. // req, resp := client.ListPartsRequest(params)
  3798. //
  3799. // err := req.Send()
  3800. // if err == nil { // resp is now filled
  3801. // fmt.Println(resp)
  3802. // }
  3803. //
  3804. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3805. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  3806. op := &request.Operation{
  3807. Name: opListParts,
  3808. HTTPMethod: "GET",
  3809. HTTPPath: "/{Bucket}/{Key+}",
  3810. Paginator: &request.Paginator{
  3811. InputTokens: []string{"PartNumberMarker"},
  3812. OutputTokens: []string{"NextPartNumberMarker"},
  3813. LimitToken: "MaxParts",
  3814. TruncationToken: "IsTruncated",
  3815. },
  3816. }
  3817. if input == nil {
  3818. input = &ListPartsInput{}
  3819. }
  3820. output = &ListPartsOutput{}
  3821. req = c.newRequest(op, input, output)
  3822. return
  3823. }
  3824. // ListParts API operation for Amazon Simple Storage Service.
  3825. //
  3826. // Lists the parts that have been uploaded for a specific multipart upload.
  3827. //
  3828. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3829. // with awserr.Error's Code and Message methods to get detailed information about
  3830. // the error.
  3831. //
  3832. // See the AWS API reference guide for Amazon Simple Storage Service's
  3833. // API operation ListParts for usage and error information.
  3834. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3835. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  3836. req, out := c.ListPartsRequest(input)
  3837. return out, req.Send()
  3838. }
  3839. // ListPartsWithContext is the same as ListParts with the addition of
  3840. // the ability to pass a context and additional request options.
  3841. //
  3842. // See ListParts for details on how to use this API operation.
  3843. //
  3844. // The context must be non-nil and will be used for request cancellation. If
  3845. // the context is nil a panic will occur. In the future the SDK may create
  3846. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3847. // for more information on using Contexts.
  3848. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  3849. req, out := c.ListPartsRequest(input)
  3850. req.SetContext(ctx)
  3851. req.ApplyOptions(opts...)
  3852. return out, req.Send()
  3853. }
  3854. // ListPartsPages iterates over the pages of a ListParts operation,
  3855. // calling the "fn" function with the response data for each page. To stop
  3856. // iterating, return false from the fn function.
  3857. //
  3858. // See ListParts method for more information on how to use this operation.
  3859. //
  3860. // Note: This operation can generate multiple requests to a service.
  3861. //
  3862. // // Example iterating over at most 3 pages of a ListParts operation.
  3863. // pageNum := 0
  3864. // err := client.ListPartsPages(params,
  3865. // func(page *ListPartsOutput, lastPage bool) bool {
  3866. // pageNum++
  3867. // fmt.Println(page)
  3868. // return pageNum <= 3
  3869. // })
  3870. //
  3871. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  3872. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  3873. }
  3874. // ListPartsPagesWithContext same as ListPartsPages except
  3875. // it takes a Context and allows setting request options on the pages.
  3876. //
  3877. // The context must be non-nil and will be used for request cancellation. If
  3878. // the context is nil a panic will occur. In the future the SDK may create
  3879. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3880. // for more information on using Contexts.
  3881. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  3882. p := request.Pagination{
  3883. NewRequest: func() (*request.Request, error) {
  3884. var inCpy *ListPartsInput
  3885. if input != nil {
  3886. tmp := *input
  3887. inCpy = &tmp
  3888. }
  3889. req, _ := c.ListPartsRequest(inCpy)
  3890. req.SetContext(ctx)
  3891. req.ApplyOptions(opts...)
  3892. return req, nil
  3893. },
  3894. }
  3895. cont := true
  3896. for p.Next() && cont {
  3897. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  3898. }
  3899. return p.Err()
  3900. }
  3901. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  3902. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  3903. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  3904. // value can be used to capture response data after the request's "Send" method
  3905. // is called.
  3906. //
  3907. // See PutBucketAccelerateConfiguration for usage and error information.
  3908. //
  3909. // Creating a request object using this method should be used when you want to inject
  3910. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3911. // access properties on the request object before or after sending the request. If
  3912. // you just want the service response, call the PutBucketAccelerateConfiguration method directly
  3913. // instead.
  3914. //
  3915. // Note: You must call the "Send" method on the returned request object in order
  3916. // to execute the request.
  3917. //
  3918. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  3919. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  3920. //
  3921. // err := req.Send()
  3922. // if err == nil { // resp is now filled
  3923. // fmt.Println(resp)
  3924. // }
  3925. //
  3926. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  3927. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  3928. op := &request.Operation{
  3929. Name: opPutBucketAccelerateConfiguration,
  3930. HTTPMethod: "PUT",
  3931. HTTPPath: "/{Bucket}?accelerate",
  3932. }
  3933. if input == nil {
  3934. input = &PutBucketAccelerateConfigurationInput{}
  3935. }
  3936. output = &PutBucketAccelerateConfigurationOutput{}
  3937. req = c.newRequest(op, input, output)
  3938. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  3939. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  3940. return
  3941. }
  3942. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  3943. //
  3944. // Sets the accelerate configuration of an existing bucket.
  3945. //
  3946. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3947. // with awserr.Error's Code and Message methods to get detailed information about
  3948. // the error.
  3949. //
  3950. // See the AWS API reference guide for Amazon Simple Storage Service's
  3951. // API operation PutBucketAccelerateConfiguration for usage and error information.
  3952. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  3953. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  3954. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  3955. return out, req.Send()
  3956. }
  3957. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  3958. // the ability to pass a context and additional request options.
  3959. //
  3960. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  3961. //
  3962. // The context must be non-nil and will be used for request cancellation. If
  3963. // the context is nil a panic will occur. In the future the SDK may create
  3964. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3965. // for more information on using Contexts.
  3966. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  3967. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  3968. req.SetContext(ctx)
  3969. req.ApplyOptions(opts...)
  3970. return out, req.Send()
  3971. }
  3972. const opPutBucketAcl = "PutBucketAcl"
  3973. // PutBucketAclRequest generates a "aws/request.Request" representing the
  3974. // client's request for the PutBucketAcl operation. The "output" return
  3975. // value can be used to capture response data after the request's "Send" method
  3976. // is called.
  3977. //
  3978. // See PutBucketAcl for usage and error information.
  3979. //
  3980. // Creating a request object using this method should be used when you want to inject
  3981. // custom logic into the request's lifecycle using a custom handler, or if you want to
  3982. // access properties on the request object before or after sending the request. If
  3983. // you just want the service response, call the PutBucketAcl method directly
  3984. // instead.
  3985. //
  3986. // Note: You must call the "Send" method on the returned request object in order
  3987. // to execute the request.
  3988. //
  3989. // // Example sending a request using the PutBucketAclRequest method.
  3990. // req, resp := client.PutBucketAclRequest(params)
  3991. //
  3992. // err := req.Send()
  3993. // if err == nil { // resp is now filled
  3994. // fmt.Println(resp)
  3995. // }
  3996. //
  3997. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  3998. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  3999. op := &request.Operation{
  4000. Name: opPutBucketAcl,
  4001. HTTPMethod: "PUT",
  4002. HTTPPath: "/{Bucket}?acl",
  4003. }
  4004. if input == nil {
  4005. input = &PutBucketAclInput{}
  4006. }
  4007. output = &PutBucketAclOutput{}
  4008. req = c.newRequest(op, input, output)
  4009. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4010. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4011. return
  4012. }
  4013. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4014. //
  4015. // Sets the permissions on a bucket using access control lists (ACL).
  4016. //
  4017. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4018. // with awserr.Error's Code and Message methods to get detailed information about
  4019. // the error.
  4020. //
  4021. // See the AWS API reference guide for Amazon Simple Storage Service's
  4022. // API operation PutBucketAcl for usage and error information.
  4023. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4024. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4025. req, out := c.PutBucketAclRequest(input)
  4026. return out, req.Send()
  4027. }
  4028. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4029. // the ability to pass a context and additional request options.
  4030. //
  4031. // See PutBucketAcl for details on how to use this API operation.
  4032. //
  4033. // The context must be non-nil and will be used for request cancellation. If
  4034. // the context is nil a panic will occur. In the future the SDK may create
  4035. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4036. // for more information on using Contexts.
  4037. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4038. req, out := c.PutBucketAclRequest(input)
  4039. req.SetContext(ctx)
  4040. req.ApplyOptions(opts...)
  4041. return out, req.Send()
  4042. }
  4043. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4044. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4045. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4046. // value can be used to capture response data after the request's "Send" method
  4047. // is called.
  4048. //
  4049. // See PutBucketAnalyticsConfiguration for usage and error information.
  4050. //
  4051. // Creating a request object using this method should be used when you want to inject
  4052. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4053. // access properties on the request object before or after sending the request. If
  4054. // you just want the service response, call the PutBucketAnalyticsConfiguration method directly
  4055. // instead.
  4056. //
  4057. // Note: You must call the "Send" method on the returned request object in order
  4058. // to execute the request.
  4059. //
  4060. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4061. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4062. //
  4063. // err := req.Send()
  4064. // if err == nil { // resp is now filled
  4065. // fmt.Println(resp)
  4066. // }
  4067. //
  4068. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4069. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4070. op := &request.Operation{
  4071. Name: opPutBucketAnalyticsConfiguration,
  4072. HTTPMethod: "PUT",
  4073. HTTPPath: "/{Bucket}?analytics",
  4074. }
  4075. if input == nil {
  4076. input = &PutBucketAnalyticsConfigurationInput{}
  4077. }
  4078. output = &PutBucketAnalyticsConfigurationOutput{}
  4079. req = c.newRequest(op, input, output)
  4080. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4081. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4082. return
  4083. }
  4084. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4085. //
  4086. // Sets an analytics configuration for the bucket (specified by the analytics
  4087. // configuration ID).
  4088. //
  4089. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4090. // with awserr.Error's Code and Message methods to get detailed information about
  4091. // the error.
  4092. //
  4093. // See the AWS API reference guide for Amazon Simple Storage Service's
  4094. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4095. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4096. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4097. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4098. return out, req.Send()
  4099. }
  4100. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4101. // the ability to pass a context and additional request options.
  4102. //
  4103. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4104. //
  4105. // The context must be non-nil and will be used for request cancellation. If
  4106. // the context is nil a panic will occur. In the future the SDK may create
  4107. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4108. // for more information on using Contexts.
  4109. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4110. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4111. req.SetContext(ctx)
  4112. req.ApplyOptions(opts...)
  4113. return out, req.Send()
  4114. }
  4115. const opPutBucketCors = "PutBucketCors"
  4116. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4117. // client's request for the PutBucketCors operation. The "output" return
  4118. // value can be used to capture response data after the request's "Send" method
  4119. // is called.
  4120. //
  4121. // See PutBucketCors for usage and error information.
  4122. //
  4123. // Creating a request object using this method should be used when you want to inject
  4124. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4125. // access properties on the request object before or after sending the request. If
  4126. // you just want the service response, call the PutBucketCors method directly
  4127. // instead.
  4128. //
  4129. // Note: You must call the "Send" method on the returned request object in order
  4130. // to execute the request.
  4131. //
  4132. // // Example sending a request using the PutBucketCorsRequest method.
  4133. // req, resp := client.PutBucketCorsRequest(params)
  4134. //
  4135. // err := req.Send()
  4136. // if err == nil { // resp is now filled
  4137. // fmt.Println(resp)
  4138. // }
  4139. //
  4140. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4141. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4142. op := &request.Operation{
  4143. Name: opPutBucketCors,
  4144. HTTPMethod: "PUT",
  4145. HTTPPath: "/{Bucket}?cors",
  4146. }
  4147. if input == nil {
  4148. input = &PutBucketCorsInput{}
  4149. }
  4150. output = &PutBucketCorsOutput{}
  4151. req = c.newRequest(op, input, output)
  4152. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4153. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4154. return
  4155. }
  4156. // PutBucketCors API operation for Amazon Simple Storage Service.
  4157. //
  4158. // Sets the cors configuration for a bucket.
  4159. //
  4160. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4161. // with awserr.Error's Code and Message methods to get detailed information about
  4162. // the error.
  4163. //
  4164. // See the AWS API reference guide for Amazon Simple Storage Service's
  4165. // API operation PutBucketCors for usage and error information.
  4166. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4167. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4168. req, out := c.PutBucketCorsRequest(input)
  4169. return out, req.Send()
  4170. }
  4171. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4172. // the ability to pass a context and additional request options.
  4173. //
  4174. // See PutBucketCors for details on how to use this API operation.
  4175. //
  4176. // The context must be non-nil and will be used for request cancellation. If
  4177. // the context is nil a panic will occur. In the future the SDK may create
  4178. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4179. // for more information on using Contexts.
  4180. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4181. req, out := c.PutBucketCorsRequest(input)
  4182. req.SetContext(ctx)
  4183. req.ApplyOptions(opts...)
  4184. return out, req.Send()
  4185. }
  4186. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4187. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4188. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4189. // value can be used to capture response data after the request's "Send" method
  4190. // is called.
  4191. //
  4192. // See PutBucketInventoryConfiguration for usage and error information.
  4193. //
  4194. // Creating a request object using this method should be used when you want to inject
  4195. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4196. // access properties on the request object before or after sending the request. If
  4197. // you just want the service response, call the PutBucketInventoryConfiguration method directly
  4198. // instead.
  4199. //
  4200. // Note: You must call the "Send" method on the returned request object in order
  4201. // to execute the request.
  4202. //
  4203. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4204. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4205. //
  4206. // err := req.Send()
  4207. // if err == nil { // resp is now filled
  4208. // fmt.Println(resp)
  4209. // }
  4210. //
  4211. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4212. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4213. op := &request.Operation{
  4214. Name: opPutBucketInventoryConfiguration,
  4215. HTTPMethod: "PUT",
  4216. HTTPPath: "/{Bucket}?inventory",
  4217. }
  4218. if input == nil {
  4219. input = &PutBucketInventoryConfigurationInput{}
  4220. }
  4221. output = &PutBucketInventoryConfigurationOutput{}
  4222. req = c.newRequest(op, input, output)
  4223. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4224. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4225. return
  4226. }
  4227. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4228. //
  4229. // Adds an inventory configuration (identified by the inventory ID) from the
  4230. // bucket.
  4231. //
  4232. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4233. // with awserr.Error's Code and Message methods to get detailed information about
  4234. // the error.
  4235. //
  4236. // See the AWS API reference guide for Amazon Simple Storage Service's
  4237. // API operation PutBucketInventoryConfiguration for usage and error information.
  4238. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4239. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4240. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4241. return out, req.Send()
  4242. }
  4243. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4244. // the ability to pass a context and additional request options.
  4245. //
  4246. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4247. //
  4248. // The context must be non-nil and will be used for request cancellation. If
  4249. // the context is nil a panic will occur. In the future the SDK may create
  4250. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4251. // for more information on using Contexts.
  4252. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4253. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4254. req.SetContext(ctx)
  4255. req.ApplyOptions(opts...)
  4256. return out, req.Send()
  4257. }
  4258. const opPutBucketLifecycle = "PutBucketLifecycle"
  4259. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4260. // client's request for the PutBucketLifecycle operation. The "output" return
  4261. // value can be used to capture response data after the request's "Send" method
  4262. // is called.
  4263. //
  4264. // See PutBucketLifecycle for usage and error information.
  4265. //
  4266. // Creating a request object using this method should be used when you want to inject
  4267. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4268. // access properties on the request object before or after sending the request. If
  4269. // you just want the service response, call the PutBucketLifecycle method directly
  4270. // instead.
  4271. //
  4272. // Note: You must call the "Send" method on the returned request object in order
  4273. // to execute the request.
  4274. //
  4275. // // Example sending a request using the PutBucketLifecycleRequest method.
  4276. // req, resp := client.PutBucketLifecycleRequest(params)
  4277. //
  4278. // err := req.Send()
  4279. // if err == nil { // resp is now filled
  4280. // fmt.Println(resp)
  4281. // }
  4282. //
  4283. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4284. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4285. if c.Client.Config.Logger != nil {
  4286. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4287. }
  4288. op := &request.Operation{
  4289. Name: opPutBucketLifecycle,
  4290. HTTPMethod: "PUT",
  4291. HTTPPath: "/{Bucket}?lifecycle",
  4292. }
  4293. if input == nil {
  4294. input = &PutBucketLifecycleInput{}
  4295. }
  4296. output = &PutBucketLifecycleOutput{}
  4297. req = c.newRequest(op, input, output)
  4298. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4299. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4300. return
  4301. }
  4302. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4303. //
  4304. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4305. //
  4306. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4307. // with awserr.Error's Code and Message methods to get detailed information about
  4308. // the error.
  4309. //
  4310. // See the AWS API reference guide for Amazon Simple Storage Service's
  4311. // API operation PutBucketLifecycle for usage and error information.
  4312. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4313. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4314. req, out := c.PutBucketLifecycleRequest(input)
  4315. return out, req.Send()
  4316. }
  4317. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4318. // the ability to pass a context and additional request options.
  4319. //
  4320. // See PutBucketLifecycle for details on how to use this API operation.
  4321. //
  4322. // The context must be non-nil and will be used for request cancellation. If
  4323. // the context is nil a panic will occur. In the future the SDK may create
  4324. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4325. // for more information on using Contexts.
  4326. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4327. req, out := c.PutBucketLifecycleRequest(input)
  4328. req.SetContext(ctx)
  4329. req.ApplyOptions(opts...)
  4330. return out, req.Send()
  4331. }
  4332. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4333. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4334. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4335. // value can be used to capture response data after the request's "Send" method
  4336. // is called.
  4337. //
  4338. // See PutBucketLifecycleConfiguration for usage and error information.
  4339. //
  4340. // Creating a request object using this method should be used when you want to inject
  4341. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4342. // access properties on the request object before or after sending the request. If
  4343. // you just want the service response, call the PutBucketLifecycleConfiguration method directly
  4344. // instead.
  4345. //
  4346. // Note: You must call the "Send" method on the returned request object in order
  4347. // to execute the request.
  4348. //
  4349. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4350. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4351. //
  4352. // err := req.Send()
  4353. // if err == nil { // resp is now filled
  4354. // fmt.Println(resp)
  4355. // }
  4356. //
  4357. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4358. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4359. op := &request.Operation{
  4360. Name: opPutBucketLifecycleConfiguration,
  4361. HTTPMethod: "PUT",
  4362. HTTPPath: "/{Bucket}?lifecycle",
  4363. }
  4364. if input == nil {
  4365. input = &PutBucketLifecycleConfigurationInput{}
  4366. }
  4367. output = &PutBucketLifecycleConfigurationOutput{}
  4368. req = c.newRequest(op, input, output)
  4369. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4370. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4371. return
  4372. }
  4373. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4374. //
  4375. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4376. // exists, it replaces it.
  4377. //
  4378. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4379. // with awserr.Error's Code and Message methods to get detailed information about
  4380. // the error.
  4381. //
  4382. // See the AWS API reference guide for Amazon Simple Storage Service's
  4383. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4384. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4385. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4386. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4387. return out, req.Send()
  4388. }
  4389. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4390. // the ability to pass a context and additional request options.
  4391. //
  4392. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4393. //
  4394. // The context must be non-nil and will be used for request cancellation. If
  4395. // the context is nil a panic will occur. In the future the SDK may create
  4396. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4397. // for more information on using Contexts.
  4398. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4399. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4400. req.SetContext(ctx)
  4401. req.ApplyOptions(opts...)
  4402. return out, req.Send()
  4403. }
  4404. const opPutBucketLogging = "PutBucketLogging"
  4405. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4406. // client's request for the PutBucketLogging operation. The "output" return
  4407. // value can be used to capture response data after the request's "Send" method
  4408. // is called.
  4409. //
  4410. // See PutBucketLogging for usage and error information.
  4411. //
  4412. // Creating a request object using this method should be used when you want to inject
  4413. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4414. // access properties on the request object before or after sending the request. If
  4415. // you just want the service response, call the PutBucketLogging method directly
  4416. // instead.
  4417. //
  4418. // Note: You must call the "Send" method on the returned request object in order
  4419. // to execute the request.
  4420. //
  4421. // // Example sending a request using the PutBucketLoggingRequest method.
  4422. // req, resp := client.PutBucketLoggingRequest(params)
  4423. //
  4424. // err := req.Send()
  4425. // if err == nil { // resp is now filled
  4426. // fmt.Println(resp)
  4427. // }
  4428. //
  4429. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4430. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  4431. op := &request.Operation{
  4432. Name: opPutBucketLogging,
  4433. HTTPMethod: "PUT",
  4434. HTTPPath: "/{Bucket}?logging",
  4435. }
  4436. if input == nil {
  4437. input = &PutBucketLoggingInput{}
  4438. }
  4439. output = &PutBucketLoggingOutput{}
  4440. req = c.newRequest(op, input, output)
  4441. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4442. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4443. return
  4444. }
  4445. // PutBucketLogging API operation for Amazon Simple Storage Service.
  4446. //
  4447. // Set the logging parameters for a bucket and to specify permissions for who
  4448. // can view and modify the logging parameters. To set the logging status of
  4449. // a bucket, you must be the bucket owner.
  4450. //
  4451. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4452. // with awserr.Error's Code and Message methods to get detailed information about
  4453. // the error.
  4454. //
  4455. // See the AWS API reference guide for Amazon Simple Storage Service's
  4456. // API operation PutBucketLogging for usage and error information.
  4457. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4458. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  4459. req, out := c.PutBucketLoggingRequest(input)
  4460. return out, req.Send()
  4461. }
  4462. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  4463. // the ability to pass a context and additional request options.
  4464. //
  4465. // See PutBucketLogging for details on how to use this API operation.
  4466. //
  4467. // The context must be non-nil and will be used for request cancellation. If
  4468. // the context is nil a panic will occur. In the future the SDK may create
  4469. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4470. // for more information on using Contexts.
  4471. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  4472. req, out := c.PutBucketLoggingRequest(input)
  4473. req.SetContext(ctx)
  4474. req.ApplyOptions(opts...)
  4475. return out, req.Send()
  4476. }
  4477. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  4478. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  4479. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  4480. // value can be used to capture response data after the request's "Send" method
  4481. // is called.
  4482. //
  4483. // See PutBucketMetricsConfiguration for usage and error information.
  4484. //
  4485. // Creating a request object using this method should be used when you want to inject
  4486. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4487. // access properties on the request object before or after sending the request. If
  4488. // you just want the service response, call the PutBucketMetricsConfiguration method directly
  4489. // instead.
  4490. //
  4491. // Note: You must call the "Send" method on the returned request object in order
  4492. // to execute the request.
  4493. //
  4494. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  4495. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  4496. //
  4497. // err := req.Send()
  4498. // if err == nil { // resp is now filled
  4499. // fmt.Println(resp)
  4500. // }
  4501. //
  4502. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4503. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  4504. op := &request.Operation{
  4505. Name: opPutBucketMetricsConfiguration,
  4506. HTTPMethod: "PUT",
  4507. HTTPPath: "/{Bucket}?metrics",
  4508. }
  4509. if input == nil {
  4510. input = &PutBucketMetricsConfigurationInput{}
  4511. }
  4512. output = &PutBucketMetricsConfigurationOutput{}
  4513. req = c.newRequest(op, input, output)
  4514. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4515. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4516. return
  4517. }
  4518. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  4519. //
  4520. // Sets a metrics configuration (specified by the metrics configuration ID)
  4521. // for the bucket.
  4522. //
  4523. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4524. // with awserr.Error's Code and Message methods to get detailed information about
  4525. // the error.
  4526. //
  4527. // See the AWS API reference guide for Amazon Simple Storage Service's
  4528. // API operation PutBucketMetricsConfiguration for usage and error information.
  4529. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4530. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  4531. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4532. return out, req.Send()
  4533. }
  4534. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  4535. // the ability to pass a context and additional request options.
  4536. //
  4537. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  4538. //
  4539. // The context must be non-nil and will be used for request cancellation. If
  4540. // the context is nil a panic will occur. In the future the SDK may create
  4541. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4542. // for more information on using Contexts.
  4543. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  4544. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4545. req.SetContext(ctx)
  4546. req.ApplyOptions(opts...)
  4547. return out, req.Send()
  4548. }
  4549. const opPutBucketNotification = "PutBucketNotification"
  4550. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  4551. // client's request for the PutBucketNotification operation. The "output" return
  4552. // value can be used to capture response data after the request's "Send" method
  4553. // is called.
  4554. //
  4555. // See PutBucketNotification for usage and error information.
  4556. //
  4557. // Creating a request object using this method should be used when you want to inject
  4558. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4559. // access properties on the request object before or after sending the request. If
  4560. // you just want the service response, call the PutBucketNotification method directly
  4561. // instead.
  4562. //
  4563. // Note: You must call the "Send" method on the returned request object in order
  4564. // to execute the request.
  4565. //
  4566. // // Example sending a request using the PutBucketNotificationRequest method.
  4567. // req, resp := client.PutBucketNotificationRequest(params)
  4568. //
  4569. // err := req.Send()
  4570. // if err == nil { // resp is now filled
  4571. // fmt.Println(resp)
  4572. // }
  4573. //
  4574. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4575. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  4576. if c.Client.Config.Logger != nil {
  4577. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  4578. }
  4579. op := &request.Operation{
  4580. Name: opPutBucketNotification,
  4581. HTTPMethod: "PUT",
  4582. HTTPPath: "/{Bucket}?notification",
  4583. }
  4584. if input == nil {
  4585. input = &PutBucketNotificationInput{}
  4586. }
  4587. output = &PutBucketNotificationOutput{}
  4588. req = c.newRequest(op, input, output)
  4589. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4590. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4591. return
  4592. }
  4593. // PutBucketNotification API operation for Amazon Simple Storage Service.
  4594. //
  4595. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  4596. //
  4597. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4598. // with awserr.Error's Code and Message methods to get detailed information about
  4599. // the error.
  4600. //
  4601. // See the AWS API reference guide for Amazon Simple Storage Service's
  4602. // API operation PutBucketNotification for usage and error information.
  4603. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4604. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  4605. req, out := c.PutBucketNotificationRequest(input)
  4606. return out, req.Send()
  4607. }
  4608. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  4609. // the ability to pass a context and additional request options.
  4610. //
  4611. // See PutBucketNotification for details on how to use this API operation.
  4612. //
  4613. // The context must be non-nil and will be used for request cancellation. If
  4614. // the context is nil a panic will occur. In the future the SDK may create
  4615. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4616. // for more information on using Contexts.
  4617. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  4618. req, out := c.PutBucketNotificationRequest(input)
  4619. req.SetContext(ctx)
  4620. req.ApplyOptions(opts...)
  4621. return out, req.Send()
  4622. }
  4623. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  4624. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  4625. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  4626. // value can be used to capture response data after the request's "Send" method
  4627. // is called.
  4628. //
  4629. // See PutBucketNotificationConfiguration for usage and error information.
  4630. //
  4631. // Creating a request object using this method should be used when you want to inject
  4632. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4633. // access properties on the request object before or after sending the request. If
  4634. // you just want the service response, call the PutBucketNotificationConfiguration method directly
  4635. // instead.
  4636. //
  4637. // Note: You must call the "Send" method on the returned request object in order
  4638. // to execute the request.
  4639. //
  4640. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  4641. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  4642. //
  4643. // err := req.Send()
  4644. // if err == nil { // resp is now filled
  4645. // fmt.Println(resp)
  4646. // }
  4647. //
  4648. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4649. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  4650. op := &request.Operation{
  4651. Name: opPutBucketNotificationConfiguration,
  4652. HTTPMethod: "PUT",
  4653. HTTPPath: "/{Bucket}?notification",
  4654. }
  4655. if input == nil {
  4656. input = &PutBucketNotificationConfigurationInput{}
  4657. }
  4658. output = &PutBucketNotificationConfigurationOutput{}
  4659. req = c.newRequest(op, input, output)
  4660. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4661. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4662. return
  4663. }
  4664. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  4665. //
  4666. // Enables notifications of specified events for a bucket.
  4667. //
  4668. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4669. // with awserr.Error's Code and Message methods to get detailed information about
  4670. // the error.
  4671. //
  4672. // See the AWS API reference guide for Amazon Simple Storage Service's
  4673. // API operation PutBucketNotificationConfiguration for usage and error information.
  4674. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4675. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  4676. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4677. return out, req.Send()
  4678. }
  4679. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  4680. // the ability to pass a context and additional request options.
  4681. //
  4682. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  4683. //
  4684. // The context must be non-nil and will be used for request cancellation. If
  4685. // the context is nil a panic will occur. In the future the SDK may create
  4686. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4687. // for more information on using Contexts.
  4688. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  4689. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4690. req.SetContext(ctx)
  4691. req.ApplyOptions(opts...)
  4692. return out, req.Send()
  4693. }
  4694. const opPutBucketPolicy = "PutBucketPolicy"
  4695. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  4696. // client's request for the PutBucketPolicy operation. The "output" return
  4697. // value can be used to capture response data after the request's "Send" method
  4698. // is called.
  4699. //
  4700. // See PutBucketPolicy for usage and error information.
  4701. //
  4702. // Creating a request object using this method should be used when you want to inject
  4703. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4704. // access properties on the request object before or after sending the request. If
  4705. // you just want the service response, call the PutBucketPolicy method directly
  4706. // instead.
  4707. //
  4708. // Note: You must call the "Send" method on the returned request object in order
  4709. // to execute the request.
  4710. //
  4711. // // Example sending a request using the PutBucketPolicyRequest method.
  4712. // req, resp := client.PutBucketPolicyRequest(params)
  4713. //
  4714. // err := req.Send()
  4715. // if err == nil { // resp is now filled
  4716. // fmt.Println(resp)
  4717. // }
  4718. //
  4719. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4720. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  4721. op := &request.Operation{
  4722. Name: opPutBucketPolicy,
  4723. HTTPMethod: "PUT",
  4724. HTTPPath: "/{Bucket}?policy",
  4725. }
  4726. if input == nil {
  4727. input = &PutBucketPolicyInput{}
  4728. }
  4729. output = &PutBucketPolicyOutput{}
  4730. req = c.newRequest(op, input, output)
  4731. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4732. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4733. return
  4734. }
  4735. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  4736. //
  4737. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  4738. // in this request completely replaces it.
  4739. //
  4740. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4741. // with awserr.Error's Code and Message methods to get detailed information about
  4742. // the error.
  4743. //
  4744. // See the AWS API reference guide for Amazon Simple Storage Service's
  4745. // API operation PutBucketPolicy for usage and error information.
  4746. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4747. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  4748. req, out := c.PutBucketPolicyRequest(input)
  4749. return out, req.Send()
  4750. }
  4751. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  4752. // the ability to pass a context and additional request options.
  4753. //
  4754. // See PutBucketPolicy for details on how to use this API operation.
  4755. //
  4756. // The context must be non-nil and will be used for request cancellation. If
  4757. // the context is nil a panic will occur. In the future the SDK may create
  4758. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4759. // for more information on using Contexts.
  4760. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  4761. req, out := c.PutBucketPolicyRequest(input)
  4762. req.SetContext(ctx)
  4763. req.ApplyOptions(opts...)
  4764. return out, req.Send()
  4765. }
  4766. const opPutBucketReplication = "PutBucketReplication"
  4767. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  4768. // client's request for the PutBucketReplication operation. The "output" return
  4769. // value can be used to capture response data after the request's "Send" method
  4770. // is called.
  4771. //
  4772. // See PutBucketReplication for usage and error information.
  4773. //
  4774. // Creating a request object using this method should be used when you want to inject
  4775. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4776. // access properties on the request object before or after sending the request. If
  4777. // you just want the service response, call the PutBucketReplication method directly
  4778. // instead.
  4779. //
  4780. // Note: You must call the "Send" method on the returned request object in order
  4781. // to execute the request.
  4782. //
  4783. // // Example sending a request using the PutBucketReplicationRequest method.
  4784. // req, resp := client.PutBucketReplicationRequest(params)
  4785. //
  4786. // err := req.Send()
  4787. // if err == nil { // resp is now filled
  4788. // fmt.Println(resp)
  4789. // }
  4790. //
  4791. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4792. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  4793. op := &request.Operation{
  4794. Name: opPutBucketReplication,
  4795. HTTPMethod: "PUT",
  4796. HTTPPath: "/{Bucket}?replication",
  4797. }
  4798. if input == nil {
  4799. input = &PutBucketReplicationInput{}
  4800. }
  4801. output = &PutBucketReplicationOutput{}
  4802. req = c.newRequest(op, input, output)
  4803. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4804. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4805. return
  4806. }
  4807. // PutBucketReplication API operation for Amazon Simple Storage Service.
  4808. //
  4809. // Creates a new replication configuration (or replaces an existing one, if
  4810. // present).
  4811. //
  4812. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4813. // with awserr.Error's Code and Message methods to get detailed information about
  4814. // the error.
  4815. //
  4816. // See the AWS API reference guide for Amazon Simple Storage Service's
  4817. // API operation PutBucketReplication for usage and error information.
  4818. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4819. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  4820. req, out := c.PutBucketReplicationRequest(input)
  4821. return out, req.Send()
  4822. }
  4823. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  4824. // the ability to pass a context and additional request options.
  4825. //
  4826. // See PutBucketReplication for details on how to use this API operation.
  4827. //
  4828. // The context must be non-nil and will be used for request cancellation. If
  4829. // the context is nil a panic will occur. In the future the SDK may create
  4830. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4831. // for more information on using Contexts.
  4832. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  4833. req, out := c.PutBucketReplicationRequest(input)
  4834. req.SetContext(ctx)
  4835. req.ApplyOptions(opts...)
  4836. return out, req.Send()
  4837. }
  4838. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  4839. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  4840. // client's request for the PutBucketRequestPayment operation. The "output" return
  4841. // value can be used to capture response data after the request's "Send" method
  4842. // is called.
  4843. //
  4844. // See PutBucketRequestPayment for usage and error information.
  4845. //
  4846. // Creating a request object using this method should be used when you want to inject
  4847. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4848. // access properties on the request object before or after sending the request. If
  4849. // you just want the service response, call the PutBucketRequestPayment method directly
  4850. // instead.
  4851. //
  4852. // Note: You must call the "Send" method on the returned request object in order
  4853. // to execute the request.
  4854. //
  4855. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  4856. // req, resp := client.PutBucketRequestPaymentRequest(params)
  4857. //
  4858. // err := req.Send()
  4859. // if err == nil { // resp is now filled
  4860. // fmt.Println(resp)
  4861. // }
  4862. //
  4863. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  4864. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  4865. op := &request.Operation{
  4866. Name: opPutBucketRequestPayment,
  4867. HTTPMethod: "PUT",
  4868. HTTPPath: "/{Bucket}?requestPayment",
  4869. }
  4870. if input == nil {
  4871. input = &PutBucketRequestPaymentInput{}
  4872. }
  4873. output = &PutBucketRequestPaymentOutput{}
  4874. req = c.newRequest(op, input, output)
  4875. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4876. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4877. return
  4878. }
  4879. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  4880. //
  4881. // Sets the request payment configuration for a bucket. By default, the bucket
  4882. // owner pays for downloads from the bucket. This configuration parameter enables
  4883. // the bucket owner (only) to specify that the person requesting the download
  4884. // will be charged for the download. Documentation on requester pays buckets
  4885. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  4886. //
  4887. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4888. // with awserr.Error's Code and Message methods to get detailed information about
  4889. // the error.
  4890. //
  4891. // See the AWS API reference guide for Amazon Simple Storage Service's
  4892. // API operation PutBucketRequestPayment for usage and error information.
  4893. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  4894. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  4895. req, out := c.PutBucketRequestPaymentRequest(input)
  4896. return out, req.Send()
  4897. }
  4898. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  4899. // the ability to pass a context and additional request options.
  4900. //
  4901. // See PutBucketRequestPayment for details on how to use this API operation.
  4902. //
  4903. // The context must be non-nil and will be used for request cancellation. If
  4904. // the context is nil a panic will occur. In the future the SDK may create
  4905. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4906. // for more information on using Contexts.
  4907. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  4908. req, out := c.PutBucketRequestPaymentRequest(input)
  4909. req.SetContext(ctx)
  4910. req.ApplyOptions(opts...)
  4911. return out, req.Send()
  4912. }
  4913. const opPutBucketTagging = "PutBucketTagging"
  4914. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  4915. // client's request for the PutBucketTagging operation. The "output" return
  4916. // value can be used to capture response data after the request's "Send" method
  4917. // is called.
  4918. //
  4919. // See PutBucketTagging for usage and error information.
  4920. //
  4921. // Creating a request object using this method should be used when you want to inject
  4922. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4923. // access properties on the request object before or after sending the request. If
  4924. // you just want the service response, call the PutBucketTagging method directly
  4925. // instead.
  4926. //
  4927. // Note: You must call the "Send" method on the returned request object in order
  4928. // to execute the request.
  4929. //
  4930. // // Example sending a request using the PutBucketTaggingRequest method.
  4931. // req, resp := client.PutBucketTaggingRequest(params)
  4932. //
  4933. // err := req.Send()
  4934. // if err == nil { // resp is now filled
  4935. // fmt.Println(resp)
  4936. // }
  4937. //
  4938. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  4939. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  4940. op := &request.Operation{
  4941. Name: opPutBucketTagging,
  4942. HTTPMethod: "PUT",
  4943. HTTPPath: "/{Bucket}?tagging",
  4944. }
  4945. if input == nil {
  4946. input = &PutBucketTaggingInput{}
  4947. }
  4948. output = &PutBucketTaggingOutput{}
  4949. req = c.newRequest(op, input, output)
  4950. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4951. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4952. return
  4953. }
  4954. // PutBucketTagging API operation for Amazon Simple Storage Service.
  4955. //
  4956. // Sets the tags for a bucket.
  4957. //
  4958. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4959. // with awserr.Error's Code and Message methods to get detailed information about
  4960. // the error.
  4961. //
  4962. // See the AWS API reference guide for Amazon Simple Storage Service's
  4963. // API operation PutBucketTagging for usage and error information.
  4964. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  4965. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  4966. req, out := c.PutBucketTaggingRequest(input)
  4967. return out, req.Send()
  4968. }
  4969. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  4970. // the ability to pass a context and additional request options.
  4971. //
  4972. // See PutBucketTagging for details on how to use this API operation.
  4973. //
  4974. // The context must be non-nil and will be used for request cancellation. If
  4975. // the context is nil a panic will occur. In the future the SDK may create
  4976. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4977. // for more information on using Contexts.
  4978. func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  4979. req, out := c.PutBucketTaggingRequest(input)
  4980. req.SetContext(ctx)
  4981. req.ApplyOptions(opts...)
  4982. return out, req.Send()
  4983. }
  4984. const opPutBucketVersioning = "PutBucketVersioning"
  4985. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  4986. // client's request for the PutBucketVersioning operation. The "output" return
  4987. // value can be used to capture response data after the request's "Send" method
  4988. // is called.
  4989. //
  4990. // See PutBucketVersioning for usage and error information.
  4991. //
  4992. // Creating a request object using this method should be used when you want to inject
  4993. // custom logic into the request's lifecycle using a custom handler, or if you want to
  4994. // access properties on the request object before or after sending the request. If
  4995. // you just want the service response, call the PutBucketVersioning method directly
  4996. // instead.
  4997. //
  4998. // Note: You must call the "Send" method on the returned request object in order
  4999. // to execute the request.
  5000. //
  5001. // // Example sending a request using the PutBucketVersioningRequest method.
  5002. // req, resp := client.PutBucketVersioningRequest(params)
  5003. //
  5004. // err := req.Send()
  5005. // if err == nil { // resp is now filled
  5006. // fmt.Println(resp)
  5007. // }
  5008. //
  5009. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5010. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5011. op := &request.Operation{
  5012. Name: opPutBucketVersioning,
  5013. HTTPMethod: "PUT",
  5014. HTTPPath: "/{Bucket}?versioning",
  5015. }
  5016. if input == nil {
  5017. input = &PutBucketVersioningInput{}
  5018. }
  5019. output = &PutBucketVersioningOutput{}
  5020. req = c.newRequest(op, input, output)
  5021. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5022. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5023. return
  5024. }
  5025. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5026. //
  5027. // Sets the versioning state of an existing bucket. To set the versioning state,
  5028. // you must be the bucket owner.
  5029. //
  5030. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5031. // with awserr.Error's Code and Message methods to get detailed information about
  5032. // the error.
  5033. //
  5034. // See the AWS API reference guide for Amazon Simple Storage Service's
  5035. // API operation PutBucketVersioning for usage and error information.
  5036. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5037. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5038. req, out := c.PutBucketVersioningRequest(input)
  5039. return out, req.Send()
  5040. }
  5041. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5042. // the ability to pass a context and additional request options.
  5043. //
  5044. // See PutBucketVersioning for details on how to use this API operation.
  5045. //
  5046. // The context must be non-nil and will be used for request cancellation. If
  5047. // the context is nil a panic will occur. In the future the SDK may create
  5048. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5049. // for more information on using Contexts.
  5050. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5051. req, out := c.PutBucketVersioningRequest(input)
  5052. req.SetContext(ctx)
  5053. req.ApplyOptions(opts...)
  5054. return out, req.Send()
  5055. }
  5056. const opPutBucketWebsite = "PutBucketWebsite"
  5057. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5058. // client's request for the PutBucketWebsite operation. The "output" return
  5059. // value can be used to capture response data after the request's "Send" method
  5060. // is called.
  5061. //
  5062. // See PutBucketWebsite for usage and error information.
  5063. //
  5064. // Creating a request object using this method should be used when you want to inject
  5065. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5066. // access properties on the request object before or after sending the request. If
  5067. // you just want the service response, call the PutBucketWebsite method directly
  5068. // instead.
  5069. //
  5070. // Note: You must call the "Send" method on the returned request object in order
  5071. // to execute the request.
  5072. //
  5073. // // Example sending a request using the PutBucketWebsiteRequest method.
  5074. // req, resp := client.PutBucketWebsiteRequest(params)
  5075. //
  5076. // err := req.Send()
  5077. // if err == nil { // resp is now filled
  5078. // fmt.Println(resp)
  5079. // }
  5080. //
  5081. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5082. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5083. op := &request.Operation{
  5084. Name: opPutBucketWebsite,
  5085. HTTPMethod: "PUT",
  5086. HTTPPath: "/{Bucket}?website",
  5087. }
  5088. if input == nil {
  5089. input = &PutBucketWebsiteInput{}
  5090. }
  5091. output = &PutBucketWebsiteOutput{}
  5092. req = c.newRequest(op, input, output)
  5093. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5094. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5095. return
  5096. }
  5097. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5098. //
  5099. // Set the website configuration for a bucket.
  5100. //
  5101. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5102. // with awserr.Error's Code and Message methods to get detailed information about
  5103. // the error.
  5104. //
  5105. // See the AWS API reference guide for Amazon Simple Storage Service's
  5106. // API operation PutBucketWebsite for usage and error information.
  5107. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5108. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5109. req, out := c.PutBucketWebsiteRequest(input)
  5110. return out, req.Send()
  5111. }
  5112. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5113. // the ability to pass a context and additional request options.
  5114. //
  5115. // See PutBucketWebsite for details on how to use this API operation.
  5116. //
  5117. // The context must be non-nil and will be used for request cancellation. If
  5118. // the context is nil a panic will occur. In the future the SDK may create
  5119. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5120. // for more information on using Contexts.
  5121. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5122. req, out := c.PutBucketWebsiteRequest(input)
  5123. req.SetContext(ctx)
  5124. req.ApplyOptions(opts...)
  5125. return out, req.Send()
  5126. }
  5127. const opPutObject = "PutObject"
  5128. // PutObjectRequest generates a "aws/request.Request" representing the
  5129. // client's request for the PutObject operation. The "output" return
  5130. // value can be used to capture response data after the request's "Send" method
  5131. // is called.
  5132. //
  5133. // See PutObject for usage and error information.
  5134. //
  5135. // Creating a request object using this method should be used when you want to inject
  5136. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5137. // access properties on the request object before or after sending the request. If
  5138. // you just want the service response, call the PutObject method directly
  5139. // instead.
  5140. //
  5141. // Note: You must call the "Send" method on the returned request object in order
  5142. // to execute the request.
  5143. //
  5144. // // Example sending a request using the PutObjectRequest method.
  5145. // req, resp := client.PutObjectRequest(params)
  5146. //
  5147. // err := req.Send()
  5148. // if err == nil { // resp is now filled
  5149. // fmt.Println(resp)
  5150. // }
  5151. //
  5152. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5153. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5154. op := &request.Operation{
  5155. Name: opPutObject,
  5156. HTTPMethod: "PUT",
  5157. HTTPPath: "/{Bucket}/{Key+}",
  5158. }
  5159. if input == nil {
  5160. input = &PutObjectInput{}
  5161. }
  5162. output = &PutObjectOutput{}
  5163. req = c.newRequest(op, input, output)
  5164. return
  5165. }
  5166. // PutObject API operation for Amazon Simple Storage Service.
  5167. //
  5168. // Adds an object to a bucket.
  5169. //
  5170. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5171. // with awserr.Error's Code and Message methods to get detailed information about
  5172. // the error.
  5173. //
  5174. // See the AWS API reference guide for Amazon Simple Storage Service's
  5175. // API operation PutObject for usage and error information.
  5176. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5177. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5178. req, out := c.PutObjectRequest(input)
  5179. return out, req.Send()
  5180. }
  5181. // PutObjectWithContext is the same as PutObject with the addition of
  5182. // the ability to pass a context and additional request options.
  5183. //
  5184. // See PutObject for details on how to use this API operation.
  5185. //
  5186. // The context must be non-nil and will be used for request cancellation. If
  5187. // the context is nil a panic will occur. In the future the SDK may create
  5188. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5189. // for more information on using Contexts.
  5190. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5191. req, out := c.PutObjectRequest(input)
  5192. req.SetContext(ctx)
  5193. req.ApplyOptions(opts...)
  5194. return out, req.Send()
  5195. }
  5196. const opPutObjectAcl = "PutObjectAcl"
  5197. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5198. // client's request for the PutObjectAcl operation. The "output" return
  5199. // value can be used to capture response data after the request's "Send" method
  5200. // is called.
  5201. //
  5202. // See PutObjectAcl for usage and error information.
  5203. //
  5204. // Creating a request object using this method should be used when you want to inject
  5205. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5206. // access properties on the request object before or after sending the request. If
  5207. // you just want the service response, call the PutObjectAcl method directly
  5208. // instead.
  5209. //
  5210. // Note: You must call the "Send" method on the returned request object in order
  5211. // to execute the request.
  5212. //
  5213. // // Example sending a request using the PutObjectAclRequest method.
  5214. // req, resp := client.PutObjectAclRequest(params)
  5215. //
  5216. // err := req.Send()
  5217. // if err == nil { // resp is now filled
  5218. // fmt.Println(resp)
  5219. // }
  5220. //
  5221. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5222. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5223. op := &request.Operation{
  5224. Name: opPutObjectAcl,
  5225. HTTPMethod: "PUT",
  5226. HTTPPath: "/{Bucket}/{Key+}?acl",
  5227. }
  5228. if input == nil {
  5229. input = &PutObjectAclInput{}
  5230. }
  5231. output = &PutObjectAclOutput{}
  5232. req = c.newRequest(op, input, output)
  5233. return
  5234. }
  5235. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5236. //
  5237. // uses the acl subresource to set the access control list (ACL) permissions
  5238. // for an object that already exists in a bucket
  5239. //
  5240. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5241. // with awserr.Error's Code and Message methods to get detailed information about
  5242. // the error.
  5243. //
  5244. // See the AWS API reference guide for Amazon Simple Storage Service's
  5245. // API operation PutObjectAcl for usage and error information.
  5246. //
  5247. // Returned Error Codes:
  5248. // * ErrCodeNoSuchKey "NoSuchKey"
  5249. // The specified key does not exist.
  5250. //
  5251. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5252. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5253. req, out := c.PutObjectAclRequest(input)
  5254. return out, req.Send()
  5255. }
  5256. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5257. // the ability to pass a context and additional request options.
  5258. //
  5259. // See PutObjectAcl for details on how to use this API operation.
  5260. //
  5261. // The context must be non-nil and will be used for request cancellation. If
  5262. // the context is nil a panic will occur. In the future the SDK may create
  5263. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5264. // for more information on using Contexts.
  5265. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5266. req, out := c.PutObjectAclRequest(input)
  5267. req.SetContext(ctx)
  5268. req.ApplyOptions(opts...)
  5269. return out, req.Send()
  5270. }
  5271. const opPutObjectTagging = "PutObjectTagging"
  5272. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  5273. // client's request for the PutObjectTagging operation. The "output" return
  5274. // value can be used to capture response data after the request's "Send" method
  5275. // is called.
  5276. //
  5277. // See PutObjectTagging for usage and error information.
  5278. //
  5279. // Creating a request object using this method should be used when you want to inject
  5280. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5281. // access properties on the request object before or after sending the request. If
  5282. // you just want the service response, call the PutObjectTagging method directly
  5283. // instead.
  5284. //
  5285. // Note: You must call the "Send" method on the returned request object in order
  5286. // to execute the request.
  5287. //
  5288. // // Example sending a request using the PutObjectTaggingRequest method.
  5289. // req, resp := client.PutObjectTaggingRequest(params)
  5290. //
  5291. // err := req.Send()
  5292. // if err == nil { // resp is now filled
  5293. // fmt.Println(resp)
  5294. // }
  5295. //
  5296. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5297. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  5298. op := &request.Operation{
  5299. Name: opPutObjectTagging,
  5300. HTTPMethod: "PUT",
  5301. HTTPPath: "/{Bucket}/{Key+}?tagging",
  5302. }
  5303. if input == nil {
  5304. input = &PutObjectTaggingInput{}
  5305. }
  5306. output = &PutObjectTaggingOutput{}
  5307. req = c.newRequest(op, input, output)
  5308. return
  5309. }
  5310. // PutObjectTagging API operation for Amazon Simple Storage Service.
  5311. //
  5312. // Sets the supplied tag-set to an object that already exists in a bucket
  5313. //
  5314. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5315. // with awserr.Error's Code and Message methods to get detailed information about
  5316. // the error.
  5317. //
  5318. // See the AWS API reference guide for Amazon Simple Storage Service's
  5319. // API operation PutObjectTagging for usage and error information.
  5320. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5321. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  5322. req, out := c.PutObjectTaggingRequest(input)
  5323. return out, req.Send()
  5324. }
  5325. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  5326. // the ability to pass a context and additional request options.
  5327. //
  5328. // See PutObjectTagging for details on how to use this API operation.
  5329. //
  5330. // The context must be non-nil and will be used for request cancellation. If
  5331. // the context is nil a panic will occur. In the future the SDK may create
  5332. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5333. // for more information on using Contexts.
  5334. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  5335. req, out := c.PutObjectTaggingRequest(input)
  5336. req.SetContext(ctx)
  5337. req.ApplyOptions(opts...)
  5338. return out, req.Send()
  5339. }
  5340. const opRestoreObject = "RestoreObject"
  5341. // RestoreObjectRequest generates a "aws/request.Request" representing the
  5342. // client's request for the RestoreObject operation. The "output" return
  5343. // value can be used to capture response data after the request's "Send" method
  5344. // is called.
  5345. //
  5346. // See RestoreObject for usage and error information.
  5347. //
  5348. // Creating a request object using this method should be used when you want to inject
  5349. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5350. // access properties on the request object before or after sending the request. If
  5351. // you just want the service response, call the RestoreObject method directly
  5352. // instead.
  5353. //
  5354. // Note: You must call the "Send" method on the returned request object in order
  5355. // to execute the request.
  5356. //
  5357. // // Example sending a request using the RestoreObjectRequest method.
  5358. // req, resp := client.RestoreObjectRequest(params)
  5359. //
  5360. // err := req.Send()
  5361. // if err == nil { // resp is now filled
  5362. // fmt.Println(resp)
  5363. // }
  5364. //
  5365. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5366. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  5367. op := &request.Operation{
  5368. Name: opRestoreObject,
  5369. HTTPMethod: "POST",
  5370. HTTPPath: "/{Bucket}/{Key+}?restore",
  5371. }
  5372. if input == nil {
  5373. input = &RestoreObjectInput{}
  5374. }
  5375. output = &RestoreObjectOutput{}
  5376. req = c.newRequest(op, input, output)
  5377. return
  5378. }
  5379. // RestoreObject API operation for Amazon Simple Storage Service.
  5380. //
  5381. // Restores an archived copy of an object back into Amazon S3
  5382. //
  5383. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5384. // with awserr.Error's Code and Message methods to get detailed information about
  5385. // the error.
  5386. //
  5387. // See the AWS API reference guide for Amazon Simple Storage Service's
  5388. // API operation RestoreObject for usage and error information.
  5389. //
  5390. // Returned Error Codes:
  5391. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  5392. // This operation is not allowed against this storage tier
  5393. //
  5394. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5395. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  5396. req, out := c.RestoreObjectRequest(input)
  5397. return out, req.Send()
  5398. }
  5399. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  5400. // the ability to pass a context and additional request options.
  5401. //
  5402. // See RestoreObject for details on how to use this API operation.
  5403. //
  5404. // The context must be non-nil and will be used for request cancellation. If
  5405. // the context is nil a panic will occur. In the future the SDK may create
  5406. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5407. // for more information on using Contexts.
  5408. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  5409. req, out := c.RestoreObjectRequest(input)
  5410. req.SetContext(ctx)
  5411. req.ApplyOptions(opts...)
  5412. return out, req.Send()
  5413. }
  5414. const opUploadPart = "UploadPart"
  5415. // UploadPartRequest generates a "aws/request.Request" representing the
  5416. // client's request for the UploadPart operation. The "output" return
  5417. // value can be used to capture response data after the request's "Send" method
  5418. // is called.
  5419. //
  5420. // See UploadPart for usage and error information.
  5421. //
  5422. // Creating a request object using this method should be used when you want to inject
  5423. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5424. // access properties on the request object before or after sending the request. If
  5425. // you just want the service response, call the UploadPart method directly
  5426. // instead.
  5427. //
  5428. // Note: You must call the "Send" method on the returned request object in order
  5429. // to execute the request.
  5430. //
  5431. // // Example sending a request using the UploadPartRequest method.
  5432. // req, resp := client.UploadPartRequest(params)
  5433. //
  5434. // err := req.Send()
  5435. // if err == nil { // resp is now filled
  5436. // fmt.Println(resp)
  5437. // }
  5438. //
  5439. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5440. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  5441. op := &request.Operation{
  5442. Name: opUploadPart,
  5443. HTTPMethod: "PUT",
  5444. HTTPPath: "/{Bucket}/{Key+}",
  5445. }
  5446. if input == nil {
  5447. input = &UploadPartInput{}
  5448. }
  5449. output = &UploadPartOutput{}
  5450. req = c.newRequest(op, input, output)
  5451. return
  5452. }
  5453. // UploadPart API operation for Amazon Simple Storage Service.
  5454. //
  5455. // Uploads a part in a multipart upload.
  5456. //
  5457. // Note: After you initiate multipart upload and upload one or more parts, you
  5458. // must either complete or abort multipart upload in order to stop getting charged
  5459. // for storage of the uploaded parts. Only after you either complete or abort
  5460. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  5461. // you for the parts storage.
  5462. //
  5463. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5464. // with awserr.Error's Code and Message methods to get detailed information about
  5465. // the error.
  5466. //
  5467. // See the AWS API reference guide for Amazon Simple Storage Service's
  5468. // API operation UploadPart for usage and error information.
  5469. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5470. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  5471. req, out := c.UploadPartRequest(input)
  5472. return out, req.Send()
  5473. }
  5474. // UploadPartWithContext is the same as UploadPart with the addition of
  5475. // the ability to pass a context and additional request options.
  5476. //
  5477. // See UploadPart for details on how to use this API operation.
  5478. //
  5479. // The context must be non-nil and will be used for request cancellation. If
  5480. // the context is nil a panic will occur. In the future the SDK may create
  5481. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5482. // for more information on using Contexts.
  5483. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  5484. req, out := c.UploadPartRequest(input)
  5485. req.SetContext(ctx)
  5486. req.ApplyOptions(opts...)
  5487. return out, req.Send()
  5488. }
  5489. const opUploadPartCopy = "UploadPartCopy"
  5490. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  5491. // client's request for the UploadPartCopy operation. The "output" return
  5492. // value can be used to capture response data after the request's "Send" method
  5493. // is called.
  5494. //
  5495. // See UploadPartCopy for usage and error information.
  5496. //
  5497. // Creating a request object using this method should be used when you want to inject
  5498. // custom logic into the request's lifecycle using a custom handler, or if you want to
  5499. // access properties on the request object before or after sending the request. If
  5500. // you just want the service response, call the UploadPartCopy method directly
  5501. // instead.
  5502. //
  5503. // Note: You must call the "Send" method on the returned request object in order
  5504. // to execute the request.
  5505. //
  5506. // // Example sending a request using the UploadPartCopyRequest method.
  5507. // req, resp := client.UploadPartCopyRequest(params)
  5508. //
  5509. // err := req.Send()
  5510. // if err == nil { // resp is now filled
  5511. // fmt.Println(resp)
  5512. // }
  5513. //
  5514. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5515. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  5516. op := &request.Operation{
  5517. Name: opUploadPartCopy,
  5518. HTTPMethod: "PUT",
  5519. HTTPPath: "/{Bucket}/{Key+}",
  5520. }
  5521. if input == nil {
  5522. input = &UploadPartCopyInput{}
  5523. }
  5524. output = &UploadPartCopyOutput{}
  5525. req = c.newRequest(op, input, output)
  5526. return
  5527. }
  5528. // UploadPartCopy API operation for Amazon Simple Storage Service.
  5529. //
  5530. // Uploads a part by copying data from an existing object as data source.
  5531. //
  5532. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5533. // with awserr.Error's Code and Message methods to get detailed information about
  5534. // the error.
  5535. //
  5536. // See the AWS API reference guide for Amazon Simple Storage Service's
  5537. // API operation UploadPartCopy for usage and error information.
  5538. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5539. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  5540. req, out := c.UploadPartCopyRequest(input)
  5541. return out, req.Send()
  5542. }
  5543. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  5544. // the ability to pass a context and additional request options.
  5545. //
  5546. // See UploadPartCopy for details on how to use this API operation.
  5547. //
  5548. // The context must be non-nil and will be used for request cancellation. If
  5549. // the context is nil a panic will occur. In the future the SDK may create
  5550. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5551. // for more information on using Contexts.
  5552. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  5553. req, out := c.UploadPartCopyRequest(input)
  5554. req.SetContext(ctx)
  5555. req.ApplyOptions(opts...)
  5556. return out, req.Send()
  5557. }
  5558. // Specifies the days since the initiation of an Incomplete Multipart Upload
  5559. // that Lifecycle will wait before permanently removing all parts of the upload.
  5560. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortIncompleteMultipartUpload
  5561. type AbortIncompleteMultipartUpload struct {
  5562. _ struct{} `type:"structure"`
  5563. // Indicates the number of days that must pass since initiation for Lifecycle
  5564. // to abort an Incomplete Multipart Upload.
  5565. DaysAfterInitiation *int64 `type:"integer"`
  5566. }
  5567. // String returns the string representation
  5568. func (s AbortIncompleteMultipartUpload) String() string {
  5569. return awsutil.Prettify(s)
  5570. }
  5571. // GoString returns the string representation
  5572. func (s AbortIncompleteMultipartUpload) GoString() string {
  5573. return s.String()
  5574. }
  5575. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  5576. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  5577. s.DaysAfterInitiation = &v
  5578. return s
  5579. }
  5580. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadRequest
  5581. type AbortMultipartUploadInput struct {
  5582. _ struct{} `type:"structure"`
  5583. // Bucket is a required field
  5584. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5585. // Key is a required field
  5586. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5587. // Confirms that the requester knows that she or he will be charged for the
  5588. // request. Bucket owners need not specify this parameter in their requests.
  5589. // Documentation on downloading objects from requester pays buckets can be found
  5590. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5591. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5592. // UploadId is a required field
  5593. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  5594. }
  5595. // String returns the string representation
  5596. func (s AbortMultipartUploadInput) String() string {
  5597. return awsutil.Prettify(s)
  5598. }
  5599. // GoString returns the string representation
  5600. func (s AbortMultipartUploadInput) GoString() string {
  5601. return s.String()
  5602. }
  5603. // Validate inspects the fields of the type to determine if they are valid.
  5604. func (s *AbortMultipartUploadInput) Validate() error {
  5605. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  5606. if s.Bucket == nil {
  5607. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5608. }
  5609. if s.Key == nil {
  5610. invalidParams.Add(request.NewErrParamRequired("Key"))
  5611. }
  5612. if s.Key != nil && len(*s.Key) < 1 {
  5613. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5614. }
  5615. if s.UploadId == nil {
  5616. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  5617. }
  5618. if invalidParams.Len() > 0 {
  5619. return invalidParams
  5620. }
  5621. return nil
  5622. }
  5623. // SetBucket sets the Bucket field's value.
  5624. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  5625. s.Bucket = &v
  5626. return s
  5627. }
  5628. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  5629. if s.Bucket == nil {
  5630. return v
  5631. }
  5632. return *s.Bucket
  5633. }
  5634. // SetKey sets the Key field's value.
  5635. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  5636. s.Key = &v
  5637. return s
  5638. }
  5639. // SetRequestPayer sets the RequestPayer field's value.
  5640. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  5641. s.RequestPayer = &v
  5642. return s
  5643. }
  5644. // SetUploadId sets the UploadId field's value.
  5645. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  5646. s.UploadId = &v
  5647. return s
  5648. }
  5649. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUploadOutput
  5650. type AbortMultipartUploadOutput struct {
  5651. _ struct{} `type:"structure"`
  5652. // If present, indicates that the requester was successfully charged for the
  5653. // request.
  5654. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5655. }
  5656. // String returns the string representation
  5657. func (s AbortMultipartUploadOutput) String() string {
  5658. return awsutil.Prettify(s)
  5659. }
  5660. // GoString returns the string representation
  5661. func (s AbortMultipartUploadOutput) GoString() string {
  5662. return s.String()
  5663. }
  5664. // SetRequestCharged sets the RequestCharged field's value.
  5665. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  5666. s.RequestCharged = &v
  5667. return s
  5668. }
  5669. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccelerateConfiguration
  5670. type AccelerateConfiguration struct {
  5671. _ struct{} `type:"structure"`
  5672. // The accelerate configuration of the bucket.
  5673. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  5674. }
  5675. // String returns the string representation
  5676. func (s AccelerateConfiguration) String() string {
  5677. return awsutil.Prettify(s)
  5678. }
  5679. // GoString returns the string representation
  5680. func (s AccelerateConfiguration) GoString() string {
  5681. return s.String()
  5682. }
  5683. // SetStatus sets the Status field's value.
  5684. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  5685. s.Status = &v
  5686. return s
  5687. }
  5688. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AccessControlPolicy
  5689. type AccessControlPolicy struct {
  5690. _ struct{} `type:"structure"`
  5691. // A list of grants.
  5692. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5693. Owner *Owner `type:"structure"`
  5694. }
  5695. // String returns the string representation
  5696. func (s AccessControlPolicy) String() string {
  5697. return awsutil.Prettify(s)
  5698. }
  5699. // GoString returns the string representation
  5700. func (s AccessControlPolicy) GoString() string {
  5701. return s.String()
  5702. }
  5703. // Validate inspects the fields of the type to determine if they are valid.
  5704. func (s *AccessControlPolicy) Validate() error {
  5705. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  5706. if s.Grants != nil {
  5707. for i, v := range s.Grants {
  5708. if v == nil {
  5709. continue
  5710. }
  5711. if err := v.Validate(); err != nil {
  5712. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  5713. }
  5714. }
  5715. }
  5716. if invalidParams.Len() > 0 {
  5717. return invalidParams
  5718. }
  5719. return nil
  5720. }
  5721. // SetGrants sets the Grants field's value.
  5722. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  5723. s.Grants = v
  5724. return s
  5725. }
  5726. // SetOwner sets the Owner field's value.
  5727. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  5728. s.Owner = v
  5729. return s
  5730. }
  5731. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator
  5732. type AnalyticsAndOperator struct {
  5733. _ struct{} `type:"structure"`
  5734. // The prefix to use when evaluating an AND predicate.
  5735. Prefix *string `type:"string"`
  5736. // The list of tags to use when evaluating an AND predicate.
  5737. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  5738. }
  5739. // String returns the string representation
  5740. func (s AnalyticsAndOperator) String() string {
  5741. return awsutil.Prettify(s)
  5742. }
  5743. // GoString returns the string representation
  5744. func (s AnalyticsAndOperator) GoString() string {
  5745. return s.String()
  5746. }
  5747. // Validate inspects the fields of the type to determine if they are valid.
  5748. func (s *AnalyticsAndOperator) Validate() error {
  5749. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  5750. if s.Tags != nil {
  5751. for i, v := range s.Tags {
  5752. if v == nil {
  5753. continue
  5754. }
  5755. if err := v.Validate(); err != nil {
  5756. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5757. }
  5758. }
  5759. }
  5760. if invalidParams.Len() > 0 {
  5761. return invalidParams
  5762. }
  5763. return nil
  5764. }
  5765. // SetPrefix sets the Prefix field's value.
  5766. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  5767. s.Prefix = &v
  5768. return s
  5769. }
  5770. // SetTags sets the Tags field's value.
  5771. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  5772. s.Tags = v
  5773. return s
  5774. }
  5775. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsConfiguration
  5776. type AnalyticsConfiguration struct {
  5777. _ struct{} `type:"structure"`
  5778. // The filter used to describe a set of objects for analyses. A filter must
  5779. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  5780. // If no filter is provided, all objects will be considered in any analysis.
  5781. Filter *AnalyticsFilter `type:"structure"`
  5782. // The identifier used to represent an analytics configuration.
  5783. //
  5784. // Id is a required field
  5785. Id *string `type:"string" required:"true"`
  5786. // If present, it indicates that data related to access patterns will be collected
  5787. // and made available to analyze the tradeoffs between different storage classes.
  5788. //
  5789. // StorageClassAnalysis is a required field
  5790. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  5791. }
  5792. // String returns the string representation
  5793. func (s AnalyticsConfiguration) String() string {
  5794. return awsutil.Prettify(s)
  5795. }
  5796. // GoString returns the string representation
  5797. func (s AnalyticsConfiguration) GoString() string {
  5798. return s.String()
  5799. }
  5800. // Validate inspects the fields of the type to determine if they are valid.
  5801. func (s *AnalyticsConfiguration) Validate() error {
  5802. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  5803. if s.Id == nil {
  5804. invalidParams.Add(request.NewErrParamRequired("Id"))
  5805. }
  5806. if s.StorageClassAnalysis == nil {
  5807. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  5808. }
  5809. if s.Filter != nil {
  5810. if err := s.Filter.Validate(); err != nil {
  5811. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  5812. }
  5813. }
  5814. if s.StorageClassAnalysis != nil {
  5815. if err := s.StorageClassAnalysis.Validate(); err != nil {
  5816. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  5817. }
  5818. }
  5819. if invalidParams.Len() > 0 {
  5820. return invalidParams
  5821. }
  5822. return nil
  5823. }
  5824. // SetFilter sets the Filter field's value.
  5825. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  5826. s.Filter = v
  5827. return s
  5828. }
  5829. // SetId sets the Id field's value.
  5830. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  5831. s.Id = &v
  5832. return s
  5833. }
  5834. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  5835. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  5836. s.StorageClassAnalysis = v
  5837. return s
  5838. }
  5839. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsExportDestination
  5840. type AnalyticsExportDestination struct {
  5841. _ struct{} `type:"structure"`
  5842. // A destination signifying output to an S3 bucket.
  5843. //
  5844. // S3BucketDestination is a required field
  5845. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  5846. }
  5847. // String returns the string representation
  5848. func (s AnalyticsExportDestination) String() string {
  5849. return awsutil.Prettify(s)
  5850. }
  5851. // GoString returns the string representation
  5852. func (s AnalyticsExportDestination) GoString() string {
  5853. return s.String()
  5854. }
  5855. // Validate inspects the fields of the type to determine if they are valid.
  5856. func (s *AnalyticsExportDestination) Validate() error {
  5857. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  5858. if s.S3BucketDestination == nil {
  5859. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  5860. }
  5861. if s.S3BucketDestination != nil {
  5862. if err := s.S3BucketDestination.Validate(); err != nil {
  5863. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  5864. }
  5865. }
  5866. if invalidParams.Len() > 0 {
  5867. return invalidParams
  5868. }
  5869. return nil
  5870. }
  5871. // SetS3BucketDestination sets the S3BucketDestination field's value.
  5872. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  5873. s.S3BucketDestination = v
  5874. return s
  5875. }
  5876. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsFilter
  5877. type AnalyticsFilter struct {
  5878. _ struct{} `type:"structure"`
  5879. // A conjunction (logical AND) of predicates, which is used in evaluating an
  5880. // analytics filter. The operator must have at least two predicates.
  5881. And *AnalyticsAndOperator `type:"structure"`
  5882. // The prefix to use when evaluating an analytics filter.
  5883. Prefix *string `type:"string"`
  5884. // The tag to use when evaluating an analytics filter.
  5885. Tag *Tag `type:"structure"`
  5886. }
  5887. // String returns the string representation
  5888. func (s AnalyticsFilter) String() string {
  5889. return awsutil.Prettify(s)
  5890. }
  5891. // GoString returns the string representation
  5892. func (s AnalyticsFilter) GoString() string {
  5893. return s.String()
  5894. }
  5895. // Validate inspects the fields of the type to determine if they are valid.
  5896. func (s *AnalyticsFilter) Validate() error {
  5897. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  5898. if s.And != nil {
  5899. if err := s.And.Validate(); err != nil {
  5900. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  5901. }
  5902. }
  5903. if s.Tag != nil {
  5904. if err := s.Tag.Validate(); err != nil {
  5905. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  5906. }
  5907. }
  5908. if invalidParams.Len() > 0 {
  5909. return invalidParams
  5910. }
  5911. return nil
  5912. }
  5913. // SetAnd sets the And field's value.
  5914. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  5915. s.And = v
  5916. return s
  5917. }
  5918. // SetPrefix sets the Prefix field's value.
  5919. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  5920. s.Prefix = &v
  5921. return s
  5922. }
  5923. // SetTag sets the Tag field's value.
  5924. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  5925. s.Tag = v
  5926. return s
  5927. }
  5928. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsS3BucketDestination
  5929. type AnalyticsS3BucketDestination struct {
  5930. _ struct{} `type:"structure"`
  5931. // The Amazon resource name (ARN) of the bucket to which data is exported.
  5932. //
  5933. // Bucket is a required field
  5934. Bucket *string `type:"string" required:"true"`
  5935. // The account ID that owns the destination bucket. If no account ID is provided,
  5936. // the owner will not be validated prior to exporting data.
  5937. BucketAccountId *string `type:"string"`
  5938. // The file format used when exporting data to Amazon S3.
  5939. //
  5940. // Format is a required field
  5941. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  5942. // The prefix to use when exporting data. The exported data begins with this
  5943. // prefix.
  5944. Prefix *string `type:"string"`
  5945. }
  5946. // String returns the string representation
  5947. func (s AnalyticsS3BucketDestination) String() string {
  5948. return awsutil.Prettify(s)
  5949. }
  5950. // GoString returns the string representation
  5951. func (s AnalyticsS3BucketDestination) GoString() string {
  5952. return s.String()
  5953. }
  5954. // Validate inspects the fields of the type to determine if they are valid.
  5955. func (s *AnalyticsS3BucketDestination) Validate() error {
  5956. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  5957. if s.Bucket == nil {
  5958. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5959. }
  5960. if s.Format == nil {
  5961. invalidParams.Add(request.NewErrParamRequired("Format"))
  5962. }
  5963. if invalidParams.Len() > 0 {
  5964. return invalidParams
  5965. }
  5966. return nil
  5967. }
  5968. // SetBucket sets the Bucket field's value.
  5969. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  5970. s.Bucket = &v
  5971. return s
  5972. }
  5973. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  5974. if s.Bucket == nil {
  5975. return v
  5976. }
  5977. return *s.Bucket
  5978. }
  5979. // SetBucketAccountId sets the BucketAccountId field's value.
  5980. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  5981. s.BucketAccountId = &v
  5982. return s
  5983. }
  5984. // SetFormat sets the Format field's value.
  5985. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  5986. s.Format = &v
  5987. return s
  5988. }
  5989. // SetPrefix sets the Prefix field's value.
  5990. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  5991. s.Prefix = &v
  5992. return s
  5993. }
  5994. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Bucket
  5995. type Bucket struct {
  5996. _ struct{} `type:"structure"`
  5997. // Date the bucket was created.
  5998. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  5999. // The name of the bucket.
  6000. Name *string `type:"string"`
  6001. }
  6002. // String returns the string representation
  6003. func (s Bucket) String() string {
  6004. return awsutil.Prettify(s)
  6005. }
  6006. // GoString returns the string representation
  6007. func (s Bucket) GoString() string {
  6008. return s.String()
  6009. }
  6010. // SetCreationDate sets the CreationDate field's value.
  6011. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6012. s.CreationDate = &v
  6013. return s
  6014. }
  6015. // SetName sets the Name field's value.
  6016. func (s *Bucket) SetName(v string) *Bucket {
  6017. s.Name = &v
  6018. return s
  6019. }
  6020. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLifecycleConfiguration
  6021. type BucketLifecycleConfiguration struct {
  6022. _ struct{} `type:"structure"`
  6023. // Rules is a required field
  6024. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6025. }
  6026. // String returns the string representation
  6027. func (s BucketLifecycleConfiguration) String() string {
  6028. return awsutil.Prettify(s)
  6029. }
  6030. // GoString returns the string representation
  6031. func (s BucketLifecycleConfiguration) GoString() string {
  6032. return s.String()
  6033. }
  6034. // Validate inspects the fields of the type to determine if they are valid.
  6035. func (s *BucketLifecycleConfiguration) Validate() error {
  6036. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6037. if s.Rules == nil {
  6038. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6039. }
  6040. if s.Rules != nil {
  6041. for i, v := range s.Rules {
  6042. if v == nil {
  6043. continue
  6044. }
  6045. if err := v.Validate(); err != nil {
  6046. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6047. }
  6048. }
  6049. }
  6050. if invalidParams.Len() > 0 {
  6051. return invalidParams
  6052. }
  6053. return nil
  6054. }
  6055. // SetRules sets the Rules field's value.
  6056. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6057. s.Rules = v
  6058. return s
  6059. }
  6060. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/BucketLoggingStatus
  6061. type BucketLoggingStatus struct {
  6062. _ struct{} `type:"structure"`
  6063. LoggingEnabled *LoggingEnabled `type:"structure"`
  6064. }
  6065. // String returns the string representation
  6066. func (s BucketLoggingStatus) String() string {
  6067. return awsutil.Prettify(s)
  6068. }
  6069. // GoString returns the string representation
  6070. func (s BucketLoggingStatus) GoString() string {
  6071. return s.String()
  6072. }
  6073. // Validate inspects the fields of the type to determine if they are valid.
  6074. func (s *BucketLoggingStatus) Validate() error {
  6075. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  6076. if s.LoggingEnabled != nil {
  6077. if err := s.LoggingEnabled.Validate(); err != nil {
  6078. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  6079. }
  6080. }
  6081. if invalidParams.Len() > 0 {
  6082. return invalidParams
  6083. }
  6084. return nil
  6085. }
  6086. // SetLoggingEnabled sets the LoggingEnabled field's value.
  6087. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  6088. s.LoggingEnabled = v
  6089. return s
  6090. }
  6091. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSConfiguration
  6092. type CORSConfiguration struct {
  6093. _ struct{} `type:"structure"`
  6094. // CORSRules is a required field
  6095. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  6096. }
  6097. // String returns the string representation
  6098. func (s CORSConfiguration) String() string {
  6099. return awsutil.Prettify(s)
  6100. }
  6101. // GoString returns the string representation
  6102. func (s CORSConfiguration) GoString() string {
  6103. return s.String()
  6104. }
  6105. // Validate inspects the fields of the type to determine if they are valid.
  6106. func (s *CORSConfiguration) Validate() error {
  6107. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  6108. if s.CORSRules == nil {
  6109. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  6110. }
  6111. if s.CORSRules != nil {
  6112. for i, v := range s.CORSRules {
  6113. if v == nil {
  6114. continue
  6115. }
  6116. if err := v.Validate(); err != nil {
  6117. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  6118. }
  6119. }
  6120. }
  6121. if invalidParams.Len() > 0 {
  6122. return invalidParams
  6123. }
  6124. return nil
  6125. }
  6126. // SetCORSRules sets the CORSRules field's value.
  6127. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  6128. s.CORSRules = v
  6129. return s
  6130. }
  6131. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CORSRule
  6132. type CORSRule struct {
  6133. _ struct{} `type:"structure"`
  6134. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  6135. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  6136. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  6137. // to execute.
  6138. //
  6139. // AllowedMethods is a required field
  6140. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  6141. // One or more origins you want customers to be able to access the bucket from.
  6142. //
  6143. // AllowedOrigins is a required field
  6144. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  6145. // One or more headers in the response that you want customers to be able to
  6146. // access from their applications (for example, from a JavaScript XMLHttpRequest
  6147. // object).
  6148. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  6149. // The time in seconds that your browser is to cache the preflight response
  6150. // for the specified resource.
  6151. MaxAgeSeconds *int64 `type:"integer"`
  6152. }
  6153. // String returns the string representation
  6154. func (s CORSRule) String() string {
  6155. return awsutil.Prettify(s)
  6156. }
  6157. // GoString returns the string representation
  6158. func (s CORSRule) GoString() string {
  6159. return s.String()
  6160. }
  6161. // Validate inspects the fields of the type to determine if they are valid.
  6162. func (s *CORSRule) Validate() error {
  6163. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  6164. if s.AllowedMethods == nil {
  6165. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  6166. }
  6167. if s.AllowedOrigins == nil {
  6168. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  6169. }
  6170. if invalidParams.Len() > 0 {
  6171. return invalidParams
  6172. }
  6173. return nil
  6174. }
  6175. // SetAllowedHeaders sets the AllowedHeaders field's value.
  6176. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  6177. s.AllowedHeaders = v
  6178. return s
  6179. }
  6180. // SetAllowedMethods sets the AllowedMethods field's value.
  6181. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  6182. s.AllowedMethods = v
  6183. return s
  6184. }
  6185. // SetAllowedOrigins sets the AllowedOrigins field's value.
  6186. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  6187. s.AllowedOrigins = v
  6188. return s
  6189. }
  6190. // SetExposeHeaders sets the ExposeHeaders field's value.
  6191. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  6192. s.ExposeHeaders = v
  6193. return s
  6194. }
  6195. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  6196. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  6197. s.MaxAgeSeconds = &v
  6198. return s
  6199. }
  6200. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration
  6201. type CloudFunctionConfiguration struct {
  6202. _ struct{} `type:"structure"`
  6203. CloudFunction *string `type:"string"`
  6204. // Bucket event for which to send notifications.
  6205. Event *string `deprecated:"true" type:"string" enum:"Event"`
  6206. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  6207. // Optional unique identifier for configurations in a notification configuration.
  6208. // If you don't provide one, Amazon S3 will assign an ID.
  6209. Id *string `type:"string"`
  6210. InvocationRole *string `type:"string"`
  6211. }
  6212. // String returns the string representation
  6213. func (s CloudFunctionConfiguration) String() string {
  6214. return awsutil.Prettify(s)
  6215. }
  6216. // GoString returns the string representation
  6217. func (s CloudFunctionConfiguration) GoString() string {
  6218. return s.String()
  6219. }
  6220. // SetCloudFunction sets the CloudFunction field's value.
  6221. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  6222. s.CloudFunction = &v
  6223. return s
  6224. }
  6225. // SetEvent sets the Event field's value.
  6226. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  6227. s.Event = &v
  6228. return s
  6229. }
  6230. // SetEvents sets the Events field's value.
  6231. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  6232. s.Events = v
  6233. return s
  6234. }
  6235. // SetId sets the Id field's value.
  6236. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  6237. s.Id = &v
  6238. return s
  6239. }
  6240. // SetInvocationRole sets the InvocationRole field's value.
  6241. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  6242. s.InvocationRole = &v
  6243. return s
  6244. }
  6245. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CommonPrefix
  6246. type CommonPrefix struct {
  6247. _ struct{} `type:"structure"`
  6248. Prefix *string `type:"string"`
  6249. }
  6250. // String returns the string representation
  6251. func (s CommonPrefix) String() string {
  6252. return awsutil.Prettify(s)
  6253. }
  6254. // GoString returns the string representation
  6255. func (s CommonPrefix) GoString() string {
  6256. return s.String()
  6257. }
  6258. // SetPrefix sets the Prefix field's value.
  6259. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  6260. s.Prefix = &v
  6261. return s
  6262. }
  6263. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadRequest
  6264. type CompleteMultipartUploadInput struct {
  6265. _ struct{} `type:"structure" payload:"MultipartUpload"`
  6266. // Bucket is a required field
  6267. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6268. // Key is a required field
  6269. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6270. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  6271. // Confirms that the requester knows that she or he will be charged for the
  6272. // request. Bucket owners need not specify this parameter in their requests.
  6273. // Documentation on downloading objects from requester pays buckets can be found
  6274. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6275. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6276. // UploadId is a required field
  6277. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6278. }
  6279. // String returns the string representation
  6280. func (s CompleteMultipartUploadInput) String() string {
  6281. return awsutil.Prettify(s)
  6282. }
  6283. // GoString returns the string representation
  6284. func (s CompleteMultipartUploadInput) GoString() string {
  6285. return s.String()
  6286. }
  6287. // Validate inspects the fields of the type to determine if they are valid.
  6288. func (s *CompleteMultipartUploadInput) Validate() error {
  6289. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  6290. if s.Bucket == nil {
  6291. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6292. }
  6293. if s.Key == nil {
  6294. invalidParams.Add(request.NewErrParamRequired("Key"))
  6295. }
  6296. if s.Key != nil && len(*s.Key) < 1 {
  6297. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6298. }
  6299. if s.UploadId == nil {
  6300. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6301. }
  6302. if invalidParams.Len() > 0 {
  6303. return invalidParams
  6304. }
  6305. return nil
  6306. }
  6307. // SetBucket sets the Bucket field's value.
  6308. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  6309. s.Bucket = &v
  6310. return s
  6311. }
  6312. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  6313. if s.Bucket == nil {
  6314. return v
  6315. }
  6316. return *s.Bucket
  6317. }
  6318. // SetKey sets the Key field's value.
  6319. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  6320. s.Key = &v
  6321. return s
  6322. }
  6323. // SetMultipartUpload sets the MultipartUpload field's value.
  6324. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  6325. s.MultipartUpload = v
  6326. return s
  6327. }
  6328. // SetRequestPayer sets the RequestPayer field's value.
  6329. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  6330. s.RequestPayer = &v
  6331. return s
  6332. }
  6333. // SetUploadId sets the UploadId field's value.
  6334. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  6335. s.UploadId = &v
  6336. return s
  6337. }
  6338. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUploadOutput
  6339. type CompleteMultipartUploadOutput struct {
  6340. _ struct{} `type:"structure"`
  6341. Bucket *string `type:"string"`
  6342. // Entity tag of the object.
  6343. ETag *string `type:"string"`
  6344. // If the object expiration is configured, this will contain the expiration
  6345. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  6346. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6347. Key *string `min:"1" type:"string"`
  6348. Location *string `type:"string"`
  6349. // If present, indicates that the requester was successfully charged for the
  6350. // request.
  6351. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6352. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6353. // encryption key that was used for the object.
  6354. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6355. // The Server-side encryption algorithm used when storing this object in S3
  6356. // (e.g., AES256, aws:kms).
  6357. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6358. // Version of the object.
  6359. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6360. }
  6361. // String returns the string representation
  6362. func (s CompleteMultipartUploadOutput) String() string {
  6363. return awsutil.Prettify(s)
  6364. }
  6365. // GoString returns the string representation
  6366. func (s CompleteMultipartUploadOutput) GoString() string {
  6367. return s.String()
  6368. }
  6369. // SetBucket sets the Bucket field's value.
  6370. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  6371. s.Bucket = &v
  6372. return s
  6373. }
  6374. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  6375. if s.Bucket == nil {
  6376. return v
  6377. }
  6378. return *s.Bucket
  6379. }
  6380. // SetETag sets the ETag field's value.
  6381. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  6382. s.ETag = &v
  6383. return s
  6384. }
  6385. // SetExpiration sets the Expiration field's value.
  6386. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  6387. s.Expiration = &v
  6388. return s
  6389. }
  6390. // SetKey sets the Key field's value.
  6391. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  6392. s.Key = &v
  6393. return s
  6394. }
  6395. // SetLocation sets the Location field's value.
  6396. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  6397. s.Location = &v
  6398. return s
  6399. }
  6400. // SetRequestCharged sets the RequestCharged field's value.
  6401. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  6402. s.RequestCharged = &v
  6403. return s
  6404. }
  6405. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6406. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  6407. s.SSEKMSKeyId = &v
  6408. return s
  6409. }
  6410. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6411. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  6412. s.ServerSideEncryption = &v
  6413. return s
  6414. }
  6415. // SetVersionId sets the VersionId field's value.
  6416. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  6417. s.VersionId = &v
  6418. return s
  6419. }
  6420. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedMultipartUpload
  6421. type CompletedMultipartUpload struct {
  6422. _ struct{} `type:"structure"`
  6423. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  6424. }
  6425. // String returns the string representation
  6426. func (s CompletedMultipartUpload) String() string {
  6427. return awsutil.Prettify(s)
  6428. }
  6429. // GoString returns the string representation
  6430. func (s CompletedMultipartUpload) GoString() string {
  6431. return s.String()
  6432. }
  6433. // SetParts sets the Parts field's value.
  6434. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  6435. s.Parts = v
  6436. return s
  6437. }
  6438. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompletedPart
  6439. type CompletedPart struct {
  6440. _ struct{} `type:"structure"`
  6441. // Entity tag returned when the part was uploaded.
  6442. ETag *string `type:"string"`
  6443. // Part number that identifies the part. This is a positive integer between
  6444. // 1 and 10,000.
  6445. PartNumber *int64 `type:"integer"`
  6446. }
  6447. // String returns the string representation
  6448. func (s CompletedPart) String() string {
  6449. return awsutil.Prettify(s)
  6450. }
  6451. // GoString returns the string representation
  6452. func (s CompletedPart) GoString() string {
  6453. return s.String()
  6454. }
  6455. // SetETag sets the ETag field's value.
  6456. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  6457. s.ETag = &v
  6458. return s
  6459. }
  6460. // SetPartNumber sets the PartNumber field's value.
  6461. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  6462. s.PartNumber = &v
  6463. return s
  6464. }
  6465. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition
  6466. type Condition struct {
  6467. _ struct{} `type:"structure"`
  6468. // The HTTP error code when the redirect is applied. In the event of an error,
  6469. // if the error code equals this value, then the specified redirect is applied.
  6470. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  6471. // is not specified. If both are specified, then both must be true for the redirect
  6472. // to be applied.
  6473. HttpErrorCodeReturnedEquals *string `type:"string"`
  6474. // The object key name prefix when the redirect is applied. For example, to
  6475. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  6476. // To redirect request for all pages with the prefix docs/, the key prefix will
  6477. // be /docs, which identifies all objects in the docs/ folder. Required when
  6478. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  6479. // is not specified. If both conditions are specified, both must be true for
  6480. // the redirect to be applied.
  6481. KeyPrefixEquals *string `type:"string"`
  6482. }
  6483. // String returns the string representation
  6484. func (s Condition) String() string {
  6485. return awsutil.Prettify(s)
  6486. }
  6487. // GoString returns the string representation
  6488. func (s Condition) GoString() string {
  6489. return s.String()
  6490. }
  6491. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  6492. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  6493. s.HttpErrorCodeReturnedEquals = &v
  6494. return s
  6495. }
  6496. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  6497. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  6498. s.KeyPrefixEquals = &v
  6499. return s
  6500. }
  6501. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectRequest
  6502. type CopyObjectInput struct {
  6503. _ struct{} `type:"structure"`
  6504. // The canned ACL to apply to the object.
  6505. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  6506. // Bucket is a required field
  6507. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6508. // Specifies caching behavior along the request/reply chain.
  6509. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  6510. // Specifies presentational information for the object.
  6511. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  6512. // Specifies what content encodings have been applied to the object and thus
  6513. // what decoding mechanisms must be applied to obtain the media-type referenced
  6514. // by the Content-Type header field.
  6515. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  6516. // The language the content is in.
  6517. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  6518. // A standard MIME type describing the format of the object data.
  6519. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  6520. // The name of the source bucket and key name of the source object, separated
  6521. // by a slash (/). Must be URL-encoded.
  6522. //
  6523. // CopySource is a required field
  6524. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  6525. // Copies the object if its entity tag (ETag) matches the specified tag.
  6526. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  6527. // Copies the object if it has been modified since the specified time.
  6528. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  6529. // Copies the object if its entity tag (ETag) is different than the specified
  6530. // ETag.
  6531. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  6532. // Copies the object if it hasn't been modified since the specified time.
  6533. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  6534. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  6535. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  6536. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  6537. // the source object. The encryption key provided in this header must be one
  6538. // that was used when the source object was created.
  6539. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  6540. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6541. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6542. // key was transmitted without error.
  6543. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  6544. // The date and time at which the object is no longer cacheable.
  6545. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  6546. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  6547. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6548. // Allows grantee to read the object data and its metadata.
  6549. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6550. // Allows grantee to read the object ACL.
  6551. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6552. // Allows grantee to write the ACL for the applicable object.
  6553. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6554. // Key is a required field
  6555. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6556. // A map of metadata to store with the object in S3.
  6557. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  6558. // Specifies whether the metadata is copied from the source object or replaced
  6559. // with metadata provided in the request.
  6560. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  6561. // Confirms that the requester knows that she or he will be charged for the
  6562. // request. Bucket owners need not specify this parameter in their requests.
  6563. // Documentation on downloading objects from requester pays buckets can be found
  6564. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6565. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6566. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  6567. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6568. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  6569. // data. This value is used to store the object and then it is discarded; Amazon
  6570. // does not store the encryption key. The key must be appropriate for use with
  6571. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  6572. // header.
  6573. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  6574. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6575. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6576. // key was transmitted without error.
  6577. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6578. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  6579. // requests for an object protected by AWS KMS will fail if not made via SSL
  6580. // or using SigV4. Documentation on configuring any of the officially supported
  6581. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  6582. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6583. // The Server-side encryption algorithm used when storing this object in S3
  6584. // (e.g., AES256, aws:kms).
  6585. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6586. // The type of storage to use for the object. Defaults to 'STANDARD'.
  6587. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  6588. // The tag-set for the object destination object this value must be used in
  6589. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  6590. // Query parameters
  6591. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  6592. // Specifies whether the object tag-set are copied from the source object or
  6593. // replaced with tag-set provided in the request.
  6594. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  6595. // If the bucket is configured as a website, redirects requests for this object
  6596. // to another object in the same bucket or to an external URL. Amazon S3 stores
  6597. // the value of this header in the object metadata.
  6598. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  6599. }
  6600. // String returns the string representation
  6601. func (s CopyObjectInput) String() string {
  6602. return awsutil.Prettify(s)
  6603. }
  6604. // GoString returns the string representation
  6605. func (s CopyObjectInput) GoString() string {
  6606. return s.String()
  6607. }
  6608. // Validate inspects the fields of the type to determine if they are valid.
  6609. func (s *CopyObjectInput) Validate() error {
  6610. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  6611. if s.Bucket == nil {
  6612. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6613. }
  6614. if s.CopySource == nil {
  6615. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  6616. }
  6617. if s.Key == nil {
  6618. invalidParams.Add(request.NewErrParamRequired("Key"))
  6619. }
  6620. if s.Key != nil && len(*s.Key) < 1 {
  6621. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6622. }
  6623. if invalidParams.Len() > 0 {
  6624. return invalidParams
  6625. }
  6626. return nil
  6627. }
  6628. // SetACL sets the ACL field's value.
  6629. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  6630. s.ACL = &v
  6631. return s
  6632. }
  6633. // SetBucket sets the Bucket field's value.
  6634. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  6635. s.Bucket = &v
  6636. return s
  6637. }
  6638. func (s *CopyObjectInput) getBucket() (v string) {
  6639. if s.Bucket == nil {
  6640. return v
  6641. }
  6642. return *s.Bucket
  6643. }
  6644. // SetCacheControl sets the CacheControl field's value.
  6645. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  6646. s.CacheControl = &v
  6647. return s
  6648. }
  6649. // SetContentDisposition sets the ContentDisposition field's value.
  6650. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  6651. s.ContentDisposition = &v
  6652. return s
  6653. }
  6654. // SetContentEncoding sets the ContentEncoding field's value.
  6655. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  6656. s.ContentEncoding = &v
  6657. return s
  6658. }
  6659. // SetContentLanguage sets the ContentLanguage field's value.
  6660. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  6661. s.ContentLanguage = &v
  6662. return s
  6663. }
  6664. // SetContentType sets the ContentType field's value.
  6665. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  6666. s.ContentType = &v
  6667. return s
  6668. }
  6669. // SetCopySource sets the CopySource field's value.
  6670. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  6671. s.CopySource = &v
  6672. return s
  6673. }
  6674. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  6675. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  6676. s.CopySourceIfMatch = &v
  6677. return s
  6678. }
  6679. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  6680. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  6681. s.CopySourceIfModifiedSince = &v
  6682. return s
  6683. }
  6684. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  6685. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  6686. s.CopySourceIfNoneMatch = &v
  6687. return s
  6688. }
  6689. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  6690. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  6691. s.CopySourceIfUnmodifiedSince = &v
  6692. return s
  6693. }
  6694. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  6695. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  6696. s.CopySourceSSECustomerAlgorithm = &v
  6697. return s
  6698. }
  6699. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  6700. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  6701. s.CopySourceSSECustomerKey = &v
  6702. return s
  6703. }
  6704. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  6705. if s.CopySourceSSECustomerKey == nil {
  6706. return v
  6707. }
  6708. return *s.CopySourceSSECustomerKey
  6709. }
  6710. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  6711. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  6712. s.CopySourceSSECustomerKeyMD5 = &v
  6713. return s
  6714. }
  6715. // SetExpires sets the Expires field's value.
  6716. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  6717. s.Expires = &v
  6718. return s
  6719. }
  6720. // SetGrantFullControl sets the GrantFullControl field's value.
  6721. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  6722. s.GrantFullControl = &v
  6723. return s
  6724. }
  6725. // SetGrantRead sets the GrantRead field's value.
  6726. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  6727. s.GrantRead = &v
  6728. return s
  6729. }
  6730. // SetGrantReadACP sets the GrantReadACP field's value.
  6731. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  6732. s.GrantReadACP = &v
  6733. return s
  6734. }
  6735. // SetGrantWriteACP sets the GrantWriteACP field's value.
  6736. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  6737. s.GrantWriteACP = &v
  6738. return s
  6739. }
  6740. // SetKey sets the Key field's value.
  6741. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  6742. s.Key = &v
  6743. return s
  6744. }
  6745. // SetMetadata sets the Metadata field's value.
  6746. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  6747. s.Metadata = v
  6748. return s
  6749. }
  6750. // SetMetadataDirective sets the MetadataDirective field's value.
  6751. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  6752. s.MetadataDirective = &v
  6753. return s
  6754. }
  6755. // SetRequestPayer sets the RequestPayer field's value.
  6756. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  6757. s.RequestPayer = &v
  6758. return s
  6759. }
  6760. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  6761. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  6762. s.SSECustomerAlgorithm = &v
  6763. return s
  6764. }
  6765. // SetSSECustomerKey sets the SSECustomerKey field's value.
  6766. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  6767. s.SSECustomerKey = &v
  6768. return s
  6769. }
  6770. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  6771. if s.SSECustomerKey == nil {
  6772. return v
  6773. }
  6774. return *s.SSECustomerKey
  6775. }
  6776. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  6777. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  6778. s.SSECustomerKeyMD5 = &v
  6779. return s
  6780. }
  6781. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6782. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  6783. s.SSEKMSKeyId = &v
  6784. return s
  6785. }
  6786. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6787. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  6788. s.ServerSideEncryption = &v
  6789. return s
  6790. }
  6791. // SetStorageClass sets the StorageClass field's value.
  6792. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  6793. s.StorageClass = &v
  6794. return s
  6795. }
  6796. // SetTagging sets the Tagging field's value.
  6797. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  6798. s.Tagging = &v
  6799. return s
  6800. }
  6801. // SetTaggingDirective sets the TaggingDirective field's value.
  6802. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  6803. s.TaggingDirective = &v
  6804. return s
  6805. }
  6806. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  6807. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  6808. s.WebsiteRedirectLocation = &v
  6809. return s
  6810. }
  6811. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectOutput
  6812. type CopyObjectOutput struct {
  6813. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  6814. CopyObjectResult *CopyObjectResult `type:"structure"`
  6815. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  6816. // If the object expiration is configured, the response includes this header.
  6817. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6818. // If present, indicates that the requester was successfully charged for the
  6819. // request.
  6820. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6821. // If server-side encryption with a customer-provided encryption key was requested,
  6822. // the response will include this header confirming the encryption algorithm
  6823. // used.
  6824. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6825. // If server-side encryption with a customer-provided encryption key was requested,
  6826. // the response will include this header to provide round trip message integrity
  6827. // verification of the customer-provided encryption key.
  6828. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6829. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6830. // encryption key that was used for the object.
  6831. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6832. // The Server-side encryption algorithm used when storing this object in S3
  6833. // (e.g., AES256, aws:kms).
  6834. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6835. // Version ID of the newly created copy.
  6836. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6837. }
  6838. // String returns the string representation
  6839. func (s CopyObjectOutput) String() string {
  6840. return awsutil.Prettify(s)
  6841. }
  6842. // GoString returns the string representation
  6843. func (s CopyObjectOutput) GoString() string {
  6844. return s.String()
  6845. }
  6846. // SetCopyObjectResult sets the CopyObjectResult field's value.
  6847. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  6848. s.CopyObjectResult = v
  6849. return s
  6850. }
  6851. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  6852. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  6853. s.CopySourceVersionId = &v
  6854. return s
  6855. }
  6856. // SetExpiration sets the Expiration field's value.
  6857. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  6858. s.Expiration = &v
  6859. return s
  6860. }
  6861. // SetRequestCharged sets the RequestCharged field's value.
  6862. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  6863. s.RequestCharged = &v
  6864. return s
  6865. }
  6866. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  6867. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  6868. s.SSECustomerAlgorithm = &v
  6869. return s
  6870. }
  6871. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  6872. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  6873. s.SSECustomerKeyMD5 = &v
  6874. return s
  6875. }
  6876. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6877. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  6878. s.SSEKMSKeyId = &v
  6879. return s
  6880. }
  6881. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6882. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  6883. s.ServerSideEncryption = &v
  6884. return s
  6885. }
  6886. // SetVersionId sets the VersionId field's value.
  6887. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  6888. s.VersionId = &v
  6889. return s
  6890. }
  6891. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult
  6892. type CopyObjectResult struct {
  6893. _ struct{} `type:"structure"`
  6894. ETag *string `type:"string"`
  6895. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6896. }
  6897. // String returns the string representation
  6898. func (s CopyObjectResult) String() string {
  6899. return awsutil.Prettify(s)
  6900. }
  6901. // GoString returns the string representation
  6902. func (s CopyObjectResult) GoString() string {
  6903. return s.String()
  6904. }
  6905. // SetETag sets the ETag field's value.
  6906. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  6907. s.ETag = &v
  6908. return s
  6909. }
  6910. // SetLastModified sets the LastModified field's value.
  6911. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  6912. s.LastModified = &v
  6913. return s
  6914. }
  6915. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyPartResult
  6916. type CopyPartResult struct {
  6917. _ struct{} `type:"structure"`
  6918. // Entity tag of the object.
  6919. ETag *string `type:"string"`
  6920. // Date and time at which the object was uploaded.
  6921. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6922. }
  6923. // String returns the string representation
  6924. func (s CopyPartResult) String() string {
  6925. return awsutil.Prettify(s)
  6926. }
  6927. // GoString returns the string representation
  6928. func (s CopyPartResult) GoString() string {
  6929. return s.String()
  6930. }
  6931. // SetETag sets the ETag field's value.
  6932. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  6933. s.ETag = &v
  6934. return s
  6935. }
  6936. // SetLastModified sets the LastModified field's value.
  6937. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  6938. s.LastModified = &v
  6939. return s
  6940. }
  6941. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketConfiguration
  6942. type CreateBucketConfiguration struct {
  6943. _ struct{} `type:"structure"`
  6944. // Specifies the region where the bucket will be created. If you don't specify
  6945. // a region, the bucket will be created in US Standard.
  6946. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  6947. }
  6948. // String returns the string representation
  6949. func (s CreateBucketConfiguration) String() string {
  6950. return awsutil.Prettify(s)
  6951. }
  6952. // GoString returns the string representation
  6953. func (s CreateBucketConfiguration) GoString() string {
  6954. return s.String()
  6955. }
  6956. // SetLocationConstraint sets the LocationConstraint field's value.
  6957. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  6958. s.LocationConstraint = &v
  6959. return s
  6960. }
  6961. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketRequest
  6962. type CreateBucketInput struct {
  6963. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  6964. // The canned ACL to apply to the bucket.
  6965. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  6966. // Bucket is a required field
  6967. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6968. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  6969. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  6970. // bucket.
  6971. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6972. // Allows grantee to list the objects in the bucket.
  6973. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6974. // Allows grantee to read the bucket ACL.
  6975. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6976. // Allows grantee to create, overwrite, and delete any object in the bucket.
  6977. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  6978. // Allows grantee to write the ACL for the applicable bucket.
  6979. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6980. }
  6981. // String returns the string representation
  6982. func (s CreateBucketInput) String() string {
  6983. return awsutil.Prettify(s)
  6984. }
  6985. // GoString returns the string representation
  6986. func (s CreateBucketInput) GoString() string {
  6987. return s.String()
  6988. }
  6989. // Validate inspects the fields of the type to determine if they are valid.
  6990. func (s *CreateBucketInput) Validate() error {
  6991. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  6992. if s.Bucket == nil {
  6993. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6994. }
  6995. if invalidParams.Len() > 0 {
  6996. return invalidParams
  6997. }
  6998. return nil
  6999. }
  7000. // SetACL sets the ACL field's value.
  7001. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  7002. s.ACL = &v
  7003. return s
  7004. }
  7005. // SetBucket sets the Bucket field's value.
  7006. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  7007. s.Bucket = &v
  7008. return s
  7009. }
  7010. func (s *CreateBucketInput) getBucket() (v string) {
  7011. if s.Bucket == nil {
  7012. return v
  7013. }
  7014. return *s.Bucket
  7015. }
  7016. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  7017. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  7018. s.CreateBucketConfiguration = v
  7019. return s
  7020. }
  7021. // SetGrantFullControl sets the GrantFullControl field's value.
  7022. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  7023. s.GrantFullControl = &v
  7024. return s
  7025. }
  7026. // SetGrantRead sets the GrantRead field's value.
  7027. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  7028. s.GrantRead = &v
  7029. return s
  7030. }
  7031. // SetGrantReadACP sets the GrantReadACP field's value.
  7032. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  7033. s.GrantReadACP = &v
  7034. return s
  7035. }
  7036. // SetGrantWrite sets the GrantWrite field's value.
  7037. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  7038. s.GrantWrite = &v
  7039. return s
  7040. }
  7041. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7042. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  7043. s.GrantWriteACP = &v
  7044. return s
  7045. }
  7046. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucketOutput
  7047. type CreateBucketOutput struct {
  7048. _ struct{} `type:"structure"`
  7049. Location *string `location:"header" locationName:"Location" type:"string"`
  7050. }
  7051. // String returns the string representation
  7052. func (s CreateBucketOutput) String() string {
  7053. return awsutil.Prettify(s)
  7054. }
  7055. // GoString returns the string representation
  7056. func (s CreateBucketOutput) GoString() string {
  7057. return s.String()
  7058. }
  7059. // SetLocation sets the Location field's value.
  7060. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  7061. s.Location = &v
  7062. return s
  7063. }
  7064. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadRequest
  7065. type CreateMultipartUploadInput struct {
  7066. _ struct{} `type:"structure"`
  7067. // The canned ACL to apply to the object.
  7068. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7069. // Bucket is a required field
  7070. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7071. // Specifies caching behavior along the request/reply chain.
  7072. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7073. // Specifies presentational information for the object.
  7074. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7075. // Specifies what content encodings have been applied to the object and thus
  7076. // what decoding mechanisms must be applied to obtain the media-type referenced
  7077. // by the Content-Type header field.
  7078. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7079. // The language the content is in.
  7080. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7081. // A standard MIME type describing the format of the object data.
  7082. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7083. // The date and time at which the object is no longer cacheable.
  7084. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  7085. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7086. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7087. // Allows grantee to read the object data and its metadata.
  7088. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7089. // Allows grantee to read the object ACL.
  7090. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7091. // Allows grantee to write the ACL for the applicable object.
  7092. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7093. // Key is a required field
  7094. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7095. // A map of metadata to store with the object in S3.
  7096. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7097. // Confirms that the requester knows that she or he will be charged for the
  7098. // request. Bucket owners need not specify this parameter in their requests.
  7099. // Documentation on downloading objects from requester pays buckets can be found
  7100. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7101. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7102. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7103. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7104. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7105. // data. This value is used to store the object and then it is discarded; Amazon
  7106. // does not store the encryption key. The key must be appropriate for use with
  7107. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7108. // header.
  7109. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7110. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7111. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7112. // key was transmitted without error.
  7113. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7114. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7115. // requests for an object protected by AWS KMS will fail if not made via SSL
  7116. // or using SigV4. Documentation on configuring any of the officially supported
  7117. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7118. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7119. // The Server-side encryption algorithm used when storing this object in S3
  7120. // (e.g., AES256, aws:kms).
  7121. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7122. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7123. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7124. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  7125. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7126. // If the bucket is configured as a website, redirects requests for this object
  7127. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7128. // the value of this header in the object metadata.
  7129. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7130. }
  7131. // String returns the string representation
  7132. func (s CreateMultipartUploadInput) String() string {
  7133. return awsutil.Prettify(s)
  7134. }
  7135. // GoString returns the string representation
  7136. func (s CreateMultipartUploadInput) GoString() string {
  7137. return s.String()
  7138. }
  7139. // Validate inspects the fields of the type to determine if they are valid.
  7140. func (s *CreateMultipartUploadInput) Validate() error {
  7141. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  7142. if s.Bucket == nil {
  7143. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7144. }
  7145. if s.Key == nil {
  7146. invalidParams.Add(request.NewErrParamRequired("Key"))
  7147. }
  7148. if s.Key != nil && len(*s.Key) < 1 {
  7149. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7150. }
  7151. if invalidParams.Len() > 0 {
  7152. return invalidParams
  7153. }
  7154. return nil
  7155. }
  7156. // SetACL sets the ACL field's value.
  7157. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  7158. s.ACL = &v
  7159. return s
  7160. }
  7161. // SetBucket sets the Bucket field's value.
  7162. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  7163. s.Bucket = &v
  7164. return s
  7165. }
  7166. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  7167. if s.Bucket == nil {
  7168. return v
  7169. }
  7170. return *s.Bucket
  7171. }
  7172. // SetCacheControl sets the CacheControl field's value.
  7173. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  7174. s.CacheControl = &v
  7175. return s
  7176. }
  7177. // SetContentDisposition sets the ContentDisposition field's value.
  7178. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  7179. s.ContentDisposition = &v
  7180. return s
  7181. }
  7182. // SetContentEncoding sets the ContentEncoding field's value.
  7183. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  7184. s.ContentEncoding = &v
  7185. return s
  7186. }
  7187. // SetContentLanguage sets the ContentLanguage field's value.
  7188. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  7189. s.ContentLanguage = &v
  7190. return s
  7191. }
  7192. // SetContentType sets the ContentType field's value.
  7193. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  7194. s.ContentType = &v
  7195. return s
  7196. }
  7197. // SetExpires sets the Expires field's value.
  7198. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  7199. s.Expires = &v
  7200. return s
  7201. }
  7202. // SetGrantFullControl sets the GrantFullControl field's value.
  7203. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  7204. s.GrantFullControl = &v
  7205. return s
  7206. }
  7207. // SetGrantRead sets the GrantRead field's value.
  7208. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  7209. s.GrantRead = &v
  7210. return s
  7211. }
  7212. // SetGrantReadACP sets the GrantReadACP field's value.
  7213. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  7214. s.GrantReadACP = &v
  7215. return s
  7216. }
  7217. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7218. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  7219. s.GrantWriteACP = &v
  7220. return s
  7221. }
  7222. // SetKey sets the Key field's value.
  7223. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  7224. s.Key = &v
  7225. return s
  7226. }
  7227. // SetMetadata sets the Metadata field's value.
  7228. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  7229. s.Metadata = v
  7230. return s
  7231. }
  7232. // SetRequestPayer sets the RequestPayer field's value.
  7233. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  7234. s.RequestPayer = &v
  7235. return s
  7236. }
  7237. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7238. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  7239. s.SSECustomerAlgorithm = &v
  7240. return s
  7241. }
  7242. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7243. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  7244. s.SSECustomerKey = &v
  7245. return s
  7246. }
  7247. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  7248. if s.SSECustomerKey == nil {
  7249. return v
  7250. }
  7251. return *s.SSECustomerKey
  7252. }
  7253. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7254. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  7255. s.SSECustomerKeyMD5 = &v
  7256. return s
  7257. }
  7258. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7259. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  7260. s.SSEKMSKeyId = &v
  7261. return s
  7262. }
  7263. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7264. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  7265. s.ServerSideEncryption = &v
  7266. return s
  7267. }
  7268. // SetStorageClass sets the StorageClass field's value.
  7269. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  7270. s.StorageClass = &v
  7271. return s
  7272. }
  7273. // SetTagging sets the Tagging field's value.
  7274. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  7275. s.Tagging = &v
  7276. return s
  7277. }
  7278. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7279. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  7280. s.WebsiteRedirectLocation = &v
  7281. return s
  7282. }
  7283. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUploadOutput
  7284. type CreateMultipartUploadOutput struct {
  7285. _ struct{} `type:"structure"`
  7286. // Date when multipart upload will become eligible for abort operation by lifecycle.
  7287. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  7288. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  7289. // operation.
  7290. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  7291. // Name of the bucket to which the multipart upload was initiated.
  7292. Bucket *string `locationName:"Bucket" type:"string"`
  7293. // Object key for which the multipart upload was initiated.
  7294. Key *string `min:"1" type:"string"`
  7295. // If present, indicates that the requester was successfully charged for the
  7296. // request.
  7297. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7298. // If server-side encryption with a customer-provided encryption key was requested,
  7299. // the response will include this header confirming the encryption algorithm
  7300. // used.
  7301. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7302. // If server-side encryption with a customer-provided encryption key was requested,
  7303. // the response will include this header to provide round trip message integrity
  7304. // verification of the customer-provided encryption key.
  7305. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7306. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7307. // encryption key that was used for the object.
  7308. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7309. // The Server-side encryption algorithm used when storing this object in S3
  7310. // (e.g., AES256, aws:kms).
  7311. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7312. // ID for the initiated multipart upload.
  7313. UploadId *string `type:"string"`
  7314. }
  7315. // String returns the string representation
  7316. func (s CreateMultipartUploadOutput) String() string {
  7317. return awsutil.Prettify(s)
  7318. }
  7319. // GoString returns the string representation
  7320. func (s CreateMultipartUploadOutput) GoString() string {
  7321. return s.String()
  7322. }
  7323. // SetAbortDate sets the AbortDate field's value.
  7324. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  7325. s.AbortDate = &v
  7326. return s
  7327. }
  7328. // SetAbortRuleId sets the AbortRuleId field's value.
  7329. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  7330. s.AbortRuleId = &v
  7331. return s
  7332. }
  7333. // SetBucket sets the Bucket field's value.
  7334. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  7335. s.Bucket = &v
  7336. return s
  7337. }
  7338. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  7339. if s.Bucket == nil {
  7340. return v
  7341. }
  7342. return *s.Bucket
  7343. }
  7344. // SetKey sets the Key field's value.
  7345. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  7346. s.Key = &v
  7347. return s
  7348. }
  7349. // SetRequestCharged sets the RequestCharged field's value.
  7350. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  7351. s.RequestCharged = &v
  7352. return s
  7353. }
  7354. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7355. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  7356. s.SSECustomerAlgorithm = &v
  7357. return s
  7358. }
  7359. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7360. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  7361. s.SSECustomerKeyMD5 = &v
  7362. return s
  7363. }
  7364. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7365. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  7366. s.SSEKMSKeyId = &v
  7367. return s
  7368. }
  7369. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7370. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  7371. s.ServerSideEncryption = &v
  7372. return s
  7373. }
  7374. // SetUploadId sets the UploadId field's value.
  7375. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  7376. s.UploadId = &v
  7377. return s
  7378. }
  7379. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Delete
  7380. type Delete struct {
  7381. _ struct{} `type:"structure"`
  7382. // Objects is a required field
  7383. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  7384. // Element to enable quiet mode for the request. When you add this element,
  7385. // you must set its value to true.
  7386. Quiet *bool `type:"boolean"`
  7387. }
  7388. // String returns the string representation
  7389. func (s Delete) String() string {
  7390. return awsutil.Prettify(s)
  7391. }
  7392. // GoString returns the string representation
  7393. func (s Delete) GoString() string {
  7394. return s.String()
  7395. }
  7396. // Validate inspects the fields of the type to determine if they are valid.
  7397. func (s *Delete) Validate() error {
  7398. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  7399. if s.Objects == nil {
  7400. invalidParams.Add(request.NewErrParamRequired("Objects"))
  7401. }
  7402. if s.Objects != nil {
  7403. for i, v := range s.Objects {
  7404. if v == nil {
  7405. continue
  7406. }
  7407. if err := v.Validate(); err != nil {
  7408. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  7409. }
  7410. }
  7411. }
  7412. if invalidParams.Len() > 0 {
  7413. return invalidParams
  7414. }
  7415. return nil
  7416. }
  7417. // SetObjects sets the Objects field's value.
  7418. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  7419. s.Objects = v
  7420. return s
  7421. }
  7422. // SetQuiet sets the Quiet field's value.
  7423. func (s *Delete) SetQuiet(v bool) *Delete {
  7424. s.Quiet = &v
  7425. return s
  7426. }
  7427. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationRequest
  7428. type DeleteBucketAnalyticsConfigurationInput struct {
  7429. _ struct{} `type:"structure"`
  7430. // The name of the bucket from which an analytics configuration is deleted.
  7431. //
  7432. // Bucket is a required field
  7433. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7434. // The identifier used to represent an analytics configuration.
  7435. //
  7436. // Id is a required field
  7437. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7438. }
  7439. // String returns the string representation
  7440. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  7441. return awsutil.Prettify(s)
  7442. }
  7443. // GoString returns the string representation
  7444. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  7445. return s.String()
  7446. }
  7447. // Validate inspects the fields of the type to determine if they are valid.
  7448. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  7449. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  7450. if s.Bucket == nil {
  7451. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7452. }
  7453. if s.Id == nil {
  7454. invalidParams.Add(request.NewErrParamRequired("Id"))
  7455. }
  7456. if invalidParams.Len() > 0 {
  7457. return invalidParams
  7458. }
  7459. return nil
  7460. }
  7461. // SetBucket sets the Bucket field's value.
  7462. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  7463. s.Bucket = &v
  7464. return s
  7465. }
  7466. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  7467. if s.Bucket == nil {
  7468. return v
  7469. }
  7470. return *s.Bucket
  7471. }
  7472. // SetId sets the Id field's value.
  7473. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  7474. s.Id = &v
  7475. return s
  7476. }
  7477. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfigurationOutput
  7478. type DeleteBucketAnalyticsConfigurationOutput struct {
  7479. _ struct{} `type:"structure"`
  7480. }
  7481. // String returns the string representation
  7482. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  7483. return awsutil.Prettify(s)
  7484. }
  7485. // GoString returns the string representation
  7486. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  7487. return s.String()
  7488. }
  7489. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsRequest
  7490. type DeleteBucketCorsInput struct {
  7491. _ struct{} `type:"structure"`
  7492. // Bucket is a required field
  7493. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7494. }
  7495. // String returns the string representation
  7496. func (s DeleteBucketCorsInput) String() string {
  7497. return awsutil.Prettify(s)
  7498. }
  7499. // GoString returns the string representation
  7500. func (s DeleteBucketCorsInput) GoString() string {
  7501. return s.String()
  7502. }
  7503. // Validate inspects the fields of the type to determine if they are valid.
  7504. func (s *DeleteBucketCorsInput) Validate() error {
  7505. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  7506. if s.Bucket == nil {
  7507. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7508. }
  7509. if invalidParams.Len() > 0 {
  7510. return invalidParams
  7511. }
  7512. return nil
  7513. }
  7514. // SetBucket sets the Bucket field's value.
  7515. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  7516. s.Bucket = &v
  7517. return s
  7518. }
  7519. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  7520. if s.Bucket == nil {
  7521. return v
  7522. }
  7523. return *s.Bucket
  7524. }
  7525. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCorsOutput
  7526. type DeleteBucketCorsOutput struct {
  7527. _ struct{} `type:"structure"`
  7528. }
  7529. // String returns the string representation
  7530. func (s DeleteBucketCorsOutput) String() string {
  7531. return awsutil.Prettify(s)
  7532. }
  7533. // GoString returns the string representation
  7534. func (s DeleteBucketCorsOutput) GoString() string {
  7535. return s.String()
  7536. }
  7537. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketRequest
  7538. type DeleteBucketInput struct {
  7539. _ struct{} `type:"structure"`
  7540. // Bucket is a required field
  7541. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7542. }
  7543. // String returns the string representation
  7544. func (s DeleteBucketInput) String() string {
  7545. return awsutil.Prettify(s)
  7546. }
  7547. // GoString returns the string representation
  7548. func (s DeleteBucketInput) GoString() string {
  7549. return s.String()
  7550. }
  7551. // Validate inspects the fields of the type to determine if they are valid.
  7552. func (s *DeleteBucketInput) Validate() error {
  7553. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  7554. if s.Bucket == nil {
  7555. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7556. }
  7557. if invalidParams.Len() > 0 {
  7558. return invalidParams
  7559. }
  7560. return nil
  7561. }
  7562. // SetBucket sets the Bucket field's value.
  7563. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  7564. s.Bucket = &v
  7565. return s
  7566. }
  7567. func (s *DeleteBucketInput) getBucket() (v string) {
  7568. if s.Bucket == nil {
  7569. return v
  7570. }
  7571. return *s.Bucket
  7572. }
  7573. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationRequest
  7574. type DeleteBucketInventoryConfigurationInput struct {
  7575. _ struct{} `type:"structure"`
  7576. // The name of the bucket containing the inventory configuration to delete.
  7577. //
  7578. // Bucket is a required field
  7579. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7580. // The ID used to identify the inventory configuration.
  7581. //
  7582. // Id is a required field
  7583. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7584. }
  7585. // String returns the string representation
  7586. func (s DeleteBucketInventoryConfigurationInput) String() string {
  7587. return awsutil.Prettify(s)
  7588. }
  7589. // GoString returns the string representation
  7590. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  7591. return s.String()
  7592. }
  7593. // Validate inspects the fields of the type to determine if they are valid.
  7594. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  7595. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  7596. if s.Bucket == nil {
  7597. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7598. }
  7599. if s.Id == nil {
  7600. invalidParams.Add(request.NewErrParamRequired("Id"))
  7601. }
  7602. if invalidParams.Len() > 0 {
  7603. return invalidParams
  7604. }
  7605. return nil
  7606. }
  7607. // SetBucket sets the Bucket field's value.
  7608. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  7609. s.Bucket = &v
  7610. return s
  7611. }
  7612. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  7613. if s.Bucket == nil {
  7614. return v
  7615. }
  7616. return *s.Bucket
  7617. }
  7618. // SetId sets the Id field's value.
  7619. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  7620. s.Id = &v
  7621. return s
  7622. }
  7623. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfigurationOutput
  7624. type DeleteBucketInventoryConfigurationOutput struct {
  7625. _ struct{} `type:"structure"`
  7626. }
  7627. // String returns the string representation
  7628. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  7629. return awsutil.Prettify(s)
  7630. }
  7631. // GoString returns the string representation
  7632. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  7633. return s.String()
  7634. }
  7635. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleRequest
  7636. type DeleteBucketLifecycleInput struct {
  7637. _ struct{} `type:"structure"`
  7638. // Bucket is a required field
  7639. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7640. }
  7641. // String returns the string representation
  7642. func (s DeleteBucketLifecycleInput) String() string {
  7643. return awsutil.Prettify(s)
  7644. }
  7645. // GoString returns the string representation
  7646. func (s DeleteBucketLifecycleInput) GoString() string {
  7647. return s.String()
  7648. }
  7649. // Validate inspects the fields of the type to determine if they are valid.
  7650. func (s *DeleteBucketLifecycleInput) Validate() error {
  7651. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  7652. if s.Bucket == nil {
  7653. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7654. }
  7655. if invalidParams.Len() > 0 {
  7656. return invalidParams
  7657. }
  7658. return nil
  7659. }
  7660. // SetBucket sets the Bucket field's value.
  7661. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  7662. s.Bucket = &v
  7663. return s
  7664. }
  7665. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  7666. if s.Bucket == nil {
  7667. return v
  7668. }
  7669. return *s.Bucket
  7670. }
  7671. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycleOutput
  7672. type DeleteBucketLifecycleOutput struct {
  7673. _ struct{} `type:"structure"`
  7674. }
  7675. // String returns the string representation
  7676. func (s DeleteBucketLifecycleOutput) String() string {
  7677. return awsutil.Prettify(s)
  7678. }
  7679. // GoString returns the string representation
  7680. func (s DeleteBucketLifecycleOutput) GoString() string {
  7681. return s.String()
  7682. }
  7683. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationRequest
  7684. type DeleteBucketMetricsConfigurationInput struct {
  7685. _ struct{} `type:"structure"`
  7686. // The name of the bucket containing the metrics configuration to delete.
  7687. //
  7688. // Bucket is a required field
  7689. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7690. // The ID used to identify the metrics configuration.
  7691. //
  7692. // Id is a required field
  7693. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7694. }
  7695. // String returns the string representation
  7696. func (s DeleteBucketMetricsConfigurationInput) String() string {
  7697. return awsutil.Prettify(s)
  7698. }
  7699. // GoString returns the string representation
  7700. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  7701. return s.String()
  7702. }
  7703. // Validate inspects the fields of the type to determine if they are valid.
  7704. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  7705. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  7706. if s.Bucket == nil {
  7707. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7708. }
  7709. if s.Id == nil {
  7710. invalidParams.Add(request.NewErrParamRequired("Id"))
  7711. }
  7712. if invalidParams.Len() > 0 {
  7713. return invalidParams
  7714. }
  7715. return nil
  7716. }
  7717. // SetBucket sets the Bucket field's value.
  7718. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  7719. s.Bucket = &v
  7720. return s
  7721. }
  7722. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  7723. if s.Bucket == nil {
  7724. return v
  7725. }
  7726. return *s.Bucket
  7727. }
  7728. // SetId sets the Id field's value.
  7729. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  7730. s.Id = &v
  7731. return s
  7732. }
  7733. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfigurationOutput
  7734. type DeleteBucketMetricsConfigurationOutput struct {
  7735. _ struct{} `type:"structure"`
  7736. }
  7737. // String returns the string representation
  7738. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  7739. return awsutil.Prettify(s)
  7740. }
  7741. // GoString returns the string representation
  7742. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  7743. return s.String()
  7744. }
  7745. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOutput
  7746. type DeleteBucketOutput struct {
  7747. _ struct{} `type:"structure"`
  7748. }
  7749. // String returns the string representation
  7750. func (s DeleteBucketOutput) String() string {
  7751. return awsutil.Prettify(s)
  7752. }
  7753. // GoString returns the string representation
  7754. func (s DeleteBucketOutput) GoString() string {
  7755. return s.String()
  7756. }
  7757. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyRequest
  7758. type DeleteBucketPolicyInput struct {
  7759. _ struct{} `type:"structure"`
  7760. // Bucket is a required field
  7761. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7762. }
  7763. // String returns the string representation
  7764. func (s DeleteBucketPolicyInput) String() string {
  7765. return awsutil.Prettify(s)
  7766. }
  7767. // GoString returns the string representation
  7768. func (s DeleteBucketPolicyInput) GoString() string {
  7769. return s.String()
  7770. }
  7771. // Validate inspects the fields of the type to determine if they are valid.
  7772. func (s *DeleteBucketPolicyInput) Validate() error {
  7773. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  7774. if s.Bucket == nil {
  7775. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7776. }
  7777. if invalidParams.Len() > 0 {
  7778. return invalidParams
  7779. }
  7780. return nil
  7781. }
  7782. // SetBucket sets the Bucket field's value.
  7783. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  7784. s.Bucket = &v
  7785. return s
  7786. }
  7787. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  7788. if s.Bucket == nil {
  7789. return v
  7790. }
  7791. return *s.Bucket
  7792. }
  7793. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicyOutput
  7794. type DeleteBucketPolicyOutput struct {
  7795. _ struct{} `type:"structure"`
  7796. }
  7797. // String returns the string representation
  7798. func (s DeleteBucketPolicyOutput) String() string {
  7799. return awsutil.Prettify(s)
  7800. }
  7801. // GoString returns the string representation
  7802. func (s DeleteBucketPolicyOutput) GoString() string {
  7803. return s.String()
  7804. }
  7805. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationRequest
  7806. type DeleteBucketReplicationInput struct {
  7807. _ struct{} `type:"structure"`
  7808. // Bucket is a required field
  7809. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7810. }
  7811. // String returns the string representation
  7812. func (s DeleteBucketReplicationInput) String() string {
  7813. return awsutil.Prettify(s)
  7814. }
  7815. // GoString returns the string representation
  7816. func (s DeleteBucketReplicationInput) GoString() string {
  7817. return s.String()
  7818. }
  7819. // Validate inspects the fields of the type to determine if they are valid.
  7820. func (s *DeleteBucketReplicationInput) Validate() error {
  7821. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  7822. if s.Bucket == nil {
  7823. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7824. }
  7825. if invalidParams.Len() > 0 {
  7826. return invalidParams
  7827. }
  7828. return nil
  7829. }
  7830. // SetBucket sets the Bucket field's value.
  7831. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  7832. s.Bucket = &v
  7833. return s
  7834. }
  7835. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  7836. if s.Bucket == nil {
  7837. return v
  7838. }
  7839. return *s.Bucket
  7840. }
  7841. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplicationOutput
  7842. type DeleteBucketReplicationOutput struct {
  7843. _ struct{} `type:"structure"`
  7844. }
  7845. // String returns the string representation
  7846. func (s DeleteBucketReplicationOutput) String() string {
  7847. return awsutil.Prettify(s)
  7848. }
  7849. // GoString returns the string representation
  7850. func (s DeleteBucketReplicationOutput) GoString() string {
  7851. return s.String()
  7852. }
  7853. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingRequest
  7854. type DeleteBucketTaggingInput struct {
  7855. _ struct{} `type:"structure"`
  7856. // Bucket is a required field
  7857. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7858. }
  7859. // String returns the string representation
  7860. func (s DeleteBucketTaggingInput) String() string {
  7861. return awsutil.Prettify(s)
  7862. }
  7863. // GoString returns the string representation
  7864. func (s DeleteBucketTaggingInput) GoString() string {
  7865. return s.String()
  7866. }
  7867. // Validate inspects the fields of the type to determine if they are valid.
  7868. func (s *DeleteBucketTaggingInput) Validate() error {
  7869. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  7870. if s.Bucket == nil {
  7871. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7872. }
  7873. if invalidParams.Len() > 0 {
  7874. return invalidParams
  7875. }
  7876. return nil
  7877. }
  7878. // SetBucket sets the Bucket field's value.
  7879. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  7880. s.Bucket = &v
  7881. return s
  7882. }
  7883. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  7884. if s.Bucket == nil {
  7885. return v
  7886. }
  7887. return *s.Bucket
  7888. }
  7889. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTaggingOutput
  7890. type DeleteBucketTaggingOutput struct {
  7891. _ struct{} `type:"structure"`
  7892. }
  7893. // String returns the string representation
  7894. func (s DeleteBucketTaggingOutput) String() string {
  7895. return awsutil.Prettify(s)
  7896. }
  7897. // GoString returns the string representation
  7898. func (s DeleteBucketTaggingOutput) GoString() string {
  7899. return s.String()
  7900. }
  7901. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteRequest
  7902. type DeleteBucketWebsiteInput struct {
  7903. _ struct{} `type:"structure"`
  7904. // Bucket is a required field
  7905. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7906. }
  7907. // String returns the string representation
  7908. func (s DeleteBucketWebsiteInput) String() string {
  7909. return awsutil.Prettify(s)
  7910. }
  7911. // GoString returns the string representation
  7912. func (s DeleteBucketWebsiteInput) GoString() string {
  7913. return s.String()
  7914. }
  7915. // Validate inspects the fields of the type to determine if they are valid.
  7916. func (s *DeleteBucketWebsiteInput) Validate() error {
  7917. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  7918. if s.Bucket == nil {
  7919. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7920. }
  7921. if invalidParams.Len() > 0 {
  7922. return invalidParams
  7923. }
  7924. return nil
  7925. }
  7926. // SetBucket sets the Bucket field's value.
  7927. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  7928. s.Bucket = &v
  7929. return s
  7930. }
  7931. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  7932. if s.Bucket == nil {
  7933. return v
  7934. }
  7935. return *s.Bucket
  7936. }
  7937. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsiteOutput
  7938. type DeleteBucketWebsiteOutput struct {
  7939. _ struct{} `type:"structure"`
  7940. }
  7941. // String returns the string representation
  7942. func (s DeleteBucketWebsiteOutput) String() string {
  7943. return awsutil.Prettify(s)
  7944. }
  7945. // GoString returns the string representation
  7946. func (s DeleteBucketWebsiteOutput) GoString() string {
  7947. return s.String()
  7948. }
  7949. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteMarkerEntry
  7950. type DeleteMarkerEntry struct {
  7951. _ struct{} `type:"structure"`
  7952. // Specifies whether the object is (true) or is not (false) the latest version
  7953. // of an object.
  7954. IsLatest *bool `type:"boolean"`
  7955. // The object key.
  7956. Key *string `min:"1" type:"string"`
  7957. // Date and time the object was last modified.
  7958. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7959. Owner *Owner `type:"structure"`
  7960. // Version ID of an object.
  7961. VersionId *string `type:"string"`
  7962. }
  7963. // String returns the string representation
  7964. func (s DeleteMarkerEntry) String() string {
  7965. return awsutil.Prettify(s)
  7966. }
  7967. // GoString returns the string representation
  7968. func (s DeleteMarkerEntry) GoString() string {
  7969. return s.String()
  7970. }
  7971. // SetIsLatest sets the IsLatest field's value.
  7972. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  7973. s.IsLatest = &v
  7974. return s
  7975. }
  7976. // SetKey sets the Key field's value.
  7977. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  7978. s.Key = &v
  7979. return s
  7980. }
  7981. // SetLastModified sets the LastModified field's value.
  7982. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  7983. s.LastModified = &v
  7984. return s
  7985. }
  7986. // SetOwner sets the Owner field's value.
  7987. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  7988. s.Owner = v
  7989. return s
  7990. }
  7991. // SetVersionId sets the VersionId field's value.
  7992. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  7993. s.VersionId = &v
  7994. return s
  7995. }
  7996. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectRequest
  7997. type DeleteObjectInput struct {
  7998. _ struct{} `type:"structure"`
  7999. // Bucket is a required field
  8000. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8001. // Key is a required field
  8002. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8003. // The concatenation of the authentication device's serial number, a space,
  8004. // and the value that is displayed on your authentication device.
  8005. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8006. // Confirms that the requester knows that she or he will be charged for the
  8007. // request. Bucket owners need not specify this parameter in their requests.
  8008. // Documentation on downloading objects from requester pays buckets can be found
  8009. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8010. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8011. // VersionId used to reference a specific version of the object.
  8012. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8013. }
  8014. // String returns the string representation
  8015. func (s DeleteObjectInput) String() string {
  8016. return awsutil.Prettify(s)
  8017. }
  8018. // GoString returns the string representation
  8019. func (s DeleteObjectInput) GoString() string {
  8020. return s.String()
  8021. }
  8022. // Validate inspects the fields of the type to determine if they are valid.
  8023. func (s *DeleteObjectInput) Validate() error {
  8024. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  8025. if s.Bucket == nil {
  8026. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8027. }
  8028. if s.Key == nil {
  8029. invalidParams.Add(request.NewErrParamRequired("Key"))
  8030. }
  8031. if s.Key != nil && len(*s.Key) < 1 {
  8032. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8033. }
  8034. if invalidParams.Len() > 0 {
  8035. return invalidParams
  8036. }
  8037. return nil
  8038. }
  8039. // SetBucket sets the Bucket field's value.
  8040. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  8041. s.Bucket = &v
  8042. return s
  8043. }
  8044. func (s *DeleteObjectInput) getBucket() (v string) {
  8045. if s.Bucket == nil {
  8046. return v
  8047. }
  8048. return *s.Bucket
  8049. }
  8050. // SetKey sets the Key field's value.
  8051. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  8052. s.Key = &v
  8053. return s
  8054. }
  8055. // SetMFA sets the MFA field's value.
  8056. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  8057. s.MFA = &v
  8058. return s
  8059. }
  8060. // SetRequestPayer sets the RequestPayer field's value.
  8061. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  8062. s.RequestPayer = &v
  8063. return s
  8064. }
  8065. // SetVersionId sets the VersionId field's value.
  8066. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  8067. s.VersionId = &v
  8068. return s
  8069. }
  8070. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectOutput
  8071. type DeleteObjectOutput struct {
  8072. _ struct{} `type:"structure"`
  8073. // Specifies whether the versioned object that was permanently deleted was (true)
  8074. // or was not (false) a delete marker.
  8075. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  8076. // If present, indicates that the requester was successfully charged for the
  8077. // request.
  8078. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8079. // Returns the version ID of the delete marker created as a result of the DELETE
  8080. // operation.
  8081. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8082. }
  8083. // String returns the string representation
  8084. func (s DeleteObjectOutput) String() string {
  8085. return awsutil.Prettify(s)
  8086. }
  8087. // GoString returns the string representation
  8088. func (s DeleteObjectOutput) GoString() string {
  8089. return s.String()
  8090. }
  8091. // SetDeleteMarker sets the DeleteMarker field's value.
  8092. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  8093. s.DeleteMarker = &v
  8094. return s
  8095. }
  8096. // SetRequestCharged sets the RequestCharged field's value.
  8097. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  8098. s.RequestCharged = &v
  8099. return s
  8100. }
  8101. // SetVersionId sets the VersionId field's value.
  8102. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  8103. s.VersionId = &v
  8104. return s
  8105. }
  8106. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingRequest
  8107. type DeleteObjectTaggingInput struct {
  8108. _ struct{} `type:"structure"`
  8109. // Bucket is a required field
  8110. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8111. // Key is a required field
  8112. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8113. // The versionId of the object that the tag-set will be removed from.
  8114. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8115. }
  8116. // String returns the string representation
  8117. func (s DeleteObjectTaggingInput) String() string {
  8118. return awsutil.Prettify(s)
  8119. }
  8120. // GoString returns the string representation
  8121. func (s DeleteObjectTaggingInput) GoString() string {
  8122. return s.String()
  8123. }
  8124. // Validate inspects the fields of the type to determine if they are valid.
  8125. func (s *DeleteObjectTaggingInput) Validate() error {
  8126. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  8127. if s.Bucket == nil {
  8128. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8129. }
  8130. if s.Key == nil {
  8131. invalidParams.Add(request.NewErrParamRequired("Key"))
  8132. }
  8133. if s.Key != nil && len(*s.Key) < 1 {
  8134. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8135. }
  8136. if invalidParams.Len() > 0 {
  8137. return invalidParams
  8138. }
  8139. return nil
  8140. }
  8141. // SetBucket sets the Bucket field's value.
  8142. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  8143. s.Bucket = &v
  8144. return s
  8145. }
  8146. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  8147. if s.Bucket == nil {
  8148. return v
  8149. }
  8150. return *s.Bucket
  8151. }
  8152. // SetKey sets the Key field's value.
  8153. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  8154. s.Key = &v
  8155. return s
  8156. }
  8157. // SetVersionId sets the VersionId field's value.
  8158. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  8159. s.VersionId = &v
  8160. return s
  8161. }
  8162. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTaggingOutput
  8163. type DeleteObjectTaggingOutput struct {
  8164. _ struct{} `type:"structure"`
  8165. // The versionId of the object the tag-set was removed from.
  8166. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8167. }
  8168. // String returns the string representation
  8169. func (s DeleteObjectTaggingOutput) String() string {
  8170. return awsutil.Prettify(s)
  8171. }
  8172. // GoString returns the string representation
  8173. func (s DeleteObjectTaggingOutput) GoString() string {
  8174. return s.String()
  8175. }
  8176. // SetVersionId sets the VersionId field's value.
  8177. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  8178. s.VersionId = &v
  8179. return s
  8180. }
  8181. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsRequest
  8182. type DeleteObjectsInput struct {
  8183. _ struct{} `type:"structure" payload:"Delete"`
  8184. // Bucket is a required field
  8185. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8186. // Delete is a required field
  8187. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8188. // The concatenation of the authentication device's serial number, a space,
  8189. // and the value that is displayed on your authentication device.
  8190. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8191. // Confirms that the requester knows that she or he will be charged for the
  8192. // request. Bucket owners need not specify this parameter in their requests.
  8193. // Documentation on downloading objects from requester pays buckets can be found
  8194. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8195. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8196. }
  8197. // String returns the string representation
  8198. func (s DeleteObjectsInput) String() string {
  8199. return awsutil.Prettify(s)
  8200. }
  8201. // GoString returns the string representation
  8202. func (s DeleteObjectsInput) GoString() string {
  8203. return s.String()
  8204. }
  8205. // Validate inspects the fields of the type to determine if they are valid.
  8206. func (s *DeleteObjectsInput) Validate() error {
  8207. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  8208. if s.Bucket == nil {
  8209. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8210. }
  8211. if s.Delete == nil {
  8212. invalidParams.Add(request.NewErrParamRequired("Delete"))
  8213. }
  8214. if s.Delete != nil {
  8215. if err := s.Delete.Validate(); err != nil {
  8216. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  8217. }
  8218. }
  8219. if invalidParams.Len() > 0 {
  8220. return invalidParams
  8221. }
  8222. return nil
  8223. }
  8224. // SetBucket sets the Bucket field's value.
  8225. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  8226. s.Bucket = &v
  8227. return s
  8228. }
  8229. func (s *DeleteObjectsInput) getBucket() (v string) {
  8230. if s.Bucket == nil {
  8231. return v
  8232. }
  8233. return *s.Bucket
  8234. }
  8235. // SetDelete sets the Delete field's value.
  8236. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  8237. s.Delete = v
  8238. return s
  8239. }
  8240. // SetMFA sets the MFA field's value.
  8241. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  8242. s.MFA = &v
  8243. return s
  8244. }
  8245. // SetRequestPayer sets the RequestPayer field's value.
  8246. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  8247. s.RequestPayer = &v
  8248. return s
  8249. }
  8250. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectsOutput
  8251. type DeleteObjectsOutput struct {
  8252. _ struct{} `type:"structure"`
  8253. Deleted []*DeletedObject `type:"list" flattened:"true"`
  8254. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  8255. // If present, indicates that the requester was successfully charged for the
  8256. // request.
  8257. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8258. }
  8259. // String returns the string representation
  8260. func (s DeleteObjectsOutput) String() string {
  8261. return awsutil.Prettify(s)
  8262. }
  8263. // GoString returns the string representation
  8264. func (s DeleteObjectsOutput) GoString() string {
  8265. return s.String()
  8266. }
  8267. // SetDeleted sets the Deleted field's value.
  8268. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  8269. s.Deleted = v
  8270. return s
  8271. }
  8272. // SetErrors sets the Errors field's value.
  8273. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  8274. s.Errors = v
  8275. return s
  8276. }
  8277. // SetRequestCharged sets the RequestCharged field's value.
  8278. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  8279. s.RequestCharged = &v
  8280. return s
  8281. }
  8282. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletedObject
  8283. type DeletedObject struct {
  8284. _ struct{} `type:"structure"`
  8285. DeleteMarker *bool `type:"boolean"`
  8286. DeleteMarkerVersionId *string `type:"string"`
  8287. Key *string `min:"1" type:"string"`
  8288. VersionId *string `type:"string"`
  8289. }
  8290. // String returns the string representation
  8291. func (s DeletedObject) String() string {
  8292. return awsutil.Prettify(s)
  8293. }
  8294. // GoString returns the string representation
  8295. func (s DeletedObject) GoString() string {
  8296. return s.String()
  8297. }
  8298. // SetDeleteMarker sets the DeleteMarker field's value.
  8299. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  8300. s.DeleteMarker = &v
  8301. return s
  8302. }
  8303. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  8304. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  8305. s.DeleteMarkerVersionId = &v
  8306. return s
  8307. }
  8308. // SetKey sets the Key field's value.
  8309. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  8310. s.Key = &v
  8311. return s
  8312. }
  8313. // SetVersionId sets the VersionId field's value.
  8314. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  8315. s.VersionId = &v
  8316. return s
  8317. }
  8318. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Destination
  8319. type Destination struct {
  8320. _ struct{} `type:"structure"`
  8321. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  8322. // replicas of the object identified by the rule.
  8323. //
  8324. // Bucket is a required field
  8325. Bucket *string `type:"string" required:"true"`
  8326. // The class of storage used to store the object.
  8327. StorageClass *string `type:"string" enum:"StorageClass"`
  8328. }
  8329. // String returns the string representation
  8330. func (s Destination) String() string {
  8331. return awsutil.Prettify(s)
  8332. }
  8333. // GoString returns the string representation
  8334. func (s Destination) GoString() string {
  8335. return s.String()
  8336. }
  8337. // Validate inspects the fields of the type to determine if they are valid.
  8338. func (s *Destination) Validate() error {
  8339. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  8340. if s.Bucket == nil {
  8341. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8342. }
  8343. if invalidParams.Len() > 0 {
  8344. return invalidParams
  8345. }
  8346. return nil
  8347. }
  8348. // SetBucket sets the Bucket field's value.
  8349. func (s *Destination) SetBucket(v string) *Destination {
  8350. s.Bucket = &v
  8351. return s
  8352. }
  8353. func (s *Destination) getBucket() (v string) {
  8354. if s.Bucket == nil {
  8355. return v
  8356. }
  8357. return *s.Bucket
  8358. }
  8359. // SetStorageClass sets the StorageClass field's value.
  8360. func (s *Destination) SetStorageClass(v string) *Destination {
  8361. s.StorageClass = &v
  8362. return s
  8363. }
  8364. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Error
  8365. type Error struct {
  8366. _ struct{} `type:"structure"`
  8367. Code *string `type:"string"`
  8368. Key *string `min:"1" type:"string"`
  8369. Message *string `type:"string"`
  8370. VersionId *string `type:"string"`
  8371. }
  8372. // String returns the string representation
  8373. func (s Error) String() string {
  8374. return awsutil.Prettify(s)
  8375. }
  8376. // GoString returns the string representation
  8377. func (s Error) GoString() string {
  8378. return s.String()
  8379. }
  8380. // SetCode sets the Code field's value.
  8381. func (s *Error) SetCode(v string) *Error {
  8382. s.Code = &v
  8383. return s
  8384. }
  8385. // SetKey sets the Key field's value.
  8386. func (s *Error) SetKey(v string) *Error {
  8387. s.Key = &v
  8388. return s
  8389. }
  8390. // SetMessage sets the Message field's value.
  8391. func (s *Error) SetMessage(v string) *Error {
  8392. s.Message = &v
  8393. return s
  8394. }
  8395. // SetVersionId sets the VersionId field's value.
  8396. func (s *Error) SetVersionId(v string) *Error {
  8397. s.VersionId = &v
  8398. return s
  8399. }
  8400. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument
  8401. type ErrorDocument struct {
  8402. _ struct{} `type:"structure"`
  8403. // The object key name to use when a 4XX class error occurs.
  8404. //
  8405. // Key is a required field
  8406. Key *string `min:"1" type:"string" required:"true"`
  8407. }
  8408. // String returns the string representation
  8409. func (s ErrorDocument) String() string {
  8410. return awsutil.Prettify(s)
  8411. }
  8412. // GoString returns the string representation
  8413. func (s ErrorDocument) GoString() string {
  8414. return s.String()
  8415. }
  8416. // Validate inspects the fields of the type to determine if they are valid.
  8417. func (s *ErrorDocument) Validate() error {
  8418. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  8419. if s.Key == nil {
  8420. invalidParams.Add(request.NewErrParamRequired("Key"))
  8421. }
  8422. if s.Key != nil && len(*s.Key) < 1 {
  8423. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8424. }
  8425. if invalidParams.Len() > 0 {
  8426. return invalidParams
  8427. }
  8428. return nil
  8429. }
  8430. // SetKey sets the Key field's value.
  8431. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  8432. s.Key = &v
  8433. return s
  8434. }
  8435. // Container for key value pair that defines the criteria for the filter rule.
  8436. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/FilterRule
  8437. type FilterRule struct {
  8438. _ struct{} `type:"structure"`
  8439. // Object key name prefix or suffix identifying one or more objects to which
  8440. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  8441. // Overlapping prefixes and suffixes are not supported. For more information,
  8442. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  8443. Name *string `type:"string" enum:"FilterRuleName"`
  8444. Value *string `type:"string"`
  8445. }
  8446. // String returns the string representation
  8447. func (s FilterRule) String() string {
  8448. return awsutil.Prettify(s)
  8449. }
  8450. // GoString returns the string representation
  8451. func (s FilterRule) GoString() string {
  8452. return s.String()
  8453. }
  8454. // SetName sets the Name field's value.
  8455. func (s *FilterRule) SetName(v string) *FilterRule {
  8456. s.Name = &v
  8457. return s
  8458. }
  8459. // SetValue sets the Value field's value.
  8460. func (s *FilterRule) SetValue(v string) *FilterRule {
  8461. s.Value = &v
  8462. return s
  8463. }
  8464. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationRequest
  8465. type GetBucketAccelerateConfigurationInput struct {
  8466. _ struct{} `type:"structure"`
  8467. // Name of the bucket for which the accelerate configuration is retrieved.
  8468. //
  8469. // Bucket is a required field
  8470. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8471. }
  8472. // String returns the string representation
  8473. func (s GetBucketAccelerateConfigurationInput) String() string {
  8474. return awsutil.Prettify(s)
  8475. }
  8476. // GoString returns the string representation
  8477. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  8478. return s.String()
  8479. }
  8480. // Validate inspects the fields of the type to determine if they are valid.
  8481. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  8482. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  8483. if s.Bucket == nil {
  8484. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8485. }
  8486. if invalidParams.Len() > 0 {
  8487. return invalidParams
  8488. }
  8489. return nil
  8490. }
  8491. // SetBucket sets the Bucket field's value.
  8492. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  8493. s.Bucket = &v
  8494. return s
  8495. }
  8496. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  8497. if s.Bucket == nil {
  8498. return v
  8499. }
  8500. return *s.Bucket
  8501. }
  8502. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfigurationOutput
  8503. type GetBucketAccelerateConfigurationOutput struct {
  8504. _ struct{} `type:"structure"`
  8505. // The accelerate configuration of the bucket.
  8506. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  8507. }
  8508. // String returns the string representation
  8509. func (s GetBucketAccelerateConfigurationOutput) String() string {
  8510. return awsutil.Prettify(s)
  8511. }
  8512. // GoString returns the string representation
  8513. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  8514. return s.String()
  8515. }
  8516. // SetStatus sets the Status field's value.
  8517. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  8518. s.Status = &v
  8519. return s
  8520. }
  8521. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclRequest
  8522. type GetBucketAclInput struct {
  8523. _ struct{} `type:"structure"`
  8524. // Bucket is a required field
  8525. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8526. }
  8527. // String returns the string representation
  8528. func (s GetBucketAclInput) String() string {
  8529. return awsutil.Prettify(s)
  8530. }
  8531. // GoString returns the string representation
  8532. func (s GetBucketAclInput) GoString() string {
  8533. return s.String()
  8534. }
  8535. // Validate inspects the fields of the type to determine if they are valid.
  8536. func (s *GetBucketAclInput) Validate() error {
  8537. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  8538. if s.Bucket == nil {
  8539. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8540. }
  8541. if invalidParams.Len() > 0 {
  8542. return invalidParams
  8543. }
  8544. return nil
  8545. }
  8546. // SetBucket sets the Bucket field's value.
  8547. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  8548. s.Bucket = &v
  8549. return s
  8550. }
  8551. func (s *GetBucketAclInput) getBucket() (v string) {
  8552. if s.Bucket == nil {
  8553. return v
  8554. }
  8555. return *s.Bucket
  8556. }
  8557. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAclOutput
  8558. type GetBucketAclOutput struct {
  8559. _ struct{} `type:"structure"`
  8560. // A list of grants.
  8561. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  8562. Owner *Owner `type:"structure"`
  8563. }
  8564. // String returns the string representation
  8565. func (s GetBucketAclOutput) String() string {
  8566. return awsutil.Prettify(s)
  8567. }
  8568. // GoString returns the string representation
  8569. func (s GetBucketAclOutput) GoString() string {
  8570. return s.String()
  8571. }
  8572. // SetGrants sets the Grants field's value.
  8573. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  8574. s.Grants = v
  8575. return s
  8576. }
  8577. // SetOwner sets the Owner field's value.
  8578. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  8579. s.Owner = v
  8580. return s
  8581. }
  8582. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationRequest
  8583. type GetBucketAnalyticsConfigurationInput struct {
  8584. _ struct{} `type:"structure"`
  8585. // The name of the bucket from which an analytics configuration is retrieved.
  8586. //
  8587. // Bucket is a required field
  8588. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8589. // The identifier used to represent an analytics configuration.
  8590. //
  8591. // Id is a required field
  8592. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8593. }
  8594. // String returns the string representation
  8595. func (s GetBucketAnalyticsConfigurationInput) String() string {
  8596. return awsutil.Prettify(s)
  8597. }
  8598. // GoString returns the string representation
  8599. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  8600. return s.String()
  8601. }
  8602. // Validate inspects the fields of the type to determine if they are valid.
  8603. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  8604. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  8605. if s.Bucket == nil {
  8606. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8607. }
  8608. if s.Id == nil {
  8609. invalidParams.Add(request.NewErrParamRequired("Id"))
  8610. }
  8611. if invalidParams.Len() > 0 {
  8612. return invalidParams
  8613. }
  8614. return nil
  8615. }
  8616. // SetBucket sets the Bucket field's value.
  8617. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  8618. s.Bucket = &v
  8619. return s
  8620. }
  8621. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  8622. if s.Bucket == nil {
  8623. return v
  8624. }
  8625. return *s.Bucket
  8626. }
  8627. // SetId sets the Id field's value.
  8628. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  8629. s.Id = &v
  8630. return s
  8631. }
  8632. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfigurationOutput
  8633. type GetBucketAnalyticsConfigurationOutput struct {
  8634. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  8635. // The configuration and any analyses for the analytics filter.
  8636. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  8637. }
  8638. // String returns the string representation
  8639. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  8640. return awsutil.Prettify(s)
  8641. }
  8642. // GoString returns the string representation
  8643. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  8644. return s.String()
  8645. }
  8646. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  8647. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  8648. s.AnalyticsConfiguration = v
  8649. return s
  8650. }
  8651. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsRequest
  8652. type GetBucketCorsInput struct {
  8653. _ struct{} `type:"structure"`
  8654. // Bucket is a required field
  8655. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8656. }
  8657. // String returns the string representation
  8658. func (s GetBucketCorsInput) String() string {
  8659. return awsutil.Prettify(s)
  8660. }
  8661. // GoString returns the string representation
  8662. func (s GetBucketCorsInput) GoString() string {
  8663. return s.String()
  8664. }
  8665. // Validate inspects the fields of the type to determine if they are valid.
  8666. func (s *GetBucketCorsInput) Validate() error {
  8667. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  8668. if s.Bucket == nil {
  8669. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8670. }
  8671. if invalidParams.Len() > 0 {
  8672. return invalidParams
  8673. }
  8674. return nil
  8675. }
  8676. // SetBucket sets the Bucket field's value.
  8677. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  8678. s.Bucket = &v
  8679. return s
  8680. }
  8681. func (s *GetBucketCorsInput) getBucket() (v string) {
  8682. if s.Bucket == nil {
  8683. return v
  8684. }
  8685. return *s.Bucket
  8686. }
  8687. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCorsOutput
  8688. type GetBucketCorsOutput struct {
  8689. _ struct{} `type:"structure"`
  8690. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  8691. }
  8692. // String returns the string representation
  8693. func (s GetBucketCorsOutput) String() string {
  8694. return awsutil.Prettify(s)
  8695. }
  8696. // GoString returns the string representation
  8697. func (s GetBucketCorsOutput) GoString() string {
  8698. return s.String()
  8699. }
  8700. // SetCORSRules sets the CORSRules field's value.
  8701. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  8702. s.CORSRules = v
  8703. return s
  8704. }
  8705. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationRequest
  8706. type GetBucketInventoryConfigurationInput struct {
  8707. _ struct{} `type:"structure"`
  8708. // The name of the bucket containing the inventory configuration to retrieve.
  8709. //
  8710. // Bucket is a required field
  8711. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8712. // The ID used to identify the inventory configuration.
  8713. //
  8714. // Id is a required field
  8715. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8716. }
  8717. // String returns the string representation
  8718. func (s GetBucketInventoryConfigurationInput) String() string {
  8719. return awsutil.Prettify(s)
  8720. }
  8721. // GoString returns the string representation
  8722. func (s GetBucketInventoryConfigurationInput) GoString() string {
  8723. return s.String()
  8724. }
  8725. // Validate inspects the fields of the type to determine if they are valid.
  8726. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  8727. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  8728. if s.Bucket == nil {
  8729. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8730. }
  8731. if s.Id == nil {
  8732. invalidParams.Add(request.NewErrParamRequired("Id"))
  8733. }
  8734. if invalidParams.Len() > 0 {
  8735. return invalidParams
  8736. }
  8737. return nil
  8738. }
  8739. // SetBucket sets the Bucket field's value.
  8740. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  8741. s.Bucket = &v
  8742. return s
  8743. }
  8744. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  8745. if s.Bucket == nil {
  8746. return v
  8747. }
  8748. return *s.Bucket
  8749. }
  8750. // SetId sets the Id field's value.
  8751. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  8752. s.Id = &v
  8753. return s
  8754. }
  8755. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfigurationOutput
  8756. type GetBucketInventoryConfigurationOutput struct {
  8757. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  8758. // Specifies the inventory configuration.
  8759. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  8760. }
  8761. // String returns the string representation
  8762. func (s GetBucketInventoryConfigurationOutput) String() string {
  8763. return awsutil.Prettify(s)
  8764. }
  8765. // GoString returns the string representation
  8766. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  8767. return s.String()
  8768. }
  8769. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  8770. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  8771. s.InventoryConfiguration = v
  8772. return s
  8773. }
  8774. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationRequest
  8775. type GetBucketLifecycleConfigurationInput struct {
  8776. _ struct{} `type:"structure"`
  8777. // Bucket is a required field
  8778. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8779. }
  8780. // String returns the string representation
  8781. func (s GetBucketLifecycleConfigurationInput) String() string {
  8782. return awsutil.Prettify(s)
  8783. }
  8784. // GoString returns the string representation
  8785. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  8786. return s.String()
  8787. }
  8788. // Validate inspects the fields of the type to determine if they are valid.
  8789. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  8790. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  8791. if s.Bucket == nil {
  8792. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8793. }
  8794. if invalidParams.Len() > 0 {
  8795. return invalidParams
  8796. }
  8797. return nil
  8798. }
  8799. // SetBucket sets the Bucket field's value.
  8800. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  8801. s.Bucket = &v
  8802. return s
  8803. }
  8804. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  8805. if s.Bucket == nil {
  8806. return v
  8807. }
  8808. return *s.Bucket
  8809. }
  8810. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfigurationOutput
  8811. type GetBucketLifecycleConfigurationOutput struct {
  8812. _ struct{} `type:"structure"`
  8813. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  8814. }
  8815. // String returns the string representation
  8816. func (s GetBucketLifecycleConfigurationOutput) String() string {
  8817. return awsutil.Prettify(s)
  8818. }
  8819. // GoString returns the string representation
  8820. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  8821. return s.String()
  8822. }
  8823. // SetRules sets the Rules field's value.
  8824. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  8825. s.Rules = v
  8826. return s
  8827. }
  8828. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleRequest
  8829. type GetBucketLifecycleInput struct {
  8830. _ struct{} `type:"structure"`
  8831. // Bucket is a required field
  8832. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8833. }
  8834. // String returns the string representation
  8835. func (s GetBucketLifecycleInput) String() string {
  8836. return awsutil.Prettify(s)
  8837. }
  8838. // GoString returns the string representation
  8839. func (s GetBucketLifecycleInput) GoString() string {
  8840. return s.String()
  8841. }
  8842. // Validate inspects the fields of the type to determine if they are valid.
  8843. func (s *GetBucketLifecycleInput) Validate() error {
  8844. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  8845. if s.Bucket == nil {
  8846. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8847. }
  8848. if invalidParams.Len() > 0 {
  8849. return invalidParams
  8850. }
  8851. return nil
  8852. }
  8853. // SetBucket sets the Bucket field's value.
  8854. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  8855. s.Bucket = &v
  8856. return s
  8857. }
  8858. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  8859. if s.Bucket == nil {
  8860. return v
  8861. }
  8862. return *s.Bucket
  8863. }
  8864. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleOutput
  8865. type GetBucketLifecycleOutput struct {
  8866. _ struct{} `type:"structure"`
  8867. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  8868. }
  8869. // String returns the string representation
  8870. func (s GetBucketLifecycleOutput) String() string {
  8871. return awsutil.Prettify(s)
  8872. }
  8873. // GoString returns the string representation
  8874. func (s GetBucketLifecycleOutput) GoString() string {
  8875. return s.String()
  8876. }
  8877. // SetRules sets the Rules field's value.
  8878. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  8879. s.Rules = v
  8880. return s
  8881. }
  8882. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationRequest
  8883. type GetBucketLocationInput struct {
  8884. _ struct{} `type:"structure"`
  8885. // Bucket is a required field
  8886. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8887. }
  8888. // String returns the string representation
  8889. func (s GetBucketLocationInput) String() string {
  8890. return awsutil.Prettify(s)
  8891. }
  8892. // GoString returns the string representation
  8893. func (s GetBucketLocationInput) GoString() string {
  8894. return s.String()
  8895. }
  8896. // Validate inspects the fields of the type to determine if they are valid.
  8897. func (s *GetBucketLocationInput) Validate() error {
  8898. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  8899. if s.Bucket == nil {
  8900. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8901. }
  8902. if invalidParams.Len() > 0 {
  8903. return invalidParams
  8904. }
  8905. return nil
  8906. }
  8907. // SetBucket sets the Bucket field's value.
  8908. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  8909. s.Bucket = &v
  8910. return s
  8911. }
  8912. func (s *GetBucketLocationInput) getBucket() (v string) {
  8913. if s.Bucket == nil {
  8914. return v
  8915. }
  8916. return *s.Bucket
  8917. }
  8918. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocationOutput
  8919. type GetBucketLocationOutput struct {
  8920. _ struct{} `type:"structure"`
  8921. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  8922. }
  8923. // String returns the string representation
  8924. func (s GetBucketLocationOutput) String() string {
  8925. return awsutil.Prettify(s)
  8926. }
  8927. // GoString returns the string representation
  8928. func (s GetBucketLocationOutput) GoString() string {
  8929. return s.String()
  8930. }
  8931. // SetLocationConstraint sets the LocationConstraint field's value.
  8932. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  8933. s.LocationConstraint = &v
  8934. return s
  8935. }
  8936. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingRequest
  8937. type GetBucketLoggingInput struct {
  8938. _ struct{} `type:"structure"`
  8939. // Bucket is a required field
  8940. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8941. }
  8942. // String returns the string representation
  8943. func (s GetBucketLoggingInput) String() string {
  8944. return awsutil.Prettify(s)
  8945. }
  8946. // GoString returns the string representation
  8947. func (s GetBucketLoggingInput) GoString() string {
  8948. return s.String()
  8949. }
  8950. // Validate inspects the fields of the type to determine if they are valid.
  8951. func (s *GetBucketLoggingInput) Validate() error {
  8952. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  8953. if s.Bucket == nil {
  8954. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8955. }
  8956. if invalidParams.Len() > 0 {
  8957. return invalidParams
  8958. }
  8959. return nil
  8960. }
  8961. // SetBucket sets the Bucket field's value.
  8962. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  8963. s.Bucket = &v
  8964. return s
  8965. }
  8966. func (s *GetBucketLoggingInput) getBucket() (v string) {
  8967. if s.Bucket == nil {
  8968. return v
  8969. }
  8970. return *s.Bucket
  8971. }
  8972. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLoggingOutput
  8973. type GetBucketLoggingOutput struct {
  8974. _ struct{} `type:"structure"`
  8975. LoggingEnabled *LoggingEnabled `type:"structure"`
  8976. }
  8977. // String returns the string representation
  8978. func (s GetBucketLoggingOutput) String() string {
  8979. return awsutil.Prettify(s)
  8980. }
  8981. // GoString returns the string representation
  8982. func (s GetBucketLoggingOutput) GoString() string {
  8983. return s.String()
  8984. }
  8985. // SetLoggingEnabled sets the LoggingEnabled field's value.
  8986. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  8987. s.LoggingEnabled = v
  8988. return s
  8989. }
  8990. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationRequest
  8991. type GetBucketMetricsConfigurationInput struct {
  8992. _ struct{} `type:"structure"`
  8993. // The name of the bucket containing the metrics configuration to retrieve.
  8994. //
  8995. // Bucket is a required field
  8996. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8997. // The ID used to identify the metrics configuration.
  8998. //
  8999. // Id is a required field
  9000. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9001. }
  9002. // String returns the string representation
  9003. func (s GetBucketMetricsConfigurationInput) String() string {
  9004. return awsutil.Prettify(s)
  9005. }
  9006. // GoString returns the string representation
  9007. func (s GetBucketMetricsConfigurationInput) GoString() string {
  9008. return s.String()
  9009. }
  9010. // Validate inspects the fields of the type to determine if they are valid.
  9011. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  9012. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  9013. if s.Bucket == nil {
  9014. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9015. }
  9016. if s.Id == nil {
  9017. invalidParams.Add(request.NewErrParamRequired("Id"))
  9018. }
  9019. if invalidParams.Len() > 0 {
  9020. return invalidParams
  9021. }
  9022. return nil
  9023. }
  9024. // SetBucket sets the Bucket field's value.
  9025. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  9026. s.Bucket = &v
  9027. return s
  9028. }
  9029. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  9030. if s.Bucket == nil {
  9031. return v
  9032. }
  9033. return *s.Bucket
  9034. }
  9035. // SetId sets the Id field's value.
  9036. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  9037. s.Id = &v
  9038. return s
  9039. }
  9040. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfigurationOutput
  9041. type GetBucketMetricsConfigurationOutput struct {
  9042. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  9043. // Specifies the metrics configuration.
  9044. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  9045. }
  9046. // String returns the string representation
  9047. func (s GetBucketMetricsConfigurationOutput) String() string {
  9048. return awsutil.Prettify(s)
  9049. }
  9050. // GoString returns the string representation
  9051. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  9052. return s.String()
  9053. }
  9054. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  9055. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  9056. s.MetricsConfiguration = v
  9057. return s
  9058. }
  9059. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfigurationRequest
  9060. type GetBucketNotificationConfigurationRequest struct {
  9061. _ struct{} `type:"structure"`
  9062. // Name of the bucket to get the notification configuration for.
  9063. //
  9064. // Bucket is a required field
  9065. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9066. }
  9067. // String returns the string representation
  9068. func (s GetBucketNotificationConfigurationRequest) String() string {
  9069. return awsutil.Prettify(s)
  9070. }
  9071. // GoString returns the string representation
  9072. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  9073. return s.String()
  9074. }
  9075. // Validate inspects the fields of the type to determine if they are valid.
  9076. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  9077. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  9078. if s.Bucket == nil {
  9079. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9080. }
  9081. if invalidParams.Len() > 0 {
  9082. return invalidParams
  9083. }
  9084. return nil
  9085. }
  9086. // SetBucket sets the Bucket field's value.
  9087. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  9088. s.Bucket = &v
  9089. return s
  9090. }
  9091. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  9092. if s.Bucket == nil {
  9093. return v
  9094. }
  9095. return *s.Bucket
  9096. }
  9097. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyRequest
  9098. type GetBucketPolicyInput struct {
  9099. _ struct{} `type:"structure"`
  9100. // Bucket is a required field
  9101. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9102. }
  9103. // String returns the string representation
  9104. func (s GetBucketPolicyInput) String() string {
  9105. return awsutil.Prettify(s)
  9106. }
  9107. // GoString returns the string representation
  9108. func (s GetBucketPolicyInput) GoString() string {
  9109. return s.String()
  9110. }
  9111. // Validate inspects the fields of the type to determine if they are valid.
  9112. func (s *GetBucketPolicyInput) Validate() error {
  9113. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  9114. if s.Bucket == nil {
  9115. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9116. }
  9117. if invalidParams.Len() > 0 {
  9118. return invalidParams
  9119. }
  9120. return nil
  9121. }
  9122. // SetBucket sets the Bucket field's value.
  9123. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  9124. s.Bucket = &v
  9125. return s
  9126. }
  9127. func (s *GetBucketPolicyInput) getBucket() (v string) {
  9128. if s.Bucket == nil {
  9129. return v
  9130. }
  9131. return *s.Bucket
  9132. }
  9133. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyOutput
  9134. type GetBucketPolicyOutput struct {
  9135. _ struct{} `type:"structure" payload:"Policy"`
  9136. // The bucket policy as a JSON document.
  9137. Policy *string `type:"string"`
  9138. }
  9139. // String returns the string representation
  9140. func (s GetBucketPolicyOutput) String() string {
  9141. return awsutil.Prettify(s)
  9142. }
  9143. // GoString returns the string representation
  9144. func (s GetBucketPolicyOutput) GoString() string {
  9145. return s.String()
  9146. }
  9147. // SetPolicy sets the Policy field's value.
  9148. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  9149. s.Policy = &v
  9150. return s
  9151. }
  9152. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationRequest
  9153. type GetBucketReplicationInput struct {
  9154. _ struct{} `type:"structure"`
  9155. // Bucket is a required field
  9156. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9157. }
  9158. // String returns the string representation
  9159. func (s GetBucketReplicationInput) String() string {
  9160. return awsutil.Prettify(s)
  9161. }
  9162. // GoString returns the string representation
  9163. func (s GetBucketReplicationInput) GoString() string {
  9164. return s.String()
  9165. }
  9166. // Validate inspects the fields of the type to determine if they are valid.
  9167. func (s *GetBucketReplicationInput) Validate() error {
  9168. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  9169. if s.Bucket == nil {
  9170. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9171. }
  9172. if invalidParams.Len() > 0 {
  9173. return invalidParams
  9174. }
  9175. return nil
  9176. }
  9177. // SetBucket sets the Bucket field's value.
  9178. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  9179. s.Bucket = &v
  9180. return s
  9181. }
  9182. func (s *GetBucketReplicationInput) getBucket() (v string) {
  9183. if s.Bucket == nil {
  9184. return v
  9185. }
  9186. return *s.Bucket
  9187. }
  9188. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplicationOutput
  9189. type GetBucketReplicationOutput struct {
  9190. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  9191. // Container for replication rules. You can add as many as 1,000 rules. Total
  9192. // replication configuration size can be up to 2 MB.
  9193. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  9194. }
  9195. // String returns the string representation
  9196. func (s GetBucketReplicationOutput) String() string {
  9197. return awsutil.Prettify(s)
  9198. }
  9199. // GoString returns the string representation
  9200. func (s GetBucketReplicationOutput) GoString() string {
  9201. return s.String()
  9202. }
  9203. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  9204. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  9205. s.ReplicationConfiguration = v
  9206. return s
  9207. }
  9208. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentRequest
  9209. type GetBucketRequestPaymentInput struct {
  9210. _ struct{} `type:"structure"`
  9211. // Bucket is a required field
  9212. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9213. }
  9214. // String returns the string representation
  9215. func (s GetBucketRequestPaymentInput) String() string {
  9216. return awsutil.Prettify(s)
  9217. }
  9218. // GoString returns the string representation
  9219. func (s GetBucketRequestPaymentInput) GoString() string {
  9220. return s.String()
  9221. }
  9222. // Validate inspects the fields of the type to determine if they are valid.
  9223. func (s *GetBucketRequestPaymentInput) Validate() error {
  9224. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  9225. if s.Bucket == nil {
  9226. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9227. }
  9228. if invalidParams.Len() > 0 {
  9229. return invalidParams
  9230. }
  9231. return nil
  9232. }
  9233. // SetBucket sets the Bucket field's value.
  9234. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  9235. s.Bucket = &v
  9236. return s
  9237. }
  9238. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  9239. if s.Bucket == nil {
  9240. return v
  9241. }
  9242. return *s.Bucket
  9243. }
  9244. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPaymentOutput
  9245. type GetBucketRequestPaymentOutput struct {
  9246. _ struct{} `type:"structure"`
  9247. // Specifies who pays for the download and request fees.
  9248. Payer *string `type:"string" enum:"Payer"`
  9249. }
  9250. // String returns the string representation
  9251. func (s GetBucketRequestPaymentOutput) String() string {
  9252. return awsutil.Prettify(s)
  9253. }
  9254. // GoString returns the string representation
  9255. func (s GetBucketRequestPaymentOutput) GoString() string {
  9256. return s.String()
  9257. }
  9258. // SetPayer sets the Payer field's value.
  9259. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  9260. s.Payer = &v
  9261. return s
  9262. }
  9263. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingRequest
  9264. type GetBucketTaggingInput struct {
  9265. _ struct{} `type:"structure"`
  9266. // Bucket is a required field
  9267. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9268. }
  9269. // String returns the string representation
  9270. func (s GetBucketTaggingInput) String() string {
  9271. return awsutil.Prettify(s)
  9272. }
  9273. // GoString returns the string representation
  9274. func (s GetBucketTaggingInput) GoString() string {
  9275. return s.String()
  9276. }
  9277. // Validate inspects the fields of the type to determine if they are valid.
  9278. func (s *GetBucketTaggingInput) Validate() error {
  9279. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  9280. if s.Bucket == nil {
  9281. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9282. }
  9283. if invalidParams.Len() > 0 {
  9284. return invalidParams
  9285. }
  9286. return nil
  9287. }
  9288. // SetBucket sets the Bucket field's value.
  9289. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  9290. s.Bucket = &v
  9291. return s
  9292. }
  9293. func (s *GetBucketTaggingInput) getBucket() (v string) {
  9294. if s.Bucket == nil {
  9295. return v
  9296. }
  9297. return *s.Bucket
  9298. }
  9299. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTaggingOutput
  9300. type GetBucketTaggingOutput struct {
  9301. _ struct{} `type:"structure"`
  9302. // TagSet is a required field
  9303. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  9304. }
  9305. // String returns the string representation
  9306. func (s GetBucketTaggingOutput) String() string {
  9307. return awsutil.Prettify(s)
  9308. }
  9309. // GoString returns the string representation
  9310. func (s GetBucketTaggingOutput) GoString() string {
  9311. return s.String()
  9312. }
  9313. // SetTagSet sets the TagSet field's value.
  9314. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  9315. s.TagSet = v
  9316. return s
  9317. }
  9318. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningRequest
  9319. type GetBucketVersioningInput struct {
  9320. _ struct{} `type:"structure"`
  9321. // Bucket is a required field
  9322. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9323. }
  9324. // String returns the string representation
  9325. func (s GetBucketVersioningInput) String() string {
  9326. return awsutil.Prettify(s)
  9327. }
  9328. // GoString returns the string representation
  9329. func (s GetBucketVersioningInput) GoString() string {
  9330. return s.String()
  9331. }
  9332. // Validate inspects the fields of the type to determine if they are valid.
  9333. func (s *GetBucketVersioningInput) Validate() error {
  9334. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  9335. if s.Bucket == nil {
  9336. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9337. }
  9338. if invalidParams.Len() > 0 {
  9339. return invalidParams
  9340. }
  9341. return nil
  9342. }
  9343. // SetBucket sets the Bucket field's value.
  9344. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  9345. s.Bucket = &v
  9346. return s
  9347. }
  9348. func (s *GetBucketVersioningInput) getBucket() (v string) {
  9349. if s.Bucket == nil {
  9350. return v
  9351. }
  9352. return *s.Bucket
  9353. }
  9354. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioningOutput
  9355. type GetBucketVersioningOutput struct {
  9356. _ struct{} `type:"structure"`
  9357. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  9358. // This element is only returned if the bucket has been configured with MFA
  9359. // delete. If the bucket has never been so configured, this element is not returned.
  9360. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  9361. // The versioning state of the bucket.
  9362. Status *string `type:"string" enum:"BucketVersioningStatus"`
  9363. }
  9364. // String returns the string representation
  9365. func (s GetBucketVersioningOutput) String() string {
  9366. return awsutil.Prettify(s)
  9367. }
  9368. // GoString returns the string representation
  9369. func (s GetBucketVersioningOutput) GoString() string {
  9370. return s.String()
  9371. }
  9372. // SetMFADelete sets the MFADelete field's value.
  9373. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  9374. s.MFADelete = &v
  9375. return s
  9376. }
  9377. // SetStatus sets the Status field's value.
  9378. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  9379. s.Status = &v
  9380. return s
  9381. }
  9382. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteRequest
  9383. type GetBucketWebsiteInput struct {
  9384. _ struct{} `type:"structure"`
  9385. // Bucket is a required field
  9386. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9387. }
  9388. // String returns the string representation
  9389. func (s GetBucketWebsiteInput) String() string {
  9390. return awsutil.Prettify(s)
  9391. }
  9392. // GoString returns the string representation
  9393. func (s GetBucketWebsiteInput) GoString() string {
  9394. return s.String()
  9395. }
  9396. // Validate inspects the fields of the type to determine if they are valid.
  9397. func (s *GetBucketWebsiteInput) Validate() error {
  9398. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  9399. if s.Bucket == nil {
  9400. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9401. }
  9402. if invalidParams.Len() > 0 {
  9403. return invalidParams
  9404. }
  9405. return nil
  9406. }
  9407. // SetBucket sets the Bucket field's value.
  9408. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  9409. s.Bucket = &v
  9410. return s
  9411. }
  9412. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  9413. if s.Bucket == nil {
  9414. return v
  9415. }
  9416. return *s.Bucket
  9417. }
  9418. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsiteOutput
  9419. type GetBucketWebsiteOutput struct {
  9420. _ struct{} `type:"structure"`
  9421. ErrorDocument *ErrorDocument `type:"structure"`
  9422. IndexDocument *IndexDocument `type:"structure"`
  9423. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  9424. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  9425. }
  9426. // String returns the string representation
  9427. func (s GetBucketWebsiteOutput) String() string {
  9428. return awsutil.Prettify(s)
  9429. }
  9430. // GoString returns the string representation
  9431. func (s GetBucketWebsiteOutput) GoString() string {
  9432. return s.String()
  9433. }
  9434. // SetErrorDocument sets the ErrorDocument field's value.
  9435. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  9436. s.ErrorDocument = v
  9437. return s
  9438. }
  9439. // SetIndexDocument sets the IndexDocument field's value.
  9440. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  9441. s.IndexDocument = v
  9442. return s
  9443. }
  9444. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  9445. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  9446. s.RedirectAllRequestsTo = v
  9447. return s
  9448. }
  9449. // SetRoutingRules sets the RoutingRules field's value.
  9450. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  9451. s.RoutingRules = v
  9452. return s
  9453. }
  9454. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclRequest
  9455. type GetObjectAclInput struct {
  9456. _ struct{} `type:"structure"`
  9457. // Bucket is a required field
  9458. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9459. // Key is a required field
  9460. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9461. // Confirms that the requester knows that she or he will be charged for the
  9462. // request. Bucket owners need not specify this parameter in their requests.
  9463. // Documentation on downloading objects from requester pays buckets can be found
  9464. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9465. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9466. // VersionId used to reference a specific version of the object.
  9467. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9468. }
  9469. // String returns the string representation
  9470. func (s GetObjectAclInput) String() string {
  9471. return awsutil.Prettify(s)
  9472. }
  9473. // GoString returns the string representation
  9474. func (s GetObjectAclInput) GoString() string {
  9475. return s.String()
  9476. }
  9477. // Validate inspects the fields of the type to determine if they are valid.
  9478. func (s *GetObjectAclInput) Validate() error {
  9479. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  9480. if s.Bucket == nil {
  9481. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9482. }
  9483. if s.Key == nil {
  9484. invalidParams.Add(request.NewErrParamRequired("Key"))
  9485. }
  9486. if s.Key != nil && len(*s.Key) < 1 {
  9487. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9488. }
  9489. if invalidParams.Len() > 0 {
  9490. return invalidParams
  9491. }
  9492. return nil
  9493. }
  9494. // SetBucket sets the Bucket field's value.
  9495. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  9496. s.Bucket = &v
  9497. return s
  9498. }
  9499. func (s *GetObjectAclInput) getBucket() (v string) {
  9500. if s.Bucket == nil {
  9501. return v
  9502. }
  9503. return *s.Bucket
  9504. }
  9505. // SetKey sets the Key field's value.
  9506. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  9507. s.Key = &v
  9508. return s
  9509. }
  9510. // SetRequestPayer sets the RequestPayer field's value.
  9511. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  9512. s.RequestPayer = &v
  9513. return s
  9514. }
  9515. // SetVersionId sets the VersionId field's value.
  9516. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  9517. s.VersionId = &v
  9518. return s
  9519. }
  9520. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAclOutput
  9521. type GetObjectAclOutput struct {
  9522. _ struct{} `type:"structure"`
  9523. // A list of grants.
  9524. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  9525. Owner *Owner `type:"structure"`
  9526. // If present, indicates that the requester was successfully charged for the
  9527. // request.
  9528. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9529. }
  9530. // String returns the string representation
  9531. func (s GetObjectAclOutput) String() string {
  9532. return awsutil.Prettify(s)
  9533. }
  9534. // GoString returns the string representation
  9535. func (s GetObjectAclOutput) GoString() string {
  9536. return s.String()
  9537. }
  9538. // SetGrants sets the Grants field's value.
  9539. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  9540. s.Grants = v
  9541. return s
  9542. }
  9543. // SetOwner sets the Owner field's value.
  9544. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  9545. s.Owner = v
  9546. return s
  9547. }
  9548. // SetRequestCharged sets the RequestCharged field's value.
  9549. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  9550. s.RequestCharged = &v
  9551. return s
  9552. }
  9553. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRequest
  9554. type GetObjectInput struct {
  9555. _ struct{} `type:"structure"`
  9556. // Bucket is a required field
  9557. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9558. // Return the object only if its entity tag (ETag) is the same as the one specified,
  9559. // otherwise return a 412 (precondition failed).
  9560. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  9561. // Return the object only if it has been modified since the specified time,
  9562. // otherwise return a 304 (not modified).
  9563. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  9564. // Return the object only if its entity tag (ETag) is different from the one
  9565. // specified, otherwise return a 304 (not modified).
  9566. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  9567. // Return the object only if it has not been modified since the specified time,
  9568. // otherwise return a 412 (precondition failed).
  9569. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  9570. // Key is a required field
  9571. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9572. // Part number of the object being read. This is a positive integer between
  9573. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  9574. // Useful for downloading just a part of an object.
  9575. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  9576. // Downloads the specified range bytes of an object. For more information about
  9577. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  9578. Range *string `location:"header" locationName:"Range" type:"string"`
  9579. // Confirms that the requester knows that she or he will be charged for the
  9580. // request. Bucket owners need not specify this parameter in their requests.
  9581. // Documentation on downloading objects from requester pays buckets can be found
  9582. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9583. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9584. // Sets the Cache-Control header of the response.
  9585. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  9586. // Sets the Content-Disposition header of the response
  9587. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  9588. // Sets the Content-Encoding header of the response.
  9589. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  9590. // Sets the Content-Language header of the response.
  9591. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  9592. // Sets the Content-Type header of the response.
  9593. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  9594. // Sets the Expires header of the response.
  9595. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  9596. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  9597. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  9598. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  9599. // data. This value is used to store the object and then it is discarded; Amazon
  9600. // does not store the encryption key. The key must be appropriate for use with
  9601. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  9602. // header.
  9603. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  9604. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  9605. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  9606. // key was transmitted without error.
  9607. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  9608. // VersionId used to reference a specific version of the object.
  9609. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9610. }
  9611. // String returns the string representation
  9612. func (s GetObjectInput) String() string {
  9613. return awsutil.Prettify(s)
  9614. }
  9615. // GoString returns the string representation
  9616. func (s GetObjectInput) GoString() string {
  9617. return s.String()
  9618. }
  9619. // Validate inspects the fields of the type to determine if they are valid.
  9620. func (s *GetObjectInput) Validate() error {
  9621. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  9622. if s.Bucket == nil {
  9623. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9624. }
  9625. if s.Key == nil {
  9626. invalidParams.Add(request.NewErrParamRequired("Key"))
  9627. }
  9628. if s.Key != nil && len(*s.Key) < 1 {
  9629. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9630. }
  9631. if invalidParams.Len() > 0 {
  9632. return invalidParams
  9633. }
  9634. return nil
  9635. }
  9636. // SetBucket sets the Bucket field's value.
  9637. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  9638. s.Bucket = &v
  9639. return s
  9640. }
  9641. func (s *GetObjectInput) getBucket() (v string) {
  9642. if s.Bucket == nil {
  9643. return v
  9644. }
  9645. return *s.Bucket
  9646. }
  9647. // SetIfMatch sets the IfMatch field's value.
  9648. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  9649. s.IfMatch = &v
  9650. return s
  9651. }
  9652. // SetIfModifiedSince sets the IfModifiedSince field's value.
  9653. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  9654. s.IfModifiedSince = &v
  9655. return s
  9656. }
  9657. // SetIfNoneMatch sets the IfNoneMatch field's value.
  9658. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  9659. s.IfNoneMatch = &v
  9660. return s
  9661. }
  9662. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  9663. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  9664. s.IfUnmodifiedSince = &v
  9665. return s
  9666. }
  9667. // SetKey sets the Key field's value.
  9668. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  9669. s.Key = &v
  9670. return s
  9671. }
  9672. // SetPartNumber sets the PartNumber field's value.
  9673. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  9674. s.PartNumber = &v
  9675. return s
  9676. }
  9677. // SetRange sets the Range field's value.
  9678. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  9679. s.Range = &v
  9680. return s
  9681. }
  9682. // SetRequestPayer sets the RequestPayer field's value.
  9683. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  9684. s.RequestPayer = &v
  9685. return s
  9686. }
  9687. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  9688. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  9689. s.ResponseCacheControl = &v
  9690. return s
  9691. }
  9692. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  9693. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  9694. s.ResponseContentDisposition = &v
  9695. return s
  9696. }
  9697. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  9698. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  9699. s.ResponseContentEncoding = &v
  9700. return s
  9701. }
  9702. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  9703. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  9704. s.ResponseContentLanguage = &v
  9705. return s
  9706. }
  9707. // SetResponseContentType sets the ResponseContentType field's value.
  9708. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  9709. s.ResponseContentType = &v
  9710. return s
  9711. }
  9712. // SetResponseExpires sets the ResponseExpires field's value.
  9713. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  9714. s.ResponseExpires = &v
  9715. return s
  9716. }
  9717. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  9718. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  9719. s.SSECustomerAlgorithm = &v
  9720. return s
  9721. }
  9722. // SetSSECustomerKey sets the SSECustomerKey field's value.
  9723. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  9724. s.SSECustomerKey = &v
  9725. return s
  9726. }
  9727. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  9728. if s.SSECustomerKey == nil {
  9729. return v
  9730. }
  9731. return *s.SSECustomerKey
  9732. }
  9733. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  9734. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  9735. s.SSECustomerKeyMD5 = &v
  9736. return s
  9737. }
  9738. // SetVersionId sets the VersionId field's value.
  9739. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  9740. s.VersionId = &v
  9741. return s
  9742. }
  9743. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectOutput
  9744. type GetObjectOutput struct {
  9745. _ struct{} `type:"structure" payload:"Body"`
  9746. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  9747. // Object data.
  9748. Body io.ReadCloser `type:"blob"`
  9749. // Specifies caching behavior along the request/reply chain.
  9750. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  9751. // Specifies presentational information for the object.
  9752. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  9753. // Specifies what content encodings have been applied to the object and thus
  9754. // what decoding mechanisms must be applied to obtain the media-type referenced
  9755. // by the Content-Type header field.
  9756. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  9757. // The language the content is in.
  9758. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  9759. // Size of the body in bytes.
  9760. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  9761. // The portion of the object returned in the response.
  9762. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  9763. // A standard MIME type describing the format of the object data.
  9764. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  9765. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  9766. // Marker. If false, this response header does not appear in the response.
  9767. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  9768. // An ETag is an opaque identifier assigned by a web server to a specific version
  9769. // of a resource found at a URL
  9770. ETag *string `location:"header" locationName:"ETag" type:"string"`
  9771. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  9772. // includes this header. It includes the expiry-date and rule-id key value pairs
  9773. // providing object expiration information. The value of the rule-id is URL
  9774. // encoded.
  9775. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  9776. // The date and time at which the object is no longer cacheable.
  9777. Expires *string `location:"header" locationName:"Expires" type:"string"`
  9778. // Last modified date of the object
  9779. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  9780. // A map of metadata to store with the object in S3.
  9781. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  9782. // This is set to the number of metadata entries not returned in x-amz-meta
  9783. // headers. This can happen if you create metadata using an API like SOAP that
  9784. // supports more flexible metadata than the REST API. For example, using SOAP,
  9785. // you can create metadata whose values are not legal HTTP headers.
  9786. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  9787. // The count of parts this object has.
  9788. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  9789. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  9790. // If present, indicates that the requester was successfully charged for the
  9791. // request.
  9792. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9793. // Provides information about object restoration operation and expiration time
  9794. // of the restored object copy.
  9795. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  9796. // If server-side encryption with a customer-provided encryption key was requested,
  9797. // the response will include this header confirming the encryption algorithm
  9798. // used.
  9799. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  9800. // If server-side encryption with a customer-provided encryption key was requested,
  9801. // the response will include this header to provide round trip message integrity
  9802. // verification of the customer-provided encryption key.
  9803. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  9804. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  9805. // encryption key that was used for the object.
  9806. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  9807. // The Server-side encryption algorithm used when storing this object in S3
  9808. // (e.g., AES256, aws:kms).
  9809. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  9810. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  9811. // The number of tags, if any, on the object.
  9812. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  9813. // Version of the object.
  9814. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  9815. // If the bucket is configured as a website, redirects requests for this object
  9816. // to another object in the same bucket or to an external URL. Amazon S3 stores
  9817. // the value of this header in the object metadata.
  9818. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  9819. }
  9820. // String returns the string representation
  9821. func (s GetObjectOutput) String() string {
  9822. return awsutil.Prettify(s)
  9823. }
  9824. // GoString returns the string representation
  9825. func (s GetObjectOutput) GoString() string {
  9826. return s.String()
  9827. }
  9828. // SetAcceptRanges sets the AcceptRanges field's value.
  9829. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  9830. s.AcceptRanges = &v
  9831. return s
  9832. }
  9833. // SetBody sets the Body field's value.
  9834. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  9835. s.Body = v
  9836. return s
  9837. }
  9838. // SetCacheControl sets the CacheControl field's value.
  9839. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  9840. s.CacheControl = &v
  9841. return s
  9842. }
  9843. // SetContentDisposition sets the ContentDisposition field's value.
  9844. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  9845. s.ContentDisposition = &v
  9846. return s
  9847. }
  9848. // SetContentEncoding sets the ContentEncoding field's value.
  9849. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  9850. s.ContentEncoding = &v
  9851. return s
  9852. }
  9853. // SetContentLanguage sets the ContentLanguage field's value.
  9854. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  9855. s.ContentLanguage = &v
  9856. return s
  9857. }
  9858. // SetContentLength sets the ContentLength field's value.
  9859. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  9860. s.ContentLength = &v
  9861. return s
  9862. }
  9863. // SetContentRange sets the ContentRange field's value.
  9864. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  9865. s.ContentRange = &v
  9866. return s
  9867. }
  9868. // SetContentType sets the ContentType field's value.
  9869. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  9870. s.ContentType = &v
  9871. return s
  9872. }
  9873. // SetDeleteMarker sets the DeleteMarker field's value.
  9874. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  9875. s.DeleteMarker = &v
  9876. return s
  9877. }
  9878. // SetETag sets the ETag field's value.
  9879. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  9880. s.ETag = &v
  9881. return s
  9882. }
  9883. // SetExpiration sets the Expiration field's value.
  9884. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  9885. s.Expiration = &v
  9886. return s
  9887. }
  9888. // SetExpires sets the Expires field's value.
  9889. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  9890. s.Expires = &v
  9891. return s
  9892. }
  9893. // SetLastModified sets the LastModified field's value.
  9894. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  9895. s.LastModified = &v
  9896. return s
  9897. }
  9898. // SetMetadata sets the Metadata field's value.
  9899. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  9900. s.Metadata = v
  9901. return s
  9902. }
  9903. // SetMissingMeta sets the MissingMeta field's value.
  9904. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  9905. s.MissingMeta = &v
  9906. return s
  9907. }
  9908. // SetPartsCount sets the PartsCount field's value.
  9909. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  9910. s.PartsCount = &v
  9911. return s
  9912. }
  9913. // SetReplicationStatus sets the ReplicationStatus field's value.
  9914. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  9915. s.ReplicationStatus = &v
  9916. return s
  9917. }
  9918. // SetRequestCharged sets the RequestCharged field's value.
  9919. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  9920. s.RequestCharged = &v
  9921. return s
  9922. }
  9923. // SetRestore sets the Restore field's value.
  9924. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  9925. s.Restore = &v
  9926. return s
  9927. }
  9928. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  9929. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  9930. s.SSECustomerAlgorithm = &v
  9931. return s
  9932. }
  9933. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  9934. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  9935. s.SSECustomerKeyMD5 = &v
  9936. return s
  9937. }
  9938. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  9939. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  9940. s.SSEKMSKeyId = &v
  9941. return s
  9942. }
  9943. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  9944. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  9945. s.ServerSideEncryption = &v
  9946. return s
  9947. }
  9948. // SetStorageClass sets the StorageClass field's value.
  9949. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  9950. s.StorageClass = &v
  9951. return s
  9952. }
  9953. // SetTagCount sets the TagCount field's value.
  9954. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  9955. s.TagCount = &v
  9956. return s
  9957. }
  9958. // SetVersionId sets the VersionId field's value.
  9959. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  9960. s.VersionId = &v
  9961. return s
  9962. }
  9963. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  9964. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  9965. s.WebsiteRedirectLocation = &v
  9966. return s
  9967. }
  9968. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest
  9969. type GetObjectTaggingInput struct {
  9970. _ struct{} `type:"structure"`
  9971. // Bucket is a required field
  9972. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9973. // Key is a required field
  9974. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9975. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9976. }
  9977. // String returns the string representation
  9978. func (s GetObjectTaggingInput) String() string {
  9979. return awsutil.Prettify(s)
  9980. }
  9981. // GoString returns the string representation
  9982. func (s GetObjectTaggingInput) GoString() string {
  9983. return s.String()
  9984. }
  9985. // Validate inspects the fields of the type to determine if they are valid.
  9986. func (s *GetObjectTaggingInput) Validate() error {
  9987. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  9988. if s.Bucket == nil {
  9989. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9990. }
  9991. if s.Key == nil {
  9992. invalidParams.Add(request.NewErrParamRequired("Key"))
  9993. }
  9994. if s.Key != nil && len(*s.Key) < 1 {
  9995. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  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 *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  10004. s.Bucket = &v
  10005. return s
  10006. }
  10007. func (s *GetObjectTaggingInput) getBucket() (v string) {
  10008. if s.Bucket == nil {
  10009. return v
  10010. }
  10011. return *s.Bucket
  10012. }
  10013. // SetKey sets the Key field's value.
  10014. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  10015. s.Key = &v
  10016. return s
  10017. }
  10018. // SetVersionId sets the VersionId field's value.
  10019. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  10020. s.VersionId = &v
  10021. return s
  10022. }
  10023. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingOutput
  10024. type GetObjectTaggingOutput struct {
  10025. _ struct{} `type:"structure"`
  10026. // TagSet is a required field
  10027. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10028. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10029. }
  10030. // String returns the string representation
  10031. func (s GetObjectTaggingOutput) String() string {
  10032. return awsutil.Prettify(s)
  10033. }
  10034. // GoString returns the string representation
  10035. func (s GetObjectTaggingOutput) GoString() string {
  10036. return s.String()
  10037. }
  10038. // SetTagSet sets the TagSet field's value.
  10039. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  10040. s.TagSet = v
  10041. return s
  10042. }
  10043. // SetVersionId sets the VersionId field's value.
  10044. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  10045. s.VersionId = &v
  10046. return s
  10047. }
  10048. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentRequest
  10049. type GetObjectTorrentInput struct {
  10050. _ struct{} `type:"structure"`
  10051. // Bucket is a required field
  10052. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10053. // Key is a required field
  10054. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10055. // Confirms that the requester knows that she or he will be charged for the
  10056. // request. Bucket owners need not specify this parameter in their requests.
  10057. // Documentation on downloading objects from requester pays buckets can be found
  10058. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10059. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10060. }
  10061. // String returns the string representation
  10062. func (s GetObjectTorrentInput) String() string {
  10063. return awsutil.Prettify(s)
  10064. }
  10065. // GoString returns the string representation
  10066. func (s GetObjectTorrentInput) GoString() string {
  10067. return s.String()
  10068. }
  10069. // Validate inspects the fields of the type to determine if they are valid.
  10070. func (s *GetObjectTorrentInput) Validate() error {
  10071. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  10072. if s.Bucket == nil {
  10073. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10074. }
  10075. if s.Key == nil {
  10076. invalidParams.Add(request.NewErrParamRequired("Key"))
  10077. }
  10078. if s.Key != nil && len(*s.Key) < 1 {
  10079. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10080. }
  10081. if invalidParams.Len() > 0 {
  10082. return invalidParams
  10083. }
  10084. return nil
  10085. }
  10086. // SetBucket sets the Bucket field's value.
  10087. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  10088. s.Bucket = &v
  10089. return s
  10090. }
  10091. func (s *GetObjectTorrentInput) getBucket() (v string) {
  10092. if s.Bucket == nil {
  10093. return v
  10094. }
  10095. return *s.Bucket
  10096. }
  10097. // SetKey sets the Key field's value.
  10098. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  10099. s.Key = &v
  10100. return s
  10101. }
  10102. // SetRequestPayer sets the RequestPayer field's value.
  10103. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  10104. s.RequestPayer = &v
  10105. return s
  10106. }
  10107. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrentOutput
  10108. type GetObjectTorrentOutput struct {
  10109. _ struct{} `type:"structure" payload:"Body"`
  10110. Body io.ReadCloser `type:"blob"`
  10111. // If present, indicates that the requester was successfully charged for the
  10112. // request.
  10113. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10114. }
  10115. // String returns the string representation
  10116. func (s GetObjectTorrentOutput) String() string {
  10117. return awsutil.Prettify(s)
  10118. }
  10119. // GoString returns the string representation
  10120. func (s GetObjectTorrentOutput) GoString() string {
  10121. return s.String()
  10122. }
  10123. // SetBody sets the Body field's value.
  10124. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  10125. s.Body = v
  10126. return s
  10127. }
  10128. // SetRequestCharged sets the RequestCharged field's value.
  10129. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  10130. s.RequestCharged = &v
  10131. return s
  10132. }
  10133. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GlacierJobParameters
  10134. type GlacierJobParameters struct {
  10135. _ struct{} `type:"structure"`
  10136. // Glacier retrieval tier at which the restore will be processed.
  10137. //
  10138. // Tier is a required field
  10139. Tier *string `type:"string" required:"true" enum:"Tier"`
  10140. }
  10141. // String returns the string representation
  10142. func (s GlacierJobParameters) String() string {
  10143. return awsutil.Prettify(s)
  10144. }
  10145. // GoString returns the string representation
  10146. func (s GlacierJobParameters) GoString() string {
  10147. return s.String()
  10148. }
  10149. // Validate inspects the fields of the type to determine if they are valid.
  10150. func (s *GlacierJobParameters) Validate() error {
  10151. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  10152. if s.Tier == nil {
  10153. invalidParams.Add(request.NewErrParamRequired("Tier"))
  10154. }
  10155. if invalidParams.Len() > 0 {
  10156. return invalidParams
  10157. }
  10158. return nil
  10159. }
  10160. // SetTier sets the Tier field's value.
  10161. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  10162. s.Tier = &v
  10163. return s
  10164. }
  10165. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grant
  10166. type Grant struct {
  10167. _ struct{} `type:"structure"`
  10168. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10169. // Specifies the permission given to the grantee.
  10170. Permission *string `type:"string" enum:"Permission"`
  10171. }
  10172. // String returns the string representation
  10173. func (s Grant) String() string {
  10174. return awsutil.Prettify(s)
  10175. }
  10176. // GoString returns the string representation
  10177. func (s Grant) GoString() string {
  10178. return s.String()
  10179. }
  10180. // Validate inspects the fields of the type to determine if they are valid.
  10181. func (s *Grant) Validate() error {
  10182. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  10183. if s.Grantee != nil {
  10184. if err := s.Grantee.Validate(); err != nil {
  10185. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  10186. }
  10187. }
  10188. if invalidParams.Len() > 0 {
  10189. return invalidParams
  10190. }
  10191. return nil
  10192. }
  10193. // SetGrantee sets the Grantee field's value.
  10194. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  10195. s.Grantee = v
  10196. return s
  10197. }
  10198. // SetPermission sets the Permission field's value.
  10199. func (s *Grant) SetPermission(v string) *Grant {
  10200. s.Permission = &v
  10201. return s
  10202. }
  10203. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Grantee
  10204. type Grantee struct {
  10205. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10206. // Screen name of the grantee.
  10207. DisplayName *string `type:"string"`
  10208. // Email address of the grantee.
  10209. EmailAddress *string `type:"string"`
  10210. // The canonical user ID of the grantee.
  10211. ID *string `type:"string"`
  10212. // Type of grantee
  10213. //
  10214. // Type is a required field
  10215. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  10216. // URI of the grantee group.
  10217. URI *string `type:"string"`
  10218. }
  10219. // String returns the string representation
  10220. func (s Grantee) String() string {
  10221. return awsutil.Prettify(s)
  10222. }
  10223. // GoString returns the string representation
  10224. func (s Grantee) GoString() string {
  10225. return s.String()
  10226. }
  10227. // Validate inspects the fields of the type to determine if they are valid.
  10228. func (s *Grantee) Validate() error {
  10229. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  10230. if s.Type == nil {
  10231. invalidParams.Add(request.NewErrParamRequired("Type"))
  10232. }
  10233. if invalidParams.Len() > 0 {
  10234. return invalidParams
  10235. }
  10236. return nil
  10237. }
  10238. // SetDisplayName sets the DisplayName field's value.
  10239. func (s *Grantee) SetDisplayName(v string) *Grantee {
  10240. s.DisplayName = &v
  10241. return s
  10242. }
  10243. // SetEmailAddress sets the EmailAddress field's value.
  10244. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  10245. s.EmailAddress = &v
  10246. return s
  10247. }
  10248. // SetID sets the ID field's value.
  10249. func (s *Grantee) SetID(v string) *Grantee {
  10250. s.ID = &v
  10251. return s
  10252. }
  10253. // SetType sets the Type field's value.
  10254. func (s *Grantee) SetType(v string) *Grantee {
  10255. s.Type = &v
  10256. return s
  10257. }
  10258. // SetURI sets the URI field's value.
  10259. func (s *Grantee) SetURI(v string) *Grantee {
  10260. s.URI = &v
  10261. return s
  10262. }
  10263. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketRequest
  10264. type HeadBucketInput struct {
  10265. _ struct{} `type:"structure"`
  10266. // Bucket is a required field
  10267. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10268. }
  10269. // String returns the string representation
  10270. func (s HeadBucketInput) String() string {
  10271. return awsutil.Prettify(s)
  10272. }
  10273. // GoString returns the string representation
  10274. func (s HeadBucketInput) GoString() string {
  10275. return s.String()
  10276. }
  10277. // Validate inspects the fields of the type to determine if they are valid.
  10278. func (s *HeadBucketInput) Validate() error {
  10279. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  10280. if s.Bucket == nil {
  10281. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10282. }
  10283. if invalidParams.Len() > 0 {
  10284. return invalidParams
  10285. }
  10286. return nil
  10287. }
  10288. // SetBucket sets the Bucket field's value.
  10289. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  10290. s.Bucket = &v
  10291. return s
  10292. }
  10293. func (s *HeadBucketInput) getBucket() (v string) {
  10294. if s.Bucket == nil {
  10295. return v
  10296. }
  10297. return *s.Bucket
  10298. }
  10299. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucketOutput
  10300. type HeadBucketOutput struct {
  10301. _ struct{} `type:"structure"`
  10302. }
  10303. // String returns the string representation
  10304. func (s HeadBucketOutput) String() string {
  10305. return awsutil.Prettify(s)
  10306. }
  10307. // GoString returns the string representation
  10308. func (s HeadBucketOutput) GoString() string {
  10309. return s.String()
  10310. }
  10311. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectRequest
  10312. type HeadObjectInput struct {
  10313. _ struct{} `type:"structure"`
  10314. // Bucket is a required field
  10315. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10316. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10317. // otherwise return a 412 (precondition failed).
  10318. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10319. // Return the object only if it has been modified since the specified time,
  10320. // otherwise return a 304 (not modified).
  10321. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10322. // Return the object only if its entity tag (ETag) is different from the one
  10323. // specified, otherwise return a 304 (not modified).
  10324. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10325. // Return the object only if it has not been modified since the specified time,
  10326. // otherwise return a 412 (precondition failed).
  10327. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10328. // Key is a required field
  10329. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10330. // Part number of the object being read. This is a positive integer between
  10331. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  10332. // Useful querying about the size of the part and the number of parts in this
  10333. // object.
  10334. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10335. // Downloads the specified range bytes of an object. For more information about
  10336. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10337. Range *string `location:"header" locationName:"Range" type:"string"`
  10338. // Confirms that the requester knows that she or he will be charged for the
  10339. // request. Bucket owners need not specify this parameter in their requests.
  10340. // Documentation on downloading objects from requester pays buckets can be found
  10341. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10342. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10343. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10344. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10345. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10346. // data. This value is used to store the object and then it is discarded; Amazon
  10347. // does not store the encryption key. The key must be appropriate for use with
  10348. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10349. // header.
  10350. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10351. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10352. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10353. // key was transmitted without error.
  10354. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10355. // VersionId used to reference a specific version of the object.
  10356. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10357. }
  10358. // String returns the string representation
  10359. func (s HeadObjectInput) String() string {
  10360. return awsutil.Prettify(s)
  10361. }
  10362. // GoString returns the string representation
  10363. func (s HeadObjectInput) GoString() string {
  10364. return s.String()
  10365. }
  10366. // Validate inspects the fields of the type to determine if they are valid.
  10367. func (s *HeadObjectInput) Validate() error {
  10368. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  10369. if s.Bucket == nil {
  10370. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10371. }
  10372. if s.Key == nil {
  10373. invalidParams.Add(request.NewErrParamRequired("Key"))
  10374. }
  10375. if s.Key != nil && len(*s.Key) < 1 {
  10376. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10377. }
  10378. if invalidParams.Len() > 0 {
  10379. return invalidParams
  10380. }
  10381. return nil
  10382. }
  10383. // SetBucket sets the Bucket field's value.
  10384. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  10385. s.Bucket = &v
  10386. return s
  10387. }
  10388. func (s *HeadObjectInput) getBucket() (v string) {
  10389. if s.Bucket == nil {
  10390. return v
  10391. }
  10392. return *s.Bucket
  10393. }
  10394. // SetIfMatch sets the IfMatch field's value.
  10395. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  10396. s.IfMatch = &v
  10397. return s
  10398. }
  10399. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10400. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  10401. s.IfModifiedSince = &v
  10402. return s
  10403. }
  10404. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10405. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  10406. s.IfNoneMatch = &v
  10407. return s
  10408. }
  10409. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10410. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  10411. s.IfUnmodifiedSince = &v
  10412. return s
  10413. }
  10414. // SetKey sets the Key field's value.
  10415. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  10416. s.Key = &v
  10417. return s
  10418. }
  10419. // SetPartNumber sets the PartNumber field's value.
  10420. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  10421. s.PartNumber = &v
  10422. return s
  10423. }
  10424. // SetRange sets the Range field's value.
  10425. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  10426. s.Range = &v
  10427. return s
  10428. }
  10429. // SetRequestPayer sets the RequestPayer field's value.
  10430. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  10431. s.RequestPayer = &v
  10432. return s
  10433. }
  10434. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10435. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  10436. s.SSECustomerAlgorithm = &v
  10437. return s
  10438. }
  10439. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10440. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  10441. s.SSECustomerKey = &v
  10442. return s
  10443. }
  10444. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  10445. if s.SSECustomerKey == nil {
  10446. return v
  10447. }
  10448. return *s.SSECustomerKey
  10449. }
  10450. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10451. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  10452. s.SSECustomerKeyMD5 = &v
  10453. return s
  10454. }
  10455. // SetVersionId sets the VersionId field's value.
  10456. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  10457. s.VersionId = &v
  10458. return s
  10459. }
  10460. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObjectOutput
  10461. type HeadObjectOutput struct {
  10462. _ struct{} `type:"structure"`
  10463. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10464. // Specifies caching behavior along the request/reply chain.
  10465. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10466. // Specifies presentational information for the object.
  10467. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10468. // Specifies what content encodings have been applied to the object and thus
  10469. // what decoding mechanisms must be applied to obtain the media-type referenced
  10470. // by the Content-Type header field.
  10471. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10472. // The language the content is in.
  10473. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10474. // Size of the body in bytes.
  10475. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10476. // A standard MIME type describing the format of the object data.
  10477. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10478. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10479. // Marker. If false, this response header does not appear in the response.
  10480. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10481. // An ETag is an opaque identifier assigned by a web server to a specific version
  10482. // of a resource found at a URL
  10483. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10484. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10485. // includes this header. It includes the expiry-date and rule-id key value pairs
  10486. // providing object expiration information. The value of the rule-id is URL
  10487. // encoded.
  10488. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10489. // The date and time at which the object is no longer cacheable.
  10490. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10491. // Last modified date of the object
  10492. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  10493. // A map of metadata to store with the object in S3.
  10494. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10495. // This is set to the number of metadata entries not returned in x-amz-meta
  10496. // headers. This can happen if you create metadata using an API like SOAP that
  10497. // supports more flexible metadata than the REST API. For example, using SOAP,
  10498. // you can create metadata whose values are not legal HTTP headers.
  10499. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10500. // The count of parts this object has.
  10501. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10502. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10503. // If present, indicates that the requester was successfully charged for the
  10504. // request.
  10505. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10506. // Provides information about object restoration operation and expiration time
  10507. // of the restored object copy.
  10508. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  10509. // If server-side encryption with a customer-provided encryption key was requested,
  10510. // the response will include this header confirming the encryption algorithm
  10511. // used.
  10512. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10513. // If server-side encryption with a customer-provided encryption key was requested,
  10514. // the response will include this header to provide round trip message integrity
  10515. // verification of the customer-provided encryption key.
  10516. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10517. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10518. // encryption key that was used for the object.
  10519. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10520. // The Server-side encryption algorithm used when storing this object in S3
  10521. // (e.g., AES256, aws:kms).
  10522. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10523. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10524. // Version of the object.
  10525. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10526. // If the bucket is configured as a website, redirects requests for this object
  10527. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10528. // the value of this header in the object metadata.
  10529. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10530. }
  10531. // String returns the string representation
  10532. func (s HeadObjectOutput) String() string {
  10533. return awsutil.Prettify(s)
  10534. }
  10535. // GoString returns the string representation
  10536. func (s HeadObjectOutput) GoString() string {
  10537. return s.String()
  10538. }
  10539. // SetAcceptRanges sets the AcceptRanges field's value.
  10540. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  10541. s.AcceptRanges = &v
  10542. return s
  10543. }
  10544. // SetCacheControl sets the CacheControl field's value.
  10545. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  10546. s.CacheControl = &v
  10547. return s
  10548. }
  10549. // SetContentDisposition sets the ContentDisposition field's value.
  10550. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  10551. s.ContentDisposition = &v
  10552. return s
  10553. }
  10554. // SetContentEncoding sets the ContentEncoding field's value.
  10555. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  10556. s.ContentEncoding = &v
  10557. return s
  10558. }
  10559. // SetContentLanguage sets the ContentLanguage field's value.
  10560. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  10561. s.ContentLanguage = &v
  10562. return s
  10563. }
  10564. // SetContentLength sets the ContentLength field's value.
  10565. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  10566. s.ContentLength = &v
  10567. return s
  10568. }
  10569. // SetContentType sets the ContentType field's value.
  10570. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  10571. s.ContentType = &v
  10572. return s
  10573. }
  10574. // SetDeleteMarker sets the DeleteMarker field's value.
  10575. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  10576. s.DeleteMarker = &v
  10577. return s
  10578. }
  10579. // SetETag sets the ETag field's value.
  10580. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  10581. s.ETag = &v
  10582. return s
  10583. }
  10584. // SetExpiration sets the Expiration field's value.
  10585. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  10586. s.Expiration = &v
  10587. return s
  10588. }
  10589. // SetExpires sets the Expires field's value.
  10590. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  10591. s.Expires = &v
  10592. return s
  10593. }
  10594. // SetLastModified sets the LastModified field's value.
  10595. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  10596. s.LastModified = &v
  10597. return s
  10598. }
  10599. // SetMetadata sets the Metadata field's value.
  10600. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  10601. s.Metadata = v
  10602. return s
  10603. }
  10604. // SetMissingMeta sets the MissingMeta field's value.
  10605. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  10606. s.MissingMeta = &v
  10607. return s
  10608. }
  10609. // SetPartsCount sets the PartsCount field's value.
  10610. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  10611. s.PartsCount = &v
  10612. return s
  10613. }
  10614. // SetReplicationStatus sets the ReplicationStatus field's value.
  10615. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  10616. s.ReplicationStatus = &v
  10617. return s
  10618. }
  10619. // SetRequestCharged sets the RequestCharged field's value.
  10620. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  10621. s.RequestCharged = &v
  10622. return s
  10623. }
  10624. // SetRestore sets the Restore field's value.
  10625. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  10626. s.Restore = &v
  10627. return s
  10628. }
  10629. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10630. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  10631. s.SSECustomerAlgorithm = &v
  10632. return s
  10633. }
  10634. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10635. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  10636. s.SSECustomerKeyMD5 = &v
  10637. return s
  10638. }
  10639. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10640. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  10641. s.SSEKMSKeyId = &v
  10642. return s
  10643. }
  10644. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10645. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  10646. s.ServerSideEncryption = &v
  10647. return s
  10648. }
  10649. // SetStorageClass sets the StorageClass field's value.
  10650. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  10651. s.StorageClass = &v
  10652. return s
  10653. }
  10654. // SetVersionId sets the VersionId field's value.
  10655. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  10656. s.VersionId = &v
  10657. return s
  10658. }
  10659. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  10660. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  10661. s.WebsiteRedirectLocation = &v
  10662. return s
  10663. }
  10664. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument
  10665. type IndexDocument struct {
  10666. _ struct{} `type:"structure"`
  10667. // A suffix that is appended to a request that is for a directory on the website
  10668. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  10669. // the data that is returned will be for the object with the key name images/index.html)
  10670. // The suffix must not be empty and must not include a slash character.
  10671. //
  10672. // Suffix is a required field
  10673. Suffix *string `type:"string" required:"true"`
  10674. }
  10675. // String returns the string representation
  10676. func (s IndexDocument) String() string {
  10677. return awsutil.Prettify(s)
  10678. }
  10679. // GoString returns the string representation
  10680. func (s IndexDocument) GoString() string {
  10681. return s.String()
  10682. }
  10683. // Validate inspects the fields of the type to determine if they are valid.
  10684. func (s *IndexDocument) Validate() error {
  10685. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  10686. if s.Suffix == nil {
  10687. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  10688. }
  10689. if invalidParams.Len() > 0 {
  10690. return invalidParams
  10691. }
  10692. return nil
  10693. }
  10694. // SetSuffix sets the Suffix field's value.
  10695. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  10696. s.Suffix = &v
  10697. return s
  10698. }
  10699. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Initiator
  10700. type Initiator struct {
  10701. _ struct{} `type:"structure"`
  10702. // Name of the Principal.
  10703. DisplayName *string `type:"string"`
  10704. // If the principal is an AWS account, it provides the Canonical User ID. If
  10705. // the principal is an IAM User, it provides a user ARN value.
  10706. ID *string `type:"string"`
  10707. }
  10708. // String returns the string representation
  10709. func (s Initiator) String() string {
  10710. return awsutil.Prettify(s)
  10711. }
  10712. // GoString returns the string representation
  10713. func (s Initiator) GoString() string {
  10714. return s.String()
  10715. }
  10716. // SetDisplayName sets the DisplayName field's value.
  10717. func (s *Initiator) SetDisplayName(v string) *Initiator {
  10718. s.DisplayName = &v
  10719. return s
  10720. }
  10721. // SetID sets the ID field's value.
  10722. func (s *Initiator) SetID(v string) *Initiator {
  10723. s.ID = &v
  10724. return s
  10725. }
  10726. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryConfiguration
  10727. type InventoryConfiguration struct {
  10728. _ struct{} `type:"structure"`
  10729. // Contains information about where to publish the inventory results.
  10730. //
  10731. // Destination is a required field
  10732. Destination *InventoryDestination `type:"structure" required:"true"`
  10733. // Specifies an inventory filter. The inventory only includes objects that meet
  10734. // the filter's criteria.
  10735. Filter *InventoryFilter `type:"structure"`
  10736. // The ID used to identify the inventory configuration.
  10737. //
  10738. // Id is a required field
  10739. Id *string `type:"string" required:"true"`
  10740. // Specifies which object version(s) to included in the inventory results.
  10741. //
  10742. // IncludedObjectVersions is a required field
  10743. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  10744. // Specifies whether the inventory is enabled or disabled.
  10745. //
  10746. // IsEnabled is a required field
  10747. IsEnabled *bool `type:"boolean" required:"true"`
  10748. // Contains the optional fields that are included in the inventory results.
  10749. OptionalFields []*string `locationNameList:"Field" type:"list"`
  10750. // Specifies the schedule for generating inventory results.
  10751. //
  10752. // Schedule is a required field
  10753. Schedule *InventorySchedule `type:"structure" required:"true"`
  10754. }
  10755. // String returns the string representation
  10756. func (s InventoryConfiguration) String() string {
  10757. return awsutil.Prettify(s)
  10758. }
  10759. // GoString returns the string representation
  10760. func (s InventoryConfiguration) GoString() string {
  10761. return s.String()
  10762. }
  10763. // Validate inspects the fields of the type to determine if they are valid.
  10764. func (s *InventoryConfiguration) Validate() error {
  10765. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  10766. if s.Destination == nil {
  10767. invalidParams.Add(request.NewErrParamRequired("Destination"))
  10768. }
  10769. if s.Id == nil {
  10770. invalidParams.Add(request.NewErrParamRequired("Id"))
  10771. }
  10772. if s.IncludedObjectVersions == nil {
  10773. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  10774. }
  10775. if s.IsEnabled == nil {
  10776. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  10777. }
  10778. if s.Schedule == nil {
  10779. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  10780. }
  10781. if s.Destination != nil {
  10782. if err := s.Destination.Validate(); err != nil {
  10783. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  10784. }
  10785. }
  10786. if s.Filter != nil {
  10787. if err := s.Filter.Validate(); err != nil {
  10788. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  10789. }
  10790. }
  10791. if s.Schedule != nil {
  10792. if err := s.Schedule.Validate(); err != nil {
  10793. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  10794. }
  10795. }
  10796. if invalidParams.Len() > 0 {
  10797. return invalidParams
  10798. }
  10799. return nil
  10800. }
  10801. // SetDestination sets the Destination field's value.
  10802. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  10803. s.Destination = v
  10804. return s
  10805. }
  10806. // SetFilter sets the Filter field's value.
  10807. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  10808. s.Filter = v
  10809. return s
  10810. }
  10811. // SetId sets the Id field's value.
  10812. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  10813. s.Id = &v
  10814. return s
  10815. }
  10816. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  10817. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  10818. s.IncludedObjectVersions = &v
  10819. return s
  10820. }
  10821. // SetIsEnabled sets the IsEnabled field's value.
  10822. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  10823. s.IsEnabled = &v
  10824. return s
  10825. }
  10826. // SetOptionalFields sets the OptionalFields field's value.
  10827. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  10828. s.OptionalFields = v
  10829. return s
  10830. }
  10831. // SetSchedule sets the Schedule field's value.
  10832. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  10833. s.Schedule = v
  10834. return s
  10835. }
  10836. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryDestination
  10837. type InventoryDestination struct {
  10838. _ struct{} `type:"structure"`
  10839. // Contains the bucket name, file format, bucket owner (optional), and prefix
  10840. // (optional) where inventory results are published.
  10841. //
  10842. // S3BucketDestination is a required field
  10843. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  10844. }
  10845. // String returns the string representation
  10846. func (s InventoryDestination) String() string {
  10847. return awsutil.Prettify(s)
  10848. }
  10849. // GoString returns the string representation
  10850. func (s InventoryDestination) GoString() string {
  10851. return s.String()
  10852. }
  10853. // Validate inspects the fields of the type to determine if they are valid.
  10854. func (s *InventoryDestination) Validate() error {
  10855. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  10856. if s.S3BucketDestination == nil {
  10857. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  10858. }
  10859. if s.S3BucketDestination != nil {
  10860. if err := s.S3BucketDestination.Validate(); err != nil {
  10861. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  10862. }
  10863. }
  10864. if invalidParams.Len() > 0 {
  10865. return invalidParams
  10866. }
  10867. return nil
  10868. }
  10869. // SetS3BucketDestination sets the S3BucketDestination field's value.
  10870. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  10871. s.S3BucketDestination = v
  10872. return s
  10873. }
  10874. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryFilter
  10875. type InventoryFilter struct {
  10876. _ struct{} `type:"structure"`
  10877. // The prefix that an object must have to be included in the inventory results.
  10878. //
  10879. // Prefix is a required field
  10880. Prefix *string `type:"string" required:"true"`
  10881. }
  10882. // String returns the string representation
  10883. func (s InventoryFilter) String() string {
  10884. return awsutil.Prettify(s)
  10885. }
  10886. // GoString returns the string representation
  10887. func (s InventoryFilter) GoString() string {
  10888. return s.String()
  10889. }
  10890. // Validate inspects the fields of the type to determine if they are valid.
  10891. func (s *InventoryFilter) Validate() error {
  10892. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  10893. if s.Prefix == nil {
  10894. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  10895. }
  10896. if invalidParams.Len() > 0 {
  10897. return invalidParams
  10898. }
  10899. return nil
  10900. }
  10901. // SetPrefix sets the Prefix field's value.
  10902. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  10903. s.Prefix = &v
  10904. return s
  10905. }
  10906. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventoryS3BucketDestination
  10907. type InventoryS3BucketDestination struct {
  10908. _ struct{} `type:"structure"`
  10909. // The ID of the account that owns the destination bucket.
  10910. AccountId *string `type:"string"`
  10911. // The Amazon resource name (ARN) of the bucket where inventory results will
  10912. // be published.
  10913. //
  10914. // Bucket is a required field
  10915. Bucket *string `type:"string" required:"true"`
  10916. // Specifies the output format of the inventory results.
  10917. //
  10918. // Format is a required field
  10919. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  10920. // The prefix that is prepended to all inventory results.
  10921. Prefix *string `type:"string"`
  10922. }
  10923. // String returns the string representation
  10924. func (s InventoryS3BucketDestination) String() string {
  10925. return awsutil.Prettify(s)
  10926. }
  10927. // GoString returns the string representation
  10928. func (s InventoryS3BucketDestination) GoString() string {
  10929. return s.String()
  10930. }
  10931. // Validate inspects the fields of the type to determine if they are valid.
  10932. func (s *InventoryS3BucketDestination) Validate() error {
  10933. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  10934. if s.Bucket == nil {
  10935. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10936. }
  10937. if s.Format == nil {
  10938. invalidParams.Add(request.NewErrParamRequired("Format"))
  10939. }
  10940. if invalidParams.Len() > 0 {
  10941. return invalidParams
  10942. }
  10943. return nil
  10944. }
  10945. // SetAccountId sets the AccountId field's value.
  10946. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  10947. s.AccountId = &v
  10948. return s
  10949. }
  10950. // SetBucket sets the Bucket field's value.
  10951. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  10952. s.Bucket = &v
  10953. return s
  10954. }
  10955. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  10956. if s.Bucket == nil {
  10957. return v
  10958. }
  10959. return *s.Bucket
  10960. }
  10961. // SetFormat sets the Format field's value.
  10962. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  10963. s.Format = &v
  10964. return s
  10965. }
  10966. // SetPrefix sets the Prefix field's value.
  10967. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  10968. s.Prefix = &v
  10969. return s
  10970. }
  10971. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/InventorySchedule
  10972. type InventorySchedule struct {
  10973. _ struct{} `type:"structure"`
  10974. // Specifies how frequently inventory results are produced.
  10975. //
  10976. // Frequency is a required field
  10977. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  10978. }
  10979. // String returns the string representation
  10980. func (s InventorySchedule) String() string {
  10981. return awsutil.Prettify(s)
  10982. }
  10983. // GoString returns the string representation
  10984. func (s InventorySchedule) GoString() string {
  10985. return s.String()
  10986. }
  10987. // Validate inspects the fields of the type to determine if they are valid.
  10988. func (s *InventorySchedule) Validate() error {
  10989. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  10990. if s.Frequency == nil {
  10991. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  10992. }
  10993. if invalidParams.Len() > 0 {
  10994. return invalidParams
  10995. }
  10996. return nil
  10997. }
  10998. // SetFrequency sets the Frequency field's value.
  10999. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  11000. s.Frequency = &v
  11001. return s
  11002. }
  11003. // Container for object key name prefix and suffix filtering rules.
  11004. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/S3KeyFilter
  11005. type KeyFilter struct {
  11006. _ struct{} `type:"structure"`
  11007. // A list of containers for key value pair that defines the criteria for the
  11008. // filter rule.
  11009. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  11010. }
  11011. // String returns the string representation
  11012. func (s KeyFilter) String() string {
  11013. return awsutil.Prettify(s)
  11014. }
  11015. // GoString returns the string representation
  11016. func (s KeyFilter) GoString() string {
  11017. return s.String()
  11018. }
  11019. // SetFilterRules sets the FilterRules field's value.
  11020. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  11021. s.FilterRules = v
  11022. return s
  11023. }
  11024. // Container for specifying the AWS Lambda notification configuration.
  11025. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LambdaFunctionConfiguration
  11026. type LambdaFunctionConfiguration struct {
  11027. _ struct{} `type:"structure"`
  11028. // Events is a required field
  11029. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  11030. // Container for object key name filtering rules. For information about key
  11031. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  11032. Filter *NotificationConfigurationFilter `type:"structure"`
  11033. // Optional unique identifier for configurations in a notification configuration.
  11034. // If you don't provide one, Amazon S3 will assign an ID.
  11035. Id *string `type:"string"`
  11036. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  11037. // of the specified type.
  11038. //
  11039. // LambdaFunctionArn is a required field
  11040. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  11041. }
  11042. // String returns the string representation
  11043. func (s LambdaFunctionConfiguration) String() string {
  11044. return awsutil.Prettify(s)
  11045. }
  11046. // GoString returns the string representation
  11047. func (s LambdaFunctionConfiguration) GoString() string {
  11048. return s.String()
  11049. }
  11050. // Validate inspects the fields of the type to determine if they are valid.
  11051. func (s *LambdaFunctionConfiguration) Validate() error {
  11052. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  11053. if s.Events == nil {
  11054. invalidParams.Add(request.NewErrParamRequired("Events"))
  11055. }
  11056. if s.LambdaFunctionArn == nil {
  11057. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  11058. }
  11059. if invalidParams.Len() > 0 {
  11060. return invalidParams
  11061. }
  11062. return nil
  11063. }
  11064. // SetEvents sets the Events field's value.
  11065. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  11066. s.Events = v
  11067. return s
  11068. }
  11069. // SetFilter sets the Filter field's value.
  11070. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  11071. s.Filter = v
  11072. return s
  11073. }
  11074. // SetId sets the Id field's value.
  11075. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  11076. s.Id = &v
  11077. return s
  11078. }
  11079. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  11080. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  11081. s.LambdaFunctionArn = &v
  11082. return s
  11083. }
  11084. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleConfiguration
  11085. type LifecycleConfiguration struct {
  11086. _ struct{} `type:"structure"`
  11087. // Rules is a required field
  11088. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  11089. }
  11090. // String returns the string representation
  11091. func (s LifecycleConfiguration) String() string {
  11092. return awsutil.Prettify(s)
  11093. }
  11094. // GoString returns the string representation
  11095. func (s LifecycleConfiguration) GoString() string {
  11096. return s.String()
  11097. }
  11098. // Validate inspects the fields of the type to determine if they are valid.
  11099. func (s *LifecycleConfiguration) Validate() error {
  11100. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  11101. if s.Rules == nil {
  11102. invalidParams.Add(request.NewErrParamRequired("Rules"))
  11103. }
  11104. if s.Rules != nil {
  11105. for i, v := range s.Rules {
  11106. if v == nil {
  11107. continue
  11108. }
  11109. if err := v.Validate(); err != nil {
  11110. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  11111. }
  11112. }
  11113. }
  11114. if invalidParams.Len() > 0 {
  11115. return invalidParams
  11116. }
  11117. return nil
  11118. }
  11119. // SetRules sets the Rules field's value.
  11120. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  11121. s.Rules = v
  11122. return s
  11123. }
  11124. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleExpiration
  11125. type LifecycleExpiration struct {
  11126. _ struct{} `type:"structure"`
  11127. // Indicates at what date the object is to be moved or deleted. Should be in
  11128. // GMT ISO 8601 Format.
  11129. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  11130. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  11131. // The value must be a non-zero positive integer.
  11132. Days *int64 `type:"integer"`
  11133. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  11134. // versions. If set to true, the delete marker will be expired; if set to false
  11135. // the policy takes no action. This cannot be specified with Days or Date in
  11136. // a Lifecycle Expiration Policy.
  11137. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  11138. }
  11139. // String returns the string representation
  11140. func (s LifecycleExpiration) String() string {
  11141. return awsutil.Prettify(s)
  11142. }
  11143. // GoString returns the string representation
  11144. func (s LifecycleExpiration) GoString() string {
  11145. return s.String()
  11146. }
  11147. // SetDate sets the Date field's value.
  11148. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  11149. s.Date = &v
  11150. return s
  11151. }
  11152. // SetDays sets the Days field's value.
  11153. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  11154. s.Days = &v
  11155. return s
  11156. }
  11157. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  11158. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  11159. s.ExpiredObjectDeleteMarker = &v
  11160. return s
  11161. }
  11162. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRule
  11163. type LifecycleRule struct {
  11164. _ struct{} `type:"structure"`
  11165. // Specifies the days since the initiation of an Incomplete Multipart Upload
  11166. // that Lifecycle will wait before permanently removing all parts of the upload.
  11167. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  11168. Expiration *LifecycleExpiration `type:"structure"`
  11169. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11170. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11171. Filter *LifecycleRuleFilter `type:"structure"`
  11172. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  11173. ID *string `type:"string"`
  11174. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  11175. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  11176. // configuration action on a bucket that has versioning enabled (or suspended)
  11177. // to request that Amazon S3 delete noncurrent object versions at a specific
  11178. // period in the object's lifetime.
  11179. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  11180. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  11181. // Prefix identifying one or more objects to which the rule applies. This is
  11182. // deprecated; use Filter instead.
  11183. Prefix *string `deprecated:"true" type:"string"`
  11184. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  11185. // is not currently being applied.
  11186. //
  11187. // Status is a required field
  11188. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  11189. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  11190. }
  11191. // String returns the string representation
  11192. func (s LifecycleRule) String() string {
  11193. return awsutil.Prettify(s)
  11194. }
  11195. // GoString returns the string representation
  11196. func (s LifecycleRule) GoString() string {
  11197. return s.String()
  11198. }
  11199. // Validate inspects the fields of the type to determine if they are valid.
  11200. func (s *LifecycleRule) Validate() error {
  11201. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  11202. if s.Status == nil {
  11203. invalidParams.Add(request.NewErrParamRequired("Status"))
  11204. }
  11205. if s.Filter != nil {
  11206. if err := s.Filter.Validate(); err != nil {
  11207. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11208. }
  11209. }
  11210. if invalidParams.Len() > 0 {
  11211. return invalidParams
  11212. }
  11213. return nil
  11214. }
  11215. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  11216. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  11217. s.AbortIncompleteMultipartUpload = v
  11218. return s
  11219. }
  11220. // SetExpiration sets the Expiration field's value.
  11221. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  11222. s.Expiration = v
  11223. return s
  11224. }
  11225. // SetFilter sets the Filter field's value.
  11226. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  11227. s.Filter = v
  11228. return s
  11229. }
  11230. // SetID sets the ID field's value.
  11231. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  11232. s.ID = &v
  11233. return s
  11234. }
  11235. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  11236. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  11237. s.NoncurrentVersionExpiration = v
  11238. return s
  11239. }
  11240. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  11241. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  11242. s.NoncurrentVersionTransitions = v
  11243. return s
  11244. }
  11245. // SetPrefix sets the Prefix field's value.
  11246. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  11247. s.Prefix = &v
  11248. return s
  11249. }
  11250. // SetStatus sets the Status field's value.
  11251. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  11252. s.Status = &v
  11253. return s
  11254. }
  11255. // SetTransitions sets the Transitions field's value.
  11256. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  11257. s.Transitions = v
  11258. return s
  11259. }
  11260. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11261. // more predicates. The Lifecycle Rule will apply to any object matching all
  11262. // of the predicates configured inside the And operator.
  11263. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleAndOperator
  11264. type LifecycleRuleAndOperator struct {
  11265. _ struct{} `type:"structure"`
  11266. Prefix *string `type:"string"`
  11267. // All of these tags must exist in the object's tag set in order for the rule
  11268. // to apply.
  11269. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  11270. }
  11271. // String returns the string representation
  11272. func (s LifecycleRuleAndOperator) String() string {
  11273. return awsutil.Prettify(s)
  11274. }
  11275. // GoString returns the string representation
  11276. func (s LifecycleRuleAndOperator) GoString() string {
  11277. return s.String()
  11278. }
  11279. // Validate inspects the fields of the type to determine if they are valid.
  11280. func (s *LifecycleRuleAndOperator) Validate() error {
  11281. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  11282. if s.Tags != nil {
  11283. for i, v := range s.Tags {
  11284. if v == nil {
  11285. continue
  11286. }
  11287. if err := v.Validate(); err != nil {
  11288. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  11289. }
  11290. }
  11291. }
  11292. if invalidParams.Len() > 0 {
  11293. return invalidParams
  11294. }
  11295. return nil
  11296. }
  11297. // SetPrefix sets the Prefix field's value.
  11298. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  11299. s.Prefix = &v
  11300. return s
  11301. }
  11302. // SetTags sets the Tags field's value.
  11303. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  11304. s.Tags = v
  11305. return s
  11306. }
  11307. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11308. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11309. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LifecycleRuleFilter
  11310. type LifecycleRuleFilter struct {
  11311. _ struct{} `type:"structure"`
  11312. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11313. // more predicates. The Lifecycle Rule will apply to any object matching all
  11314. // of the predicates configured inside the And operator.
  11315. And *LifecycleRuleAndOperator `type:"structure"`
  11316. // Prefix identifying one or more objects to which the rule applies.
  11317. Prefix *string `type:"string"`
  11318. // This tag must exist in the object's tag set in order for the rule to apply.
  11319. Tag *Tag `type:"structure"`
  11320. }
  11321. // String returns the string representation
  11322. func (s LifecycleRuleFilter) String() string {
  11323. return awsutil.Prettify(s)
  11324. }
  11325. // GoString returns the string representation
  11326. func (s LifecycleRuleFilter) GoString() string {
  11327. return s.String()
  11328. }
  11329. // Validate inspects the fields of the type to determine if they are valid.
  11330. func (s *LifecycleRuleFilter) Validate() error {
  11331. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  11332. if s.And != nil {
  11333. if err := s.And.Validate(); err != nil {
  11334. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  11335. }
  11336. }
  11337. if s.Tag != nil {
  11338. if err := s.Tag.Validate(); err != nil {
  11339. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  11340. }
  11341. }
  11342. if invalidParams.Len() > 0 {
  11343. return invalidParams
  11344. }
  11345. return nil
  11346. }
  11347. // SetAnd sets the And field's value.
  11348. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  11349. s.And = v
  11350. return s
  11351. }
  11352. // SetPrefix sets the Prefix field's value.
  11353. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  11354. s.Prefix = &v
  11355. return s
  11356. }
  11357. // SetTag sets the Tag field's value.
  11358. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  11359. s.Tag = v
  11360. return s
  11361. }
  11362. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsRequest
  11363. type ListBucketAnalyticsConfigurationsInput struct {
  11364. _ struct{} `type:"structure"`
  11365. // The name of the bucket from which analytics configurations are retrieved.
  11366. //
  11367. // Bucket is a required field
  11368. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11369. // The ContinuationToken that represents a placeholder from where this request
  11370. // should begin.
  11371. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11372. }
  11373. // String returns the string representation
  11374. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  11375. return awsutil.Prettify(s)
  11376. }
  11377. // GoString returns the string representation
  11378. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  11379. return s.String()
  11380. }
  11381. // Validate inspects the fields of the type to determine if they are valid.
  11382. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  11383. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  11384. if s.Bucket == nil {
  11385. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11386. }
  11387. if invalidParams.Len() > 0 {
  11388. return invalidParams
  11389. }
  11390. return nil
  11391. }
  11392. // SetBucket sets the Bucket field's value.
  11393. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  11394. s.Bucket = &v
  11395. return s
  11396. }
  11397. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  11398. if s.Bucket == nil {
  11399. return v
  11400. }
  11401. return *s.Bucket
  11402. }
  11403. // SetContinuationToken sets the ContinuationToken field's value.
  11404. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  11405. s.ContinuationToken = &v
  11406. return s
  11407. }
  11408. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurationsOutput
  11409. type ListBucketAnalyticsConfigurationsOutput struct {
  11410. _ struct{} `type:"structure"`
  11411. // The list of analytics configurations for a bucket.
  11412. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  11413. // The ContinuationToken that represents where this request began.
  11414. ContinuationToken *string `type:"string"`
  11415. // Indicates whether the returned list of analytics configurations is complete.
  11416. // A value of true indicates that the list is not complete and the NextContinuationToken
  11417. // will be provided for a subsequent request.
  11418. IsTruncated *bool `type:"boolean"`
  11419. // NextContinuationToken is sent when isTruncated is true, which indicates that
  11420. // there are more analytics configurations to list. The next request must include
  11421. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  11422. NextContinuationToken *string `type:"string"`
  11423. }
  11424. // String returns the string representation
  11425. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  11426. return awsutil.Prettify(s)
  11427. }
  11428. // GoString returns the string representation
  11429. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  11430. return s.String()
  11431. }
  11432. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  11433. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  11434. s.AnalyticsConfigurationList = v
  11435. return s
  11436. }
  11437. // SetContinuationToken sets the ContinuationToken field's value.
  11438. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  11439. s.ContinuationToken = &v
  11440. return s
  11441. }
  11442. // SetIsTruncated sets the IsTruncated field's value.
  11443. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  11444. s.IsTruncated = &v
  11445. return s
  11446. }
  11447. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11448. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  11449. s.NextContinuationToken = &v
  11450. return s
  11451. }
  11452. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsRequest
  11453. type ListBucketInventoryConfigurationsInput struct {
  11454. _ struct{} `type:"structure"`
  11455. // The name of the bucket containing the inventory configurations to retrieve.
  11456. //
  11457. // Bucket is a required field
  11458. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11459. // The marker used to continue an inventory configuration listing that has been
  11460. // truncated. Use the NextContinuationToken from a previously truncated list
  11461. // response to continue the listing. The continuation token is an opaque value
  11462. // that Amazon S3 understands.
  11463. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11464. }
  11465. // String returns the string representation
  11466. func (s ListBucketInventoryConfigurationsInput) String() string {
  11467. return awsutil.Prettify(s)
  11468. }
  11469. // GoString returns the string representation
  11470. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  11471. return s.String()
  11472. }
  11473. // Validate inspects the fields of the type to determine if they are valid.
  11474. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  11475. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  11476. if s.Bucket == nil {
  11477. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11478. }
  11479. if invalidParams.Len() > 0 {
  11480. return invalidParams
  11481. }
  11482. return nil
  11483. }
  11484. // SetBucket sets the Bucket field's value.
  11485. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  11486. s.Bucket = &v
  11487. return s
  11488. }
  11489. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  11490. if s.Bucket == nil {
  11491. return v
  11492. }
  11493. return *s.Bucket
  11494. }
  11495. // SetContinuationToken sets the ContinuationToken field's value.
  11496. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  11497. s.ContinuationToken = &v
  11498. return s
  11499. }
  11500. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurationsOutput
  11501. type ListBucketInventoryConfigurationsOutput struct {
  11502. _ struct{} `type:"structure"`
  11503. // If sent in the request, the marker that is used as a starting point for this
  11504. // inventory configuration list response.
  11505. ContinuationToken *string `type:"string"`
  11506. // The list of inventory configurations for a bucket.
  11507. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  11508. // Indicates whether the returned list of inventory configurations is truncated
  11509. // in this response. A value of true indicates that the list is truncated.
  11510. IsTruncated *bool `type:"boolean"`
  11511. // The marker used to continue this inventory configuration listing. Use the
  11512. // NextContinuationToken from this response to continue the listing in a subsequent
  11513. // request. The continuation token is an opaque value that Amazon S3 understands.
  11514. NextContinuationToken *string `type:"string"`
  11515. }
  11516. // String returns the string representation
  11517. func (s ListBucketInventoryConfigurationsOutput) String() string {
  11518. return awsutil.Prettify(s)
  11519. }
  11520. // GoString returns the string representation
  11521. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  11522. return s.String()
  11523. }
  11524. // SetContinuationToken sets the ContinuationToken field's value.
  11525. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  11526. s.ContinuationToken = &v
  11527. return s
  11528. }
  11529. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  11530. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  11531. s.InventoryConfigurationList = v
  11532. return s
  11533. }
  11534. // SetIsTruncated sets the IsTruncated field's value.
  11535. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  11536. s.IsTruncated = &v
  11537. return s
  11538. }
  11539. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11540. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  11541. s.NextContinuationToken = &v
  11542. return s
  11543. }
  11544. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsRequest
  11545. type ListBucketMetricsConfigurationsInput struct {
  11546. _ struct{} `type:"structure"`
  11547. // The name of the bucket containing the metrics configurations to retrieve.
  11548. //
  11549. // Bucket is a required field
  11550. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11551. // The marker that is used to continue a metrics configuration listing that
  11552. // has been truncated. Use the NextContinuationToken from a previously truncated
  11553. // list response to continue the listing. The continuation token is an opaque
  11554. // value that Amazon S3 understands.
  11555. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11556. }
  11557. // String returns the string representation
  11558. func (s ListBucketMetricsConfigurationsInput) String() string {
  11559. return awsutil.Prettify(s)
  11560. }
  11561. // GoString returns the string representation
  11562. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  11563. return s.String()
  11564. }
  11565. // Validate inspects the fields of the type to determine if they are valid.
  11566. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  11567. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  11568. if s.Bucket == nil {
  11569. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11570. }
  11571. if invalidParams.Len() > 0 {
  11572. return invalidParams
  11573. }
  11574. return nil
  11575. }
  11576. // SetBucket sets the Bucket field's value.
  11577. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  11578. s.Bucket = &v
  11579. return s
  11580. }
  11581. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  11582. if s.Bucket == nil {
  11583. return v
  11584. }
  11585. return *s.Bucket
  11586. }
  11587. // SetContinuationToken sets the ContinuationToken field's value.
  11588. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  11589. s.ContinuationToken = &v
  11590. return s
  11591. }
  11592. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurationsOutput
  11593. type ListBucketMetricsConfigurationsOutput struct {
  11594. _ struct{} `type:"structure"`
  11595. // The marker that is used as a starting point for this metrics configuration
  11596. // list response. This value is present if it was sent in the request.
  11597. ContinuationToken *string `type:"string"`
  11598. // Indicates whether the returned list of metrics configurations is complete.
  11599. // A value of true indicates that the list is not complete and the NextContinuationToken
  11600. // will be provided for a subsequent request.
  11601. IsTruncated *bool `type:"boolean"`
  11602. // The list of metrics configurations for a bucket.
  11603. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  11604. // The marker used to continue a metrics configuration listing that has been
  11605. // truncated. Use the NextContinuationToken from a previously truncated list
  11606. // response to continue the listing. The continuation token is an opaque value
  11607. // that Amazon S3 understands.
  11608. NextContinuationToken *string `type:"string"`
  11609. }
  11610. // String returns the string representation
  11611. func (s ListBucketMetricsConfigurationsOutput) String() string {
  11612. return awsutil.Prettify(s)
  11613. }
  11614. // GoString returns the string representation
  11615. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  11616. return s.String()
  11617. }
  11618. // SetContinuationToken sets the ContinuationToken field's value.
  11619. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  11620. s.ContinuationToken = &v
  11621. return s
  11622. }
  11623. // SetIsTruncated sets the IsTruncated field's value.
  11624. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  11625. s.IsTruncated = &v
  11626. return s
  11627. }
  11628. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  11629. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  11630. s.MetricsConfigurationList = v
  11631. return s
  11632. }
  11633. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11634. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  11635. s.NextContinuationToken = &v
  11636. return s
  11637. }
  11638. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsInput
  11639. type ListBucketsInput struct {
  11640. _ struct{} `type:"structure"`
  11641. }
  11642. // String returns the string representation
  11643. func (s ListBucketsInput) String() string {
  11644. return awsutil.Prettify(s)
  11645. }
  11646. // GoString returns the string representation
  11647. func (s ListBucketsInput) GoString() string {
  11648. return s.String()
  11649. }
  11650. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketsOutput
  11651. type ListBucketsOutput struct {
  11652. _ struct{} `type:"structure"`
  11653. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  11654. Owner *Owner `type:"structure"`
  11655. }
  11656. // String returns the string representation
  11657. func (s ListBucketsOutput) String() string {
  11658. return awsutil.Prettify(s)
  11659. }
  11660. // GoString returns the string representation
  11661. func (s ListBucketsOutput) GoString() string {
  11662. return s.String()
  11663. }
  11664. // SetBuckets sets the Buckets field's value.
  11665. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  11666. s.Buckets = v
  11667. return s
  11668. }
  11669. // SetOwner sets the Owner field's value.
  11670. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  11671. s.Owner = v
  11672. return s
  11673. }
  11674. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsRequest
  11675. type ListMultipartUploadsInput struct {
  11676. _ struct{} `type:"structure"`
  11677. // Bucket is a required field
  11678. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11679. // Character you use to group keys.
  11680. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  11681. // Requests Amazon S3 to encode the object keys in the response and specifies
  11682. // the encoding method to use. An object key may contain any Unicode character;
  11683. // however, XML 1.0 parser cannot parse some characters, such as characters
  11684. // with an ASCII value from 0 to 10. For characters that are not supported in
  11685. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  11686. // keys in the response.
  11687. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  11688. // Together with upload-id-marker, this parameter specifies the multipart upload
  11689. // after which listing should begin.
  11690. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  11691. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  11692. // in the response body. 1,000 is the maximum number of uploads that can be
  11693. // returned in a response.
  11694. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  11695. // Lists in-progress uploads only for those keys that begin with the specified
  11696. // prefix.
  11697. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  11698. // Together with key-marker, specifies the multipart upload after which listing
  11699. // should begin. If key-marker is not specified, the upload-id-marker parameter
  11700. // is ignored.
  11701. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  11702. }
  11703. // String returns the string representation
  11704. func (s ListMultipartUploadsInput) String() string {
  11705. return awsutil.Prettify(s)
  11706. }
  11707. // GoString returns the string representation
  11708. func (s ListMultipartUploadsInput) GoString() string {
  11709. return s.String()
  11710. }
  11711. // Validate inspects the fields of the type to determine if they are valid.
  11712. func (s *ListMultipartUploadsInput) Validate() error {
  11713. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  11714. if s.Bucket == nil {
  11715. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11716. }
  11717. if invalidParams.Len() > 0 {
  11718. return invalidParams
  11719. }
  11720. return nil
  11721. }
  11722. // SetBucket sets the Bucket field's value.
  11723. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  11724. s.Bucket = &v
  11725. return s
  11726. }
  11727. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  11728. if s.Bucket == nil {
  11729. return v
  11730. }
  11731. return *s.Bucket
  11732. }
  11733. // SetDelimiter sets the Delimiter field's value.
  11734. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  11735. s.Delimiter = &v
  11736. return s
  11737. }
  11738. // SetEncodingType sets the EncodingType field's value.
  11739. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  11740. s.EncodingType = &v
  11741. return s
  11742. }
  11743. // SetKeyMarker sets the KeyMarker field's value.
  11744. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  11745. s.KeyMarker = &v
  11746. return s
  11747. }
  11748. // SetMaxUploads sets the MaxUploads field's value.
  11749. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  11750. s.MaxUploads = &v
  11751. return s
  11752. }
  11753. // SetPrefix sets the Prefix field's value.
  11754. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  11755. s.Prefix = &v
  11756. return s
  11757. }
  11758. // SetUploadIdMarker sets the UploadIdMarker field's value.
  11759. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  11760. s.UploadIdMarker = &v
  11761. return s
  11762. }
  11763. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploadsOutput
  11764. type ListMultipartUploadsOutput struct {
  11765. _ struct{} `type:"structure"`
  11766. // Name of the bucket to which the multipart upload was initiated.
  11767. Bucket *string `type:"string"`
  11768. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  11769. Delimiter *string `type:"string"`
  11770. // Encoding type used by Amazon S3 to encode object keys in the response.
  11771. EncodingType *string `type:"string" enum:"EncodingType"`
  11772. // Indicates whether the returned list of multipart uploads is truncated. A
  11773. // value of true indicates that the list was truncated. The list can be truncated
  11774. // if the number of multipart uploads exceeds the limit allowed or specified
  11775. // by max uploads.
  11776. IsTruncated *bool `type:"boolean"`
  11777. // The key at or after which the listing began.
  11778. KeyMarker *string `type:"string"`
  11779. // Maximum number of multipart uploads that could have been included in the
  11780. // response.
  11781. MaxUploads *int64 `type:"integer"`
  11782. // When a list is truncated, this element specifies the value that should be
  11783. // used for the key-marker request parameter in a subsequent request.
  11784. NextKeyMarker *string `type:"string"`
  11785. // When a list is truncated, this element specifies the value that should be
  11786. // used for the upload-id-marker request parameter in a subsequent request.
  11787. NextUploadIdMarker *string `type:"string"`
  11788. // When a prefix is provided in the request, this field contains the specified
  11789. // prefix. The result contains only keys starting with the specified prefix.
  11790. Prefix *string `type:"string"`
  11791. // Upload ID after which listing began.
  11792. UploadIdMarker *string `type:"string"`
  11793. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  11794. }
  11795. // String returns the string representation
  11796. func (s ListMultipartUploadsOutput) String() string {
  11797. return awsutil.Prettify(s)
  11798. }
  11799. // GoString returns the string representation
  11800. func (s ListMultipartUploadsOutput) GoString() string {
  11801. return s.String()
  11802. }
  11803. // SetBucket sets the Bucket field's value.
  11804. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  11805. s.Bucket = &v
  11806. return s
  11807. }
  11808. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  11809. if s.Bucket == nil {
  11810. return v
  11811. }
  11812. return *s.Bucket
  11813. }
  11814. // SetCommonPrefixes sets the CommonPrefixes field's value.
  11815. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  11816. s.CommonPrefixes = v
  11817. return s
  11818. }
  11819. // SetDelimiter sets the Delimiter field's value.
  11820. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  11821. s.Delimiter = &v
  11822. return s
  11823. }
  11824. // SetEncodingType sets the EncodingType field's value.
  11825. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  11826. s.EncodingType = &v
  11827. return s
  11828. }
  11829. // SetIsTruncated sets the IsTruncated field's value.
  11830. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  11831. s.IsTruncated = &v
  11832. return s
  11833. }
  11834. // SetKeyMarker sets the KeyMarker field's value.
  11835. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  11836. s.KeyMarker = &v
  11837. return s
  11838. }
  11839. // SetMaxUploads sets the MaxUploads field's value.
  11840. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  11841. s.MaxUploads = &v
  11842. return s
  11843. }
  11844. // SetNextKeyMarker sets the NextKeyMarker field's value.
  11845. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  11846. s.NextKeyMarker = &v
  11847. return s
  11848. }
  11849. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  11850. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  11851. s.NextUploadIdMarker = &v
  11852. return s
  11853. }
  11854. // SetPrefix sets the Prefix field's value.
  11855. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  11856. s.Prefix = &v
  11857. return s
  11858. }
  11859. // SetUploadIdMarker sets the UploadIdMarker field's value.
  11860. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  11861. s.UploadIdMarker = &v
  11862. return s
  11863. }
  11864. // SetUploads sets the Uploads field's value.
  11865. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  11866. s.Uploads = v
  11867. return s
  11868. }
  11869. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsRequest
  11870. type ListObjectVersionsInput struct {
  11871. _ struct{} `type:"structure"`
  11872. // Bucket is a required field
  11873. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11874. // A delimiter is a character you use to group keys.
  11875. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  11876. // Requests Amazon S3 to encode the object keys in the response and specifies
  11877. // the encoding method to use. An object key may contain any Unicode character;
  11878. // however, XML 1.0 parser cannot parse some characters, such as characters
  11879. // with an ASCII value from 0 to 10. For characters that are not supported in
  11880. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  11881. // keys in the response.
  11882. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  11883. // Specifies the key to start with when listing objects in a bucket.
  11884. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  11885. // Sets the maximum number of keys returned in the response. The response might
  11886. // contain fewer keys but will never contain more.
  11887. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  11888. // Limits the response to keys that begin with the specified prefix.
  11889. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  11890. // Specifies the object version you want to start listing from.
  11891. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  11892. }
  11893. // String returns the string representation
  11894. func (s ListObjectVersionsInput) String() string {
  11895. return awsutil.Prettify(s)
  11896. }
  11897. // GoString returns the string representation
  11898. func (s ListObjectVersionsInput) GoString() string {
  11899. return s.String()
  11900. }
  11901. // Validate inspects the fields of the type to determine if they are valid.
  11902. func (s *ListObjectVersionsInput) Validate() error {
  11903. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  11904. if s.Bucket == nil {
  11905. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11906. }
  11907. if invalidParams.Len() > 0 {
  11908. return invalidParams
  11909. }
  11910. return nil
  11911. }
  11912. // SetBucket sets the Bucket field's value.
  11913. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  11914. s.Bucket = &v
  11915. return s
  11916. }
  11917. func (s *ListObjectVersionsInput) getBucket() (v string) {
  11918. if s.Bucket == nil {
  11919. return v
  11920. }
  11921. return *s.Bucket
  11922. }
  11923. // SetDelimiter sets the Delimiter field's value.
  11924. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  11925. s.Delimiter = &v
  11926. return s
  11927. }
  11928. // SetEncodingType sets the EncodingType field's value.
  11929. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  11930. s.EncodingType = &v
  11931. return s
  11932. }
  11933. // SetKeyMarker sets the KeyMarker field's value.
  11934. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  11935. s.KeyMarker = &v
  11936. return s
  11937. }
  11938. // SetMaxKeys sets the MaxKeys field's value.
  11939. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  11940. s.MaxKeys = &v
  11941. return s
  11942. }
  11943. // SetPrefix sets the Prefix field's value.
  11944. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  11945. s.Prefix = &v
  11946. return s
  11947. }
  11948. // SetVersionIdMarker sets the VersionIdMarker field's value.
  11949. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  11950. s.VersionIdMarker = &v
  11951. return s
  11952. }
  11953. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersionsOutput
  11954. type ListObjectVersionsOutput struct {
  11955. _ struct{} `type:"structure"`
  11956. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  11957. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  11958. Delimiter *string `type:"string"`
  11959. // Encoding type used by Amazon S3 to encode object keys in the response.
  11960. EncodingType *string `type:"string" enum:"EncodingType"`
  11961. // A flag that indicates whether or not Amazon S3 returned all of the results
  11962. // that satisfied the search criteria. If your results were truncated, you can
  11963. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  11964. // response parameters as a starting place in another request to return the
  11965. // rest of the results.
  11966. IsTruncated *bool `type:"boolean"`
  11967. // Marks the last Key returned in a truncated response.
  11968. KeyMarker *string `type:"string"`
  11969. MaxKeys *int64 `type:"integer"`
  11970. Name *string `type:"string"`
  11971. // Use this value for the key marker request parameter in a subsequent request.
  11972. NextKeyMarker *string `type:"string"`
  11973. // Use this value for the next version id marker parameter in a subsequent request.
  11974. NextVersionIdMarker *string `type:"string"`
  11975. Prefix *string `type:"string"`
  11976. VersionIdMarker *string `type:"string"`
  11977. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  11978. }
  11979. // String returns the string representation
  11980. func (s ListObjectVersionsOutput) String() string {
  11981. return awsutil.Prettify(s)
  11982. }
  11983. // GoString returns the string representation
  11984. func (s ListObjectVersionsOutput) GoString() string {
  11985. return s.String()
  11986. }
  11987. // SetCommonPrefixes sets the CommonPrefixes field's value.
  11988. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  11989. s.CommonPrefixes = v
  11990. return s
  11991. }
  11992. // SetDeleteMarkers sets the DeleteMarkers field's value.
  11993. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  11994. s.DeleteMarkers = v
  11995. return s
  11996. }
  11997. // SetDelimiter sets the Delimiter field's value.
  11998. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  11999. s.Delimiter = &v
  12000. return s
  12001. }
  12002. // SetEncodingType sets the EncodingType field's value.
  12003. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  12004. s.EncodingType = &v
  12005. return s
  12006. }
  12007. // SetIsTruncated sets the IsTruncated field's value.
  12008. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  12009. s.IsTruncated = &v
  12010. return s
  12011. }
  12012. // SetKeyMarker sets the KeyMarker field's value.
  12013. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  12014. s.KeyMarker = &v
  12015. return s
  12016. }
  12017. // SetMaxKeys sets the MaxKeys field's value.
  12018. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  12019. s.MaxKeys = &v
  12020. return s
  12021. }
  12022. // SetName sets the Name field's value.
  12023. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  12024. s.Name = &v
  12025. return s
  12026. }
  12027. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12028. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  12029. s.NextKeyMarker = &v
  12030. return s
  12031. }
  12032. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  12033. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  12034. s.NextVersionIdMarker = &v
  12035. return s
  12036. }
  12037. // SetPrefix sets the Prefix field's value.
  12038. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  12039. s.Prefix = &v
  12040. return s
  12041. }
  12042. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12043. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  12044. s.VersionIdMarker = &v
  12045. return s
  12046. }
  12047. // SetVersions sets the Versions field's value.
  12048. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  12049. s.Versions = v
  12050. return s
  12051. }
  12052. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsRequest
  12053. type ListObjectsInput struct {
  12054. _ struct{} `type:"structure"`
  12055. // Bucket is a required field
  12056. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12057. // A delimiter is a character you use to group keys.
  12058. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12059. // Requests Amazon S3 to encode the object keys in the response and specifies
  12060. // the encoding method to use. An object key may contain any Unicode character;
  12061. // however, XML 1.0 parser cannot parse some characters, such as characters
  12062. // with an ASCII value from 0 to 10. For characters that are not supported in
  12063. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12064. // keys in the response.
  12065. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12066. // Specifies the key to start with when listing objects in a bucket.
  12067. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  12068. // Sets the maximum number of keys returned in the response. The response might
  12069. // contain fewer keys but will never contain more.
  12070. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12071. // Limits the response to keys that begin with the specified prefix.
  12072. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12073. // Confirms that the requester knows that she or he will be charged for the
  12074. // list objects request. Bucket owners need not specify this parameter in their
  12075. // requests.
  12076. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12077. }
  12078. // String returns the string representation
  12079. func (s ListObjectsInput) String() string {
  12080. return awsutil.Prettify(s)
  12081. }
  12082. // GoString returns the string representation
  12083. func (s ListObjectsInput) GoString() string {
  12084. return s.String()
  12085. }
  12086. // Validate inspects the fields of the type to determine if they are valid.
  12087. func (s *ListObjectsInput) Validate() error {
  12088. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  12089. if s.Bucket == nil {
  12090. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12091. }
  12092. if invalidParams.Len() > 0 {
  12093. return invalidParams
  12094. }
  12095. return nil
  12096. }
  12097. // SetBucket sets the Bucket field's value.
  12098. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  12099. s.Bucket = &v
  12100. return s
  12101. }
  12102. func (s *ListObjectsInput) getBucket() (v string) {
  12103. if s.Bucket == nil {
  12104. return v
  12105. }
  12106. return *s.Bucket
  12107. }
  12108. // SetDelimiter sets the Delimiter field's value.
  12109. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  12110. s.Delimiter = &v
  12111. return s
  12112. }
  12113. // SetEncodingType sets the EncodingType field's value.
  12114. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  12115. s.EncodingType = &v
  12116. return s
  12117. }
  12118. // SetMarker sets the Marker field's value.
  12119. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  12120. s.Marker = &v
  12121. return s
  12122. }
  12123. // SetMaxKeys sets the MaxKeys field's value.
  12124. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  12125. s.MaxKeys = &v
  12126. return s
  12127. }
  12128. // SetPrefix sets the Prefix field's value.
  12129. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  12130. s.Prefix = &v
  12131. return s
  12132. }
  12133. // SetRequestPayer sets the RequestPayer field's value.
  12134. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  12135. s.RequestPayer = &v
  12136. return s
  12137. }
  12138. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsOutput
  12139. type ListObjectsOutput struct {
  12140. _ struct{} `type:"structure"`
  12141. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12142. Contents []*Object `type:"list" flattened:"true"`
  12143. Delimiter *string `type:"string"`
  12144. // Encoding type used by Amazon S3 to encode object keys in the response.
  12145. EncodingType *string `type:"string" enum:"EncodingType"`
  12146. // A flag that indicates whether or not Amazon S3 returned all of the results
  12147. // that satisfied the search criteria.
  12148. IsTruncated *bool `type:"boolean"`
  12149. Marker *string `type:"string"`
  12150. MaxKeys *int64 `type:"integer"`
  12151. Name *string `type:"string"`
  12152. // When response is truncated (the IsTruncated element value in the response
  12153. // is true), you can use the key name in this field as marker in the subsequent
  12154. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  12155. // order Note: This element is returned only if you have delimiter request parameter
  12156. // specified. If response does not include the NextMaker and it is truncated,
  12157. // you can use the value of the last Key in the response as the marker in the
  12158. // subsequent request to get the next set of object keys.
  12159. NextMarker *string `type:"string"`
  12160. Prefix *string `type:"string"`
  12161. }
  12162. // String returns the string representation
  12163. func (s ListObjectsOutput) String() string {
  12164. return awsutil.Prettify(s)
  12165. }
  12166. // GoString returns the string representation
  12167. func (s ListObjectsOutput) GoString() string {
  12168. return s.String()
  12169. }
  12170. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12171. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  12172. s.CommonPrefixes = v
  12173. return s
  12174. }
  12175. // SetContents sets the Contents field's value.
  12176. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  12177. s.Contents = v
  12178. return s
  12179. }
  12180. // SetDelimiter sets the Delimiter field's value.
  12181. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  12182. s.Delimiter = &v
  12183. return s
  12184. }
  12185. // SetEncodingType sets the EncodingType field's value.
  12186. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  12187. s.EncodingType = &v
  12188. return s
  12189. }
  12190. // SetIsTruncated sets the IsTruncated field's value.
  12191. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  12192. s.IsTruncated = &v
  12193. return s
  12194. }
  12195. // SetMarker sets the Marker field's value.
  12196. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  12197. s.Marker = &v
  12198. return s
  12199. }
  12200. // SetMaxKeys sets the MaxKeys field's value.
  12201. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  12202. s.MaxKeys = &v
  12203. return s
  12204. }
  12205. // SetName sets the Name field's value.
  12206. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  12207. s.Name = &v
  12208. return s
  12209. }
  12210. // SetNextMarker sets the NextMarker field's value.
  12211. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  12212. s.NextMarker = &v
  12213. return s
  12214. }
  12215. // SetPrefix sets the Prefix field's value.
  12216. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  12217. s.Prefix = &v
  12218. return s
  12219. }
  12220. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Request
  12221. type ListObjectsV2Input struct {
  12222. _ struct{} `type:"structure"`
  12223. // Name of the bucket to list.
  12224. //
  12225. // Bucket is a required field
  12226. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12227. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12228. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12229. // key
  12230. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12231. // A delimiter is a character you use to group keys.
  12232. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12233. // Encoding type used by Amazon S3 to encode object keys in the response.
  12234. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12235. // The owner field is not present in listV2 by default, if you want to return
  12236. // owner field with each key in the result then set the fetch owner field to
  12237. // true
  12238. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  12239. // Sets the maximum number of keys returned in the response. The response might
  12240. // contain fewer keys but will never contain more.
  12241. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12242. // Limits the response to keys that begin with the specified prefix.
  12243. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12244. // Confirms that the requester knows that she or he will be charged for the
  12245. // list objects request in V2 style. Bucket owners need not specify this parameter
  12246. // in their requests.
  12247. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12248. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12249. // listing after this specified key. StartAfter can be any key in the bucket
  12250. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  12251. }
  12252. // String returns the string representation
  12253. func (s ListObjectsV2Input) String() string {
  12254. return awsutil.Prettify(s)
  12255. }
  12256. // GoString returns the string representation
  12257. func (s ListObjectsV2Input) GoString() string {
  12258. return s.String()
  12259. }
  12260. // Validate inspects the fields of the type to determine if they are valid.
  12261. func (s *ListObjectsV2Input) Validate() error {
  12262. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  12263. if s.Bucket == nil {
  12264. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12265. }
  12266. if invalidParams.Len() > 0 {
  12267. return invalidParams
  12268. }
  12269. return nil
  12270. }
  12271. // SetBucket sets the Bucket field's value.
  12272. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  12273. s.Bucket = &v
  12274. return s
  12275. }
  12276. func (s *ListObjectsV2Input) getBucket() (v string) {
  12277. if s.Bucket == nil {
  12278. return v
  12279. }
  12280. return *s.Bucket
  12281. }
  12282. // SetContinuationToken sets the ContinuationToken field's value.
  12283. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  12284. s.ContinuationToken = &v
  12285. return s
  12286. }
  12287. // SetDelimiter sets the Delimiter field's value.
  12288. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  12289. s.Delimiter = &v
  12290. return s
  12291. }
  12292. // SetEncodingType sets the EncodingType field's value.
  12293. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  12294. s.EncodingType = &v
  12295. return s
  12296. }
  12297. // SetFetchOwner sets the FetchOwner field's value.
  12298. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  12299. s.FetchOwner = &v
  12300. return s
  12301. }
  12302. // SetMaxKeys sets the MaxKeys field's value.
  12303. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  12304. s.MaxKeys = &v
  12305. return s
  12306. }
  12307. // SetPrefix sets the Prefix field's value.
  12308. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  12309. s.Prefix = &v
  12310. return s
  12311. }
  12312. // SetRequestPayer sets the RequestPayer field's value.
  12313. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  12314. s.RequestPayer = &v
  12315. return s
  12316. }
  12317. // SetStartAfter sets the StartAfter field's value.
  12318. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  12319. s.StartAfter = &v
  12320. return s
  12321. }
  12322. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2Output
  12323. type ListObjectsV2Output struct {
  12324. _ struct{} `type:"structure"`
  12325. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  12326. // next occurrence of the string specified by delimiter
  12327. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12328. // Metadata about each object returned.
  12329. Contents []*Object `type:"list" flattened:"true"`
  12330. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12331. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12332. // key
  12333. ContinuationToken *string `type:"string"`
  12334. // A delimiter is a character you use to group keys.
  12335. Delimiter *string `type:"string"`
  12336. // Encoding type used by Amazon S3 to encode object keys in the response.
  12337. EncodingType *string `type:"string" enum:"EncodingType"`
  12338. // A flag that indicates whether or not Amazon S3 returned all of the results
  12339. // that satisfied the search criteria.
  12340. IsTruncated *bool `type:"boolean"`
  12341. // KeyCount is the number of keys returned with this request. KeyCount will
  12342. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  12343. // result will include less than equals 50 keys
  12344. KeyCount *int64 `type:"integer"`
  12345. // Sets the maximum number of keys returned in the response. The response might
  12346. // contain fewer keys but will never contain more.
  12347. MaxKeys *int64 `type:"integer"`
  12348. // Name of the bucket to list.
  12349. Name *string `type:"string"`
  12350. // NextContinuationToken is sent when isTruncated is true which means there
  12351. // are more keys in the bucket that can be listed. The next list requests to
  12352. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  12353. // is obfuscated and is not a real key
  12354. NextContinuationToken *string `type:"string"`
  12355. // Limits the response to keys that begin with the specified prefix.
  12356. Prefix *string `type:"string"`
  12357. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12358. // listing after this specified key. StartAfter can be any key in the bucket
  12359. StartAfter *string `type:"string"`
  12360. }
  12361. // String returns the string representation
  12362. func (s ListObjectsV2Output) String() string {
  12363. return awsutil.Prettify(s)
  12364. }
  12365. // GoString returns the string representation
  12366. func (s ListObjectsV2Output) GoString() string {
  12367. return s.String()
  12368. }
  12369. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12370. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  12371. s.CommonPrefixes = v
  12372. return s
  12373. }
  12374. // SetContents sets the Contents field's value.
  12375. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  12376. s.Contents = v
  12377. return s
  12378. }
  12379. // SetContinuationToken sets the ContinuationToken field's value.
  12380. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  12381. s.ContinuationToken = &v
  12382. return s
  12383. }
  12384. // SetDelimiter sets the Delimiter field's value.
  12385. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  12386. s.Delimiter = &v
  12387. return s
  12388. }
  12389. // SetEncodingType sets the EncodingType field's value.
  12390. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  12391. s.EncodingType = &v
  12392. return s
  12393. }
  12394. // SetIsTruncated sets the IsTruncated field's value.
  12395. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  12396. s.IsTruncated = &v
  12397. return s
  12398. }
  12399. // SetKeyCount sets the KeyCount field's value.
  12400. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  12401. s.KeyCount = &v
  12402. return s
  12403. }
  12404. // SetMaxKeys sets the MaxKeys field's value.
  12405. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  12406. s.MaxKeys = &v
  12407. return s
  12408. }
  12409. // SetName sets the Name field's value.
  12410. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  12411. s.Name = &v
  12412. return s
  12413. }
  12414. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12415. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  12416. s.NextContinuationToken = &v
  12417. return s
  12418. }
  12419. // SetPrefix sets the Prefix field's value.
  12420. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  12421. s.Prefix = &v
  12422. return s
  12423. }
  12424. // SetStartAfter sets the StartAfter field's value.
  12425. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  12426. s.StartAfter = &v
  12427. return s
  12428. }
  12429. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsRequest
  12430. type ListPartsInput struct {
  12431. _ struct{} `type:"structure"`
  12432. // Bucket is a required field
  12433. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12434. // Key is a required field
  12435. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12436. // Sets the maximum number of parts to return.
  12437. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  12438. // Specifies the part after which listing should begin. Only parts with higher
  12439. // part numbers will be listed.
  12440. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  12441. // Confirms that the requester knows that she or he will be charged for the
  12442. // request. Bucket owners need not specify this parameter in their requests.
  12443. // Documentation on downloading objects from requester pays buckets can be found
  12444. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  12445. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12446. // Upload ID identifying the multipart upload whose parts are being listed.
  12447. //
  12448. // UploadId is a required field
  12449. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  12450. }
  12451. // String returns the string representation
  12452. func (s ListPartsInput) String() string {
  12453. return awsutil.Prettify(s)
  12454. }
  12455. // GoString returns the string representation
  12456. func (s ListPartsInput) GoString() string {
  12457. return s.String()
  12458. }
  12459. // Validate inspects the fields of the type to determine if they are valid.
  12460. func (s *ListPartsInput) Validate() error {
  12461. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  12462. if s.Bucket == nil {
  12463. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12464. }
  12465. if s.Key == nil {
  12466. invalidParams.Add(request.NewErrParamRequired("Key"))
  12467. }
  12468. if s.Key != nil && len(*s.Key) < 1 {
  12469. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12470. }
  12471. if s.UploadId == nil {
  12472. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  12473. }
  12474. if invalidParams.Len() > 0 {
  12475. return invalidParams
  12476. }
  12477. return nil
  12478. }
  12479. // SetBucket sets the Bucket field's value.
  12480. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  12481. s.Bucket = &v
  12482. return s
  12483. }
  12484. func (s *ListPartsInput) getBucket() (v string) {
  12485. if s.Bucket == nil {
  12486. return v
  12487. }
  12488. return *s.Bucket
  12489. }
  12490. // SetKey sets the Key field's value.
  12491. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  12492. s.Key = &v
  12493. return s
  12494. }
  12495. // SetMaxParts sets the MaxParts field's value.
  12496. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  12497. s.MaxParts = &v
  12498. return s
  12499. }
  12500. // SetPartNumberMarker sets the PartNumberMarker field's value.
  12501. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  12502. s.PartNumberMarker = &v
  12503. return s
  12504. }
  12505. // SetRequestPayer sets the RequestPayer field's value.
  12506. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  12507. s.RequestPayer = &v
  12508. return s
  12509. }
  12510. // SetUploadId sets the UploadId field's value.
  12511. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  12512. s.UploadId = &v
  12513. return s
  12514. }
  12515. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListPartsOutput
  12516. type ListPartsOutput struct {
  12517. _ struct{} `type:"structure"`
  12518. // Date when multipart upload will become eligible for abort operation by lifecycle.
  12519. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  12520. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  12521. // operation.
  12522. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  12523. // Name of the bucket to which the multipart upload was initiated.
  12524. Bucket *string `type:"string"`
  12525. // Identifies who initiated the multipart upload.
  12526. Initiator *Initiator `type:"structure"`
  12527. // Indicates whether the returned list of parts is truncated.
  12528. IsTruncated *bool `type:"boolean"`
  12529. // Object key for which the multipart upload was initiated.
  12530. Key *string `min:"1" type:"string"`
  12531. // Maximum number of parts that were allowed in the response.
  12532. MaxParts *int64 `type:"integer"`
  12533. // When a list is truncated, this element specifies the last part in the list,
  12534. // as well as the value to use for the part-number-marker request parameter
  12535. // in a subsequent request.
  12536. NextPartNumberMarker *int64 `type:"integer"`
  12537. Owner *Owner `type:"structure"`
  12538. // Part number after which listing begins.
  12539. PartNumberMarker *int64 `type:"integer"`
  12540. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  12541. // If present, indicates that the requester was successfully charged for the
  12542. // request.
  12543. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  12544. // The class of storage used to store the object.
  12545. StorageClass *string `type:"string" enum:"StorageClass"`
  12546. // Upload ID identifying the multipart upload whose parts are being listed.
  12547. UploadId *string `type:"string"`
  12548. }
  12549. // String returns the string representation
  12550. func (s ListPartsOutput) String() string {
  12551. return awsutil.Prettify(s)
  12552. }
  12553. // GoString returns the string representation
  12554. func (s ListPartsOutput) GoString() string {
  12555. return s.String()
  12556. }
  12557. // SetAbortDate sets the AbortDate field's value.
  12558. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  12559. s.AbortDate = &v
  12560. return s
  12561. }
  12562. // SetAbortRuleId sets the AbortRuleId field's value.
  12563. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  12564. s.AbortRuleId = &v
  12565. return s
  12566. }
  12567. // SetBucket sets the Bucket field's value.
  12568. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  12569. s.Bucket = &v
  12570. return s
  12571. }
  12572. func (s *ListPartsOutput) getBucket() (v string) {
  12573. if s.Bucket == nil {
  12574. return v
  12575. }
  12576. return *s.Bucket
  12577. }
  12578. // SetInitiator sets the Initiator field's value.
  12579. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  12580. s.Initiator = v
  12581. return s
  12582. }
  12583. // SetIsTruncated sets the IsTruncated field's value.
  12584. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  12585. s.IsTruncated = &v
  12586. return s
  12587. }
  12588. // SetKey sets the Key field's value.
  12589. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  12590. s.Key = &v
  12591. return s
  12592. }
  12593. // SetMaxParts sets the MaxParts field's value.
  12594. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  12595. s.MaxParts = &v
  12596. return s
  12597. }
  12598. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  12599. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  12600. s.NextPartNumberMarker = &v
  12601. return s
  12602. }
  12603. // SetOwner sets the Owner field's value.
  12604. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  12605. s.Owner = v
  12606. return s
  12607. }
  12608. // SetPartNumberMarker sets the PartNumberMarker field's value.
  12609. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  12610. s.PartNumberMarker = &v
  12611. return s
  12612. }
  12613. // SetParts sets the Parts field's value.
  12614. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  12615. s.Parts = v
  12616. return s
  12617. }
  12618. // SetRequestCharged sets the RequestCharged field's value.
  12619. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  12620. s.RequestCharged = &v
  12621. return s
  12622. }
  12623. // SetStorageClass sets the StorageClass field's value.
  12624. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  12625. s.StorageClass = &v
  12626. return s
  12627. }
  12628. // SetUploadId sets the UploadId field's value.
  12629. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  12630. s.UploadId = &v
  12631. return s
  12632. }
  12633. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/LoggingEnabled
  12634. type LoggingEnabled struct {
  12635. _ struct{} `type:"structure"`
  12636. // Specifies the bucket where you want Amazon S3 to store server access logs.
  12637. // You can have your logs delivered to any bucket that you own, including the
  12638. // same bucket that is being logged. You can also configure multiple buckets
  12639. // to deliver their logs to the same target bucket. In this case you should
  12640. // choose a different TargetPrefix for each source bucket so that the delivered
  12641. // log files can be distinguished by key.
  12642. TargetBucket *string `type:"string"`
  12643. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  12644. // This element lets you specify a prefix for the keys that the log files will
  12645. // be stored under.
  12646. TargetPrefix *string `type:"string"`
  12647. }
  12648. // String returns the string representation
  12649. func (s LoggingEnabled) String() string {
  12650. return awsutil.Prettify(s)
  12651. }
  12652. // GoString returns the string representation
  12653. func (s LoggingEnabled) GoString() string {
  12654. return s.String()
  12655. }
  12656. // Validate inspects the fields of the type to determine if they are valid.
  12657. func (s *LoggingEnabled) Validate() error {
  12658. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  12659. if s.TargetGrants != nil {
  12660. for i, v := range s.TargetGrants {
  12661. if v == nil {
  12662. continue
  12663. }
  12664. if err := v.Validate(); err != nil {
  12665. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  12666. }
  12667. }
  12668. }
  12669. if invalidParams.Len() > 0 {
  12670. return invalidParams
  12671. }
  12672. return nil
  12673. }
  12674. // SetTargetBucket sets the TargetBucket field's value.
  12675. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  12676. s.TargetBucket = &v
  12677. return s
  12678. }
  12679. // SetTargetGrants sets the TargetGrants field's value.
  12680. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  12681. s.TargetGrants = v
  12682. return s
  12683. }
  12684. // SetTargetPrefix sets the TargetPrefix field's value.
  12685. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  12686. s.TargetPrefix = &v
  12687. return s
  12688. }
  12689. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsAndOperator
  12690. type MetricsAndOperator struct {
  12691. _ struct{} `type:"structure"`
  12692. // The prefix used when evaluating an AND predicate.
  12693. Prefix *string `type:"string"`
  12694. // The list of tags used when evaluating an AND predicate.
  12695. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  12696. }
  12697. // String returns the string representation
  12698. func (s MetricsAndOperator) String() string {
  12699. return awsutil.Prettify(s)
  12700. }
  12701. // GoString returns the string representation
  12702. func (s MetricsAndOperator) GoString() string {
  12703. return s.String()
  12704. }
  12705. // Validate inspects the fields of the type to determine if they are valid.
  12706. func (s *MetricsAndOperator) Validate() error {
  12707. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  12708. if s.Tags != nil {
  12709. for i, v := range s.Tags {
  12710. if v == nil {
  12711. continue
  12712. }
  12713. if err := v.Validate(); err != nil {
  12714. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  12715. }
  12716. }
  12717. }
  12718. if invalidParams.Len() > 0 {
  12719. return invalidParams
  12720. }
  12721. return nil
  12722. }
  12723. // SetPrefix sets the Prefix field's value.
  12724. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  12725. s.Prefix = &v
  12726. return s
  12727. }
  12728. // SetTags sets the Tags field's value.
  12729. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  12730. s.Tags = v
  12731. return s
  12732. }
  12733. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsConfiguration
  12734. type MetricsConfiguration struct {
  12735. _ struct{} `type:"structure"`
  12736. // Specifies a metrics configuration filter. The metrics configuration will
  12737. // only include objects that meet the filter's criteria. A filter must be a
  12738. // prefix, a tag, or a conjunction (MetricsAndOperator).
  12739. Filter *MetricsFilter `type:"structure"`
  12740. // The ID used to identify the metrics configuration.
  12741. //
  12742. // Id is a required field
  12743. Id *string `type:"string" required:"true"`
  12744. }
  12745. // String returns the string representation
  12746. func (s MetricsConfiguration) String() string {
  12747. return awsutil.Prettify(s)
  12748. }
  12749. // GoString returns the string representation
  12750. func (s MetricsConfiguration) GoString() string {
  12751. return s.String()
  12752. }
  12753. // Validate inspects the fields of the type to determine if they are valid.
  12754. func (s *MetricsConfiguration) Validate() error {
  12755. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  12756. if s.Id == nil {
  12757. invalidParams.Add(request.NewErrParamRequired("Id"))
  12758. }
  12759. if s.Filter != nil {
  12760. if err := s.Filter.Validate(); err != nil {
  12761. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  12762. }
  12763. }
  12764. if invalidParams.Len() > 0 {
  12765. return invalidParams
  12766. }
  12767. return nil
  12768. }
  12769. // SetFilter sets the Filter field's value.
  12770. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  12771. s.Filter = v
  12772. return s
  12773. }
  12774. // SetId sets the Id field's value.
  12775. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  12776. s.Id = &v
  12777. return s
  12778. }
  12779. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MetricsFilter
  12780. type MetricsFilter struct {
  12781. _ struct{} `type:"structure"`
  12782. // A conjunction (logical AND) of predicates, which is used in evaluating a
  12783. // metrics filter. The operator must have at least two predicates, and an object
  12784. // must match all of the predicates in order for the filter to apply.
  12785. And *MetricsAndOperator `type:"structure"`
  12786. // The prefix used when evaluating a metrics filter.
  12787. Prefix *string `type:"string"`
  12788. // The tag used when evaluating a metrics filter.
  12789. Tag *Tag `type:"structure"`
  12790. }
  12791. // String returns the string representation
  12792. func (s MetricsFilter) String() string {
  12793. return awsutil.Prettify(s)
  12794. }
  12795. // GoString returns the string representation
  12796. func (s MetricsFilter) GoString() string {
  12797. return s.String()
  12798. }
  12799. // Validate inspects the fields of the type to determine if they are valid.
  12800. func (s *MetricsFilter) Validate() error {
  12801. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  12802. if s.And != nil {
  12803. if err := s.And.Validate(); err != nil {
  12804. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  12805. }
  12806. }
  12807. if s.Tag != nil {
  12808. if err := s.Tag.Validate(); err != nil {
  12809. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  12810. }
  12811. }
  12812. if invalidParams.Len() > 0 {
  12813. return invalidParams
  12814. }
  12815. return nil
  12816. }
  12817. // SetAnd sets the And field's value.
  12818. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  12819. s.And = v
  12820. return s
  12821. }
  12822. // SetPrefix sets the Prefix field's value.
  12823. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  12824. s.Prefix = &v
  12825. return s
  12826. }
  12827. // SetTag sets the Tag field's value.
  12828. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  12829. s.Tag = v
  12830. return s
  12831. }
  12832. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/MultipartUpload
  12833. type MultipartUpload struct {
  12834. _ struct{} `type:"structure"`
  12835. // Date and time at which the multipart upload was initiated.
  12836. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  12837. // Identifies who initiated the multipart upload.
  12838. Initiator *Initiator `type:"structure"`
  12839. // Key of the object for which the multipart upload was initiated.
  12840. Key *string `min:"1" type:"string"`
  12841. Owner *Owner `type:"structure"`
  12842. // The class of storage used to store the object.
  12843. StorageClass *string `type:"string" enum:"StorageClass"`
  12844. // Upload ID that identifies the multipart upload.
  12845. UploadId *string `type:"string"`
  12846. }
  12847. // String returns the string representation
  12848. func (s MultipartUpload) String() string {
  12849. return awsutil.Prettify(s)
  12850. }
  12851. // GoString returns the string representation
  12852. func (s MultipartUpload) GoString() string {
  12853. return s.String()
  12854. }
  12855. // SetInitiated sets the Initiated field's value.
  12856. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  12857. s.Initiated = &v
  12858. return s
  12859. }
  12860. // SetInitiator sets the Initiator field's value.
  12861. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  12862. s.Initiator = v
  12863. return s
  12864. }
  12865. // SetKey sets the Key field's value.
  12866. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  12867. s.Key = &v
  12868. return s
  12869. }
  12870. // SetOwner sets the Owner field's value.
  12871. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  12872. s.Owner = v
  12873. return s
  12874. }
  12875. // SetStorageClass sets the StorageClass field's value.
  12876. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  12877. s.StorageClass = &v
  12878. return s
  12879. }
  12880. // SetUploadId sets the UploadId field's value.
  12881. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  12882. s.UploadId = &v
  12883. return s
  12884. }
  12885. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  12886. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  12887. // configuration action on a bucket that has versioning enabled (or suspended)
  12888. // to request that Amazon S3 delete noncurrent object versions at a specific
  12889. // period in the object's lifetime.
  12890. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionExpiration
  12891. type NoncurrentVersionExpiration struct {
  12892. _ struct{} `type:"structure"`
  12893. // Specifies the number of days an object is noncurrent before Amazon S3 can
  12894. // perform the associated action. For information about the noncurrent days
  12895. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  12896. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  12897. NoncurrentDays *int64 `type:"integer"`
  12898. }
  12899. // String returns the string representation
  12900. func (s NoncurrentVersionExpiration) String() string {
  12901. return awsutil.Prettify(s)
  12902. }
  12903. // GoString returns the string representation
  12904. func (s NoncurrentVersionExpiration) GoString() string {
  12905. return s.String()
  12906. }
  12907. // SetNoncurrentDays sets the NoncurrentDays field's value.
  12908. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  12909. s.NoncurrentDays = &v
  12910. return s
  12911. }
  12912. // Container for the transition rule that describes when noncurrent objects
  12913. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  12914. // versioning-enabled (or versioning is suspended), you can set this action
  12915. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  12916. // or GLACIER storage class at a specific period in the object's lifetime.
  12917. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NoncurrentVersionTransition
  12918. type NoncurrentVersionTransition struct {
  12919. _ struct{} `type:"structure"`
  12920. // Specifies the number of days an object is noncurrent before Amazon S3 can
  12921. // perform the associated action. For information about the noncurrent days
  12922. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  12923. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  12924. NoncurrentDays *int64 `type:"integer"`
  12925. // The class of storage used to store the object.
  12926. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  12927. }
  12928. // String returns the string representation
  12929. func (s NoncurrentVersionTransition) String() string {
  12930. return awsutil.Prettify(s)
  12931. }
  12932. // GoString returns the string representation
  12933. func (s NoncurrentVersionTransition) GoString() string {
  12934. return s.String()
  12935. }
  12936. // SetNoncurrentDays sets the NoncurrentDays field's value.
  12937. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  12938. s.NoncurrentDays = &v
  12939. return s
  12940. }
  12941. // SetStorageClass sets the StorageClass field's value.
  12942. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  12943. s.StorageClass = &v
  12944. return s
  12945. }
  12946. // Container for specifying the notification configuration of the bucket. If
  12947. // this element is empty, notifications are turned off on the bucket.
  12948. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfiguration
  12949. type NotificationConfiguration struct {
  12950. _ struct{} `type:"structure"`
  12951. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  12952. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  12953. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  12954. }
  12955. // String returns the string representation
  12956. func (s NotificationConfiguration) String() string {
  12957. return awsutil.Prettify(s)
  12958. }
  12959. // GoString returns the string representation
  12960. func (s NotificationConfiguration) GoString() string {
  12961. return s.String()
  12962. }
  12963. // Validate inspects the fields of the type to determine if they are valid.
  12964. func (s *NotificationConfiguration) Validate() error {
  12965. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  12966. if s.LambdaFunctionConfigurations != nil {
  12967. for i, v := range s.LambdaFunctionConfigurations {
  12968. if v == nil {
  12969. continue
  12970. }
  12971. if err := v.Validate(); err != nil {
  12972. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  12973. }
  12974. }
  12975. }
  12976. if s.QueueConfigurations != nil {
  12977. for i, v := range s.QueueConfigurations {
  12978. if v == nil {
  12979. continue
  12980. }
  12981. if err := v.Validate(); err != nil {
  12982. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  12983. }
  12984. }
  12985. }
  12986. if s.TopicConfigurations != nil {
  12987. for i, v := range s.TopicConfigurations {
  12988. if v == nil {
  12989. continue
  12990. }
  12991. if err := v.Validate(); err != nil {
  12992. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  12993. }
  12994. }
  12995. }
  12996. if invalidParams.Len() > 0 {
  12997. return invalidParams
  12998. }
  12999. return nil
  13000. }
  13001. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  13002. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  13003. s.LambdaFunctionConfigurations = v
  13004. return s
  13005. }
  13006. // SetQueueConfigurations sets the QueueConfigurations field's value.
  13007. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  13008. s.QueueConfigurations = v
  13009. return s
  13010. }
  13011. // SetTopicConfigurations sets the TopicConfigurations field's value.
  13012. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  13013. s.TopicConfigurations = v
  13014. return s
  13015. }
  13016. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationDeprecated
  13017. type NotificationConfigurationDeprecated struct {
  13018. _ struct{} `type:"structure"`
  13019. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  13020. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  13021. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  13022. }
  13023. // String returns the string representation
  13024. func (s NotificationConfigurationDeprecated) String() string {
  13025. return awsutil.Prettify(s)
  13026. }
  13027. // GoString returns the string representation
  13028. func (s NotificationConfigurationDeprecated) GoString() string {
  13029. return s.String()
  13030. }
  13031. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  13032. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  13033. s.CloudFunctionConfiguration = v
  13034. return s
  13035. }
  13036. // SetQueueConfiguration sets the QueueConfiguration field's value.
  13037. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13038. s.QueueConfiguration = v
  13039. return s
  13040. }
  13041. // SetTopicConfiguration sets the TopicConfiguration field's value.
  13042. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13043. s.TopicConfiguration = v
  13044. return s
  13045. }
  13046. // Container for object key name filtering rules. For information about key
  13047. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13048. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/NotificationConfigurationFilter
  13049. type NotificationConfigurationFilter struct {
  13050. _ struct{} `type:"structure"`
  13051. // Container for object key name prefix and suffix filtering rules.
  13052. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  13053. }
  13054. // String returns the string representation
  13055. func (s NotificationConfigurationFilter) String() string {
  13056. return awsutil.Prettify(s)
  13057. }
  13058. // GoString returns the string representation
  13059. func (s NotificationConfigurationFilter) GoString() string {
  13060. return s.String()
  13061. }
  13062. // SetKey sets the Key field's value.
  13063. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  13064. s.Key = v
  13065. return s
  13066. }
  13067. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Object
  13068. type Object struct {
  13069. _ struct{} `type:"structure"`
  13070. ETag *string `type:"string"`
  13071. Key *string `min:"1" type:"string"`
  13072. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13073. Owner *Owner `type:"structure"`
  13074. Size *int64 `type:"integer"`
  13075. // The class of storage used to store the object.
  13076. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  13077. }
  13078. // String returns the string representation
  13079. func (s Object) String() string {
  13080. return awsutil.Prettify(s)
  13081. }
  13082. // GoString returns the string representation
  13083. func (s Object) GoString() string {
  13084. return s.String()
  13085. }
  13086. // SetETag sets the ETag field's value.
  13087. func (s *Object) SetETag(v string) *Object {
  13088. s.ETag = &v
  13089. return s
  13090. }
  13091. // SetKey sets the Key field's value.
  13092. func (s *Object) SetKey(v string) *Object {
  13093. s.Key = &v
  13094. return s
  13095. }
  13096. // SetLastModified sets the LastModified field's value.
  13097. func (s *Object) SetLastModified(v time.Time) *Object {
  13098. s.LastModified = &v
  13099. return s
  13100. }
  13101. // SetOwner sets the Owner field's value.
  13102. func (s *Object) SetOwner(v *Owner) *Object {
  13103. s.Owner = v
  13104. return s
  13105. }
  13106. // SetSize sets the Size field's value.
  13107. func (s *Object) SetSize(v int64) *Object {
  13108. s.Size = &v
  13109. return s
  13110. }
  13111. // SetStorageClass sets the StorageClass field's value.
  13112. func (s *Object) SetStorageClass(v string) *Object {
  13113. s.StorageClass = &v
  13114. return s
  13115. }
  13116. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectIdentifier
  13117. type ObjectIdentifier struct {
  13118. _ struct{} `type:"structure"`
  13119. // Key name of the object to delete.
  13120. //
  13121. // Key is a required field
  13122. Key *string `min:"1" type:"string" required:"true"`
  13123. // VersionId for the specific version of the object to delete.
  13124. VersionId *string `type:"string"`
  13125. }
  13126. // String returns the string representation
  13127. func (s ObjectIdentifier) String() string {
  13128. return awsutil.Prettify(s)
  13129. }
  13130. // GoString returns the string representation
  13131. func (s ObjectIdentifier) GoString() string {
  13132. return s.String()
  13133. }
  13134. // Validate inspects the fields of the type to determine if they are valid.
  13135. func (s *ObjectIdentifier) Validate() error {
  13136. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  13137. if s.Key == nil {
  13138. invalidParams.Add(request.NewErrParamRequired("Key"))
  13139. }
  13140. if s.Key != nil && len(*s.Key) < 1 {
  13141. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13142. }
  13143. if invalidParams.Len() > 0 {
  13144. return invalidParams
  13145. }
  13146. return nil
  13147. }
  13148. // SetKey sets the Key field's value.
  13149. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  13150. s.Key = &v
  13151. return s
  13152. }
  13153. // SetVersionId sets the VersionId field's value.
  13154. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  13155. s.VersionId = &v
  13156. return s
  13157. }
  13158. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ObjectVersion
  13159. type ObjectVersion struct {
  13160. _ struct{} `type:"structure"`
  13161. ETag *string `type:"string"`
  13162. // Specifies whether the object is (true) or is not (false) the latest version
  13163. // of an object.
  13164. IsLatest *bool `type:"boolean"`
  13165. // The object key.
  13166. Key *string `min:"1" type:"string"`
  13167. // Date and time the object was last modified.
  13168. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13169. Owner *Owner `type:"structure"`
  13170. // Size in bytes of the object.
  13171. Size *int64 `type:"integer"`
  13172. // The class of storage used to store the object.
  13173. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  13174. // Version ID of an object.
  13175. VersionId *string `type:"string"`
  13176. }
  13177. // String returns the string representation
  13178. func (s ObjectVersion) String() string {
  13179. return awsutil.Prettify(s)
  13180. }
  13181. // GoString returns the string representation
  13182. func (s ObjectVersion) GoString() string {
  13183. return s.String()
  13184. }
  13185. // SetETag sets the ETag field's value.
  13186. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  13187. s.ETag = &v
  13188. return s
  13189. }
  13190. // SetIsLatest sets the IsLatest field's value.
  13191. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  13192. s.IsLatest = &v
  13193. return s
  13194. }
  13195. // SetKey sets the Key field's value.
  13196. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  13197. s.Key = &v
  13198. return s
  13199. }
  13200. // SetLastModified sets the LastModified field's value.
  13201. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  13202. s.LastModified = &v
  13203. return s
  13204. }
  13205. // SetOwner sets the Owner field's value.
  13206. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  13207. s.Owner = v
  13208. return s
  13209. }
  13210. // SetSize sets the Size field's value.
  13211. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  13212. s.Size = &v
  13213. return s
  13214. }
  13215. // SetStorageClass sets the StorageClass field's value.
  13216. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  13217. s.StorageClass = &v
  13218. return s
  13219. }
  13220. // SetVersionId sets the VersionId field's value.
  13221. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  13222. s.VersionId = &v
  13223. return s
  13224. }
  13225. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Owner
  13226. type Owner struct {
  13227. _ struct{} `type:"structure"`
  13228. DisplayName *string `type:"string"`
  13229. ID *string `type:"string"`
  13230. }
  13231. // String returns the string representation
  13232. func (s Owner) String() string {
  13233. return awsutil.Prettify(s)
  13234. }
  13235. // GoString returns the string representation
  13236. func (s Owner) GoString() string {
  13237. return s.String()
  13238. }
  13239. // SetDisplayName sets the DisplayName field's value.
  13240. func (s *Owner) SetDisplayName(v string) *Owner {
  13241. s.DisplayName = &v
  13242. return s
  13243. }
  13244. // SetID sets the ID field's value.
  13245. func (s *Owner) SetID(v string) *Owner {
  13246. s.ID = &v
  13247. return s
  13248. }
  13249. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Part
  13250. type Part struct {
  13251. _ struct{} `type:"structure"`
  13252. // Entity tag returned when the part was uploaded.
  13253. ETag *string `type:"string"`
  13254. // Date and time at which the part was uploaded.
  13255. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13256. // Part number identifying the part. This is a positive integer between 1 and
  13257. // 10,000.
  13258. PartNumber *int64 `type:"integer"`
  13259. // Size of the uploaded part data.
  13260. Size *int64 `type:"integer"`
  13261. }
  13262. // String returns the string representation
  13263. func (s Part) String() string {
  13264. return awsutil.Prettify(s)
  13265. }
  13266. // GoString returns the string representation
  13267. func (s Part) GoString() string {
  13268. return s.String()
  13269. }
  13270. // SetETag sets the ETag field's value.
  13271. func (s *Part) SetETag(v string) *Part {
  13272. s.ETag = &v
  13273. return s
  13274. }
  13275. // SetLastModified sets the LastModified field's value.
  13276. func (s *Part) SetLastModified(v time.Time) *Part {
  13277. s.LastModified = &v
  13278. return s
  13279. }
  13280. // SetPartNumber sets the PartNumber field's value.
  13281. func (s *Part) SetPartNumber(v int64) *Part {
  13282. s.PartNumber = &v
  13283. return s
  13284. }
  13285. // SetSize sets the Size field's value.
  13286. func (s *Part) SetSize(v int64) *Part {
  13287. s.Size = &v
  13288. return s
  13289. }
  13290. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationRequest
  13291. type PutBucketAccelerateConfigurationInput struct {
  13292. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  13293. // Specifies the Accelerate Configuration you want to set for the bucket.
  13294. //
  13295. // AccelerateConfiguration is a required field
  13296. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13297. // Name of the bucket for which the accelerate configuration is set.
  13298. //
  13299. // Bucket is a required field
  13300. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13301. }
  13302. // String returns the string representation
  13303. func (s PutBucketAccelerateConfigurationInput) String() string {
  13304. return awsutil.Prettify(s)
  13305. }
  13306. // GoString returns the string representation
  13307. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  13308. return s.String()
  13309. }
  13310. // Validate inspects the fields of the type to determine if they are valid.
  13311. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  13312. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  13313. if s.AccelerateConfiguration == nil {
  13314. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  13315. }
  13316. if s.Bucket == nil {
  13317. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13318. }
  13319. if invalidParams.Len() > 0 {
  13320. return invalidParams
  13321. }
  13322. return nil
  13323. }
  13324. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  13325. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  13326. s.AccelerateConfiguration = v
  13327. return s
  13328. }
  13329. // SetBucket sets the Bucket field's value.
  13330. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  13331. s.Bucket = &v
  13332. return s
  13333. }
  13334. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  13335. if s.Bucket == nil {
  13336. return v
  13337. }
  13338. return *s.Bucket
  13339. }
  13340. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfigurationOutput
  13341. type PutBucketAccelerateConfigurationOutput struct {
  13342. _ struct{} `type:"structure"`
  13343. }
  13344. // String returns the string representation
  13345. func (s PutBucketAccelerateConfigurationOutput) String() string {
  13346. return awsutil.Prettify(s)
  13347. }
  13348. // GoString returns the string representation
  13349. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  13350. return s.String()
  13351. }
  13352. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclRequest
  13353. type PutBucketAclInput struct {
  13354. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  13355. // The canned ACL to apply to the bucket.
  13356. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  13357. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13358. // Bucket is a required field
  13359. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13360. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  13361. // bucket.
  13362. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  13363. // Allows grantee to list the objects in the bucket.
  13364. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  13365. // Allows grantee to read the bucket ACL.
  13366. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  13367. // Allows grantee to create, overwrite, and delete any object in the bucket.
  13368. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  13369. // Allows grantee to write the ACL for the applicable bucket.
  13370. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  13371. }
  13372. // String returns the string representation
  13373. func (s PutBucketAclInput) String() string {
  13374. return awsutil.Prettify(s)
  13375. }
  13376. // GoString returns the string representation
  13377. func (s PutBucketAclInput) GoString() string {
  13378. return s.String()
  13379. }
  13380. // Validate inspects the fields of the type to determine if they are valid.
  13381. func (s *PutBucketAclInput) Validate() error {
  13382. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  13383. if s.Bucket == nil {
  13384. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13385. }
  13386. if s.AccessControlPolicy != nil {
  13387. if err := s.AccessControlPolicy.Validate(); err != nil {
  13388. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  13389. }
  13390. }
  13391. if invalidParams.Len() > 0 {
  13392. return invalidParams
  13393. }
  13394. return nil
  13395. }
  13396. // SetACL sets the ACL field's value.
  13397. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  13398. s.ACL = &v
  13399. return s
  13400. }
  13401. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  13402. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  13403. s.AccessControlPolicy = v
  13404. return s
  13405. }
  13406. // SetBucket sets the Bucket field's value.
  13407. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  13408. s.Bucket = &v
  13409. return s
  13410. }
  13411. func (s *PutBucketAclInput) getBucket() (v string) {
  13412. if s.Bucket == nil {
  13413. return v
  13414. }
  13415. return *s.Bucket
  13416. }
  13417. // SetGrantFullControl sets the GrantFullControl field's value.
  13418. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  13419. s.GrantFullControl = &v
  13420. return s
  13421. }
  13422. // SetGrantRead sets the GrantRead field's value.
  13423. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  13424. s.GrantRead = &v
  13425. return s
  13426. }
  13427. // SetGrantReadACP sets the GrantReadACP field's value.
  13428. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  13429. s.GrantReadACP = &v
  13430. return s
  13431. }
  13432. // SetGrantWrite sets the GrantWrite field's value.
  13433. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  13434. s.GrantWrite = &v
  13435. return s
  13436. }
  13437. // SetGrantWriteACP sets the GrantWriteACP field's value.
  13438. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  13439. s.GrantWriteACP = &v
  13440. return s
  13441. }
  13442. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAclOutput
  13443. type PutBucketAclOutput struct {
  13444. _ struct{} `type:"structure"`
  13445. }
  13446. // String returns the string representation
  13447. func (s PutBucketAclOutput) String() string {
  13448. return awsutil.Prettify(s)
  13449. }
  13450. // GoString returns the string representation
  13451. func (s PutBucketAclOutput) GoString() string {
  13452. return s.String()
  13453. }
  13454. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationRequest
  13455. type PutBucketAnalyticsConfigurationInput struct {
  13456. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  13457. // The configuration and any analyses for the analytics filter.
  13458. //
  13459. // AnalyticsConfiguration is a required field
  13460. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13461. // The name of the bucket to which an analytics configuration is stored.
  13462. //
  13463. // Bucket is a required field
  13464. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13465. // The identifier used to represent an analytics configuration.
  13466. //
  13467. // Id is a required field
  13468. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  13469. }
  13470. // String returns the string representation
  13471. func (s PutBucketAnalyticsConfigurationInput) String() string {
  13472. return awsutil.Prettify(s)
  13473. }
  13474. // GoString returns the string representation
  13475. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  13476. return s.String()
  13477. }
  13478. // Validate inspects the fields of the type to determine if they are valid.
  13479. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  13480. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  13481. if s.AnalyticsConfiguration == nil {
  13482. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  13483. }
  13484. if s.Bucket == nil {
  13485. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13486. }
  13487. if s.Id == nil {
  13488. invalidParams.Add(request.NewErrParamRequired("Id"))
  13489. }
  13490. if s.AnalyticsConfiguration != nil {
  13491. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  13492. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  13493. }
  13494. }
  13495. if invalidParams.Len() > 0 {
  13496. return invalidParams
  13497. }
  13498. return nil
  13499. }
  13500. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  13501. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  13502. s.AnalyticsConfiguration = v
  13503. return s
  13504. }
  13505. // SetBucket sets the Bucket field's value.
  13506. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  13507. s.Bucket = &v
  13508. return s
  13509. }
  13510. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  13511. if s.Bucket == nil {
  13512. return v
  13513. }
  13514. return *s.Bucket
  13515. }
  13516. // SetId sets the Id field's value.
  13517. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  13518. s.Id = &v
  13519. return s
  13520. }
  13521. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfigurationOutput
  13522. type PutBucketAnalyticsConfigurationOutput struct {
  13523. _ struct{} `type:"structure"`
  13524. }
  13525. // String returns the string representation
  13526. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  13527. return awsutil.Prettify(s)
  13528. }
  13529. // GoString returns the string representation
  13530. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  13531. return s.String()
  13532. }
  13533. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsRequest
  13534. type PutBucketCorsInput struct {
  13535. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  13536. // Bucket is a required field
  13537. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13538. // CORSConfiguration is a required field
  13539. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13540. }
  13541. // String returns the string representation
  13542. func (s PutBucketCorsInput) String() string {
  13543. return awsutil.Prettify(s)
  13544. }
  13545. // GoString returns the string representation
  13546. func (s PutBucketCorsInput) GoString() string {
  13547. return s.String()
  13548. }
  13549. // Validate inspects the fields of the type to determine if they are valid.
  13550. func (s *PutBucketCorsInput) Validate() error {
  13551. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  13552. if s.Bucket == nil {
  13553. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13554. }
  13555. if s.CORSConfiguration == nil {
  13556. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  13557. }
  13558. if s.CORSConfiguration != nil {
  13559. if err := s.CORSConfiguration.Validate(); err != nil {
  13560. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  13561. }
  13562. }
  13563. if invalidParams.Len() > 0 {
  13564. return invalidParams
  13565. }
  13566. return nil
  13567. }
  13568. // SetBucket sets the Bucket field's value.
  13569. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  13570. s.Bucket = &v
  13571. return s
  13572. }
  13573. func (s *PutBucketCorsInput) getBucket() (v string) {
  13574. if s.Bucket == nil {
  13575. return v
  13576. }
  13577. return *s.Bucket
  13578. }
  13579. // SetCORSConfiguration sets the CORSConfiguration field's value.
  13580. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  13581. s.CORSConfiguration = v
  13582. return s
  13583. }
  13584. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCorsOutput
  13585. type PutBucketCorsOutput struct {
  13586. _ struct{} `type:"structure"`
  13587. }
  13588. // String returns the string representation
  13589. func (s PutBucketCorsOutput) String() string {
  13590. return awsutil.Prettify(s)
  13591. }
  13592. // GoString returns the string representation
  13593. func (s PutBucketCorsOutput) GoString() string {
  13594. return s.String()
  13595. }
  13596. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationRequest
  13597. type PutBucketInventoryConfigurationInput struct {
  13598. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  13599. // The name of the bucket where the inventory configuration will be stored.
  13600. //
  13601. // Bucket is a required field
  13602. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13603. // The ID used to identify the inventory configuration.
  13604. //
  13605. // Id is a required field
  13606. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  13607. // Specifies the inventory configuration.
  13608. //
  13609. // InventoryConfiguration is a required field
  13610. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13611. }
  13612. // String returns the string representation
  13613. func (s PutBucketInventoryConfigurationInput) String() string {
  13614. return awsutil.Prettify(s)
  13615. }
  13616. // GoString returns the string representation
  13617. func (s PutBucketInventoryConfigurationInput) GoString() string {
  13618. return s.String()
  13619. }
  13620. // Validate inspects the fields of the type to determine if they are valid.
  13621. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  13622. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  13623. if s.Bucket == nil {
  13624. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13625. }
  13626. if s.Id == nil {
  13627. invalidParams.Add(request.NewErrParamRequired("Id"))
  13628. }
  13629. if s.InventoryConfiguration == nil {
  13630. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  13631. }
  13632. if s.InventoryConfiguration != nil {
  13633. if err := s.InventoryConfiguration.Validate(); err != nil {
  13634. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  13635. }
  13636. }
  13637. if invalidParams.Len() > 0 {
  13638. return invalidParams
  13639. }
  13640. return nil
  13641. }
  13642. // SetBucket sets the Bucket field's value.
  13643. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  13644. s.Bucket = &v
  13645. return s
  13646. }
  13647. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  13648. if s.Bucket == nil {
  13649. return v
  13650. }
  13651. return *s.Bucket
  13652. }
  13653. // SetId sets the Id field's value.
  13654. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  13655. s.Id = &v
  13656. return s
  13657. }
  13658. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  13659. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  13660. s.InventoryConfiguration = v
  13661. return s
  13662. }
  13663. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfigurationOutput
  13664. type PutBucketInventoryConfigurationOutput struct {
  13665. _ struct{} `type:"structure"`
  13666. }
  13667. // String returns the string representation
  13668. func (s PutBucketInventoryConfigurationOutput) String() string {
  13669. return awsutil.Prettify(s)
  13670. }
  13671. // GoString returns the string representation
  13672. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  13673. return s.String()
  13674. }
  13675. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationRequest
  13676. type PutBucketLifecycleConfigurationInput struct {
  13677. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  13678. // Bucket is a required field
  13679. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13680. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13681. }
  13682. // String returns the string representation
  13683. func (s PutBucketLifecycleConfigurationInput) String() string {
  13684. return awsutil.Prettify(s)
  13685. }
  13686. // GoString returns the string representation
  13687. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  13688. return s.String()
  13689. }
  13690. // Validate inspects the fields of the type to determine if they are valid.
  13691. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  13692. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  13693. if s.Bucket == nil {
  13694. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13695. }
  13696. if s.LifecycleConfiguration != nil {
  13697. if err := s.LifecycleConfiguration.Validate(); err != nil {
  13698. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  13699. }
  13700. }
  13701. if invalidParams.Len() > 0 {
  13702. return invalidParams
  13703. }
  13704. return nil
  13705. }
  13706. // SetBucket sets the Bucket field's value.
  13707. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  13708. s.Bucket = &v
  13709. return s
  13710. }
  13711. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  13712. if s.Bucket == nil {
  13713. return v
  13714. }
  13715. return *s.Bucket
  13716. }
  13717. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  13718. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  13719. s.LifecycleConfiguration = v
  13720. return s
  13721. }
  13722. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfigurationOutput
  13723. type PutBucketLifecycleConfigurationOutput struct {
  13724. _ struct{} `type:"structure"`
  13725. }
  13726. // String returns the string representation
  13727. func (s PutBucketLifecycleConfigurationOutput) String() string {
  13728. return awsutil.Prettify(s)
  13729. }
  13730. // GoString returns the string representation
  13731. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  13732. return s.String()
  13733. }
  13734. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleRequest
  13735. type PutBucketLifecycleInput struct {
  13736. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  13737. // Bucket is a required field
  13738. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13739. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13740. }
  13741. // String returns the string representation
  13742. func (s PutBucketLifecycleInput) String() string {
  13743. return awsutil.Prettify(s)
  13744. }
  13745. // GoString returns the string representation
  13746. func (s PutBucketLifecycleInput) GoString() string {
  13747. return s.String()
  13748. }
  13749. // Validate inspects the fields of the type to determine if they are valid.
  13750. func (s *PutBucketLifecycleInput) Validate() error {
  13751. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  13752. if s.Bucket == nil {
  13753. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13754. }
  13755. if s.LifecycleConfiguration != nil {
  13756. if err := s.LifecycleConfiguration.Validate(); err != nil {
  13757. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  13758. }
  13759. }
  13760. if invalidParams.Len() > 0 {
  13761. return invalidParams
  13762. }
  13763. return nil
  13764. }
  13765. // SetBucket sets the Bucket field's value.
  13766. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  13767. s.Bucket = &v
  13768. return s
  13769. }
  13770. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  13771. if s.Bucket == nil {
  13772. return v
  13773. }
  13774. return *s.Bucket
  13775. }
  13776. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  13777. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  13778. s.LifecycleConfiguration = v
  13779. return s
  13780. }
  13781. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleOutput
  13782. type PutBucketLifecycleOutput struct {
  13783. _ struct{} `type:"structure"`
  13784. }
  13785. // String returns the string representation
  13786. func (s PutBucketLifecycleOutput) String() string {
  13787. return awsutil.Prettify(s)
  13788. }
  13789. // GoString returns the string representation
  13790. func (s PutBucketLifecycleOutput) GoString() string {
  13791. return s.String()
  13792. }
  13793. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingRequest
  13794. type PutBucketLoggingInput struct {
  13795. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  13796. // Bucket is a required field
  13797. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13798. // BucketLoggingStatus is a required field
  13799. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13800. }
  13801. // String returns the string representation
  13802. func (s PutBucketLoggingInput) String() string {
  13803. return awsutil.Prettify(s)
  13804. }
  13805. // GoString returns the string representation
  13806. func (s PutBucketLoggingInput) GoString() string {
  13807. return s.String()
  13808. }
  13809. // Validate inspects the fields of the type to determine if they are valid.
  13810. func (s *PutBucketLoggingInput) Validate() error {
  13811. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  13812. if s.Bucket == nil {
  13813. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13814. }
  13815. if s.BucketLoggingStatus == nil {
  13816. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  13817. }
  13818. if s.BucketLoggingStatus != nil {
  13819. if err := s.BucketLoggingStatus.Validate(); err != nil {
  13820. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  13821. }
  13822. }
  13823. if invalidParams.Len() > 0 {
  13824. return invalidParams
  13825. }
  13826. return nil
  13827. }
  13828. // SetBucket sets the Bucket field's value.
  13829. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  13830. s.Bucket = &v
  13831. return s
  13832. }
  13833. func (s *PutBucketLoggingInput) getBucket() (v string) {
  13834. if s.Bucket == nil {
  13835. return v
  13836. }
  13837. return *s.Bucket
  13838. }
  13839. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  13840. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  13841. s.BucketLoggingStatus = v
  13842. return s
  13843. }
  13844. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLoggingOutput
  13845. type PutBucketLoggingOutput struct {
  13846. _ struct{} `type:"structure"`
  13847. }
  13848. // String returns the string representation
  13849. func (s PutBucketLoggingOutput) String() string {
  13850. return awsutil.Prettify(s)
  13851. }
  13852. // GoString returns the string representation
  13853. func (s PutBucketLoggingOutput) GoString() string {
  13854. return s.String()
  13855. }
  13856. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationRequest
  13857. type PutBucketMetricsConfigurationInput struct {
  13858. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  13859. // The name of the bucket for which the metrics configuration is set.
  13860. //
  13861. // Bucket is a required field
  13862. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13863. // The ID used to identify the metrics configuration.
  13864. //
  13865. // Id is a required field
  13866. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  13867. // Specifies the metrics configuration.
  13868. //
  13869. // MetricsConfiguration is a required field
  13870. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13871. }
  13872. // String returns the string representation
  13873. func (s PutBucketMetricsConfigurationInput) String() string {
  13874. return awsutil.Prettify(s)
  13875. }
  13876. // GoString returns the string representation
  13877. func (s PutBucketMetricsConfigurationInput) GoString() string {
  13878. return s.String()
  13879. }
  13880. // Validate inspects the fields of the type to determine if they are valid.
  13881. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  13882. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  13883. if s.Bucket == nil {
  13884. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13885. }
  13886. if s.Id == nil {
  13887. invalidParams.Add(request.NewErrParamRequired("Id"))
  13888. }
  13889. if s.MetricsConfiguration == nil {
  13890. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  13891. }
  13892. if s.MetricsConfiguration != nil {
  13893. if err := s.MetricsConfiguration.Validate(); err != nil {
  13894. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  13895. }
  13896. }
  13897. if invalidParams.Len() > 0 {
  13898. return invalidParams
  13899. }
  13900. return nil
  13901. }
  13902. // SetBucket sets the Bucket field's value.
  13903. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  13904. s.Bucket = &v
  13905. return s
  13906. }
  13907. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  13908. if s.Bucket == nil {
  13909. return v
  13910. }
  13911. return *s.Bucket
  13912. }
  13913. // SetId sets the Id field's value.
  13914. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  13915. s.Id = &v
  13916. return s
  13917. }
  13918. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  13919. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  13920. s.MetricsConfiguration = v
  13921. return s
  13922. }
  13923. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfigurationOutput
  13924. type PutBucketMetricsConfigurationOutput struct {
  13925. _ struct{} `type:"structure"`
  13926. }
  13927. // String returns the string representation
  13928. func (s PutBucketMetricsConfigurationOutput) String() string {
  13929. return awsutil.Prettify(s)
  13930. }
  13931. // GoString returns the string representation
  13932. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  13933. return s.String()
  13934. }
  13935. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationRequest
  13936. type PutBucketNotificationConfigurationInput struct {
  13937. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  13938. // Bucket is a required field
  13939. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13940. // Container for specifying the notification configuration of the bucket. If
  13941. // this element is empty, notifications are turned off on the bucket.
  13942. //
  13943. // NotificationConfiguration is a required field
  13944. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13945. }
  13946. // String returns the string representation
  13947. func (s PutBucketNotificationConfigurationInput) String() string {
  13948. return awsutil.Prettify(s)
  13949. }
  13950. // GoString returns the string representation
  13951. func (s PutBucketNotificationConfigurationInput) GoString() string {
  13952. return s.String()
  13953. }
  13954. // Validate inspects the fields of the type to determine if they are valid.
  13955. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  13956. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  13957. if s.Bucket == nil {
  13958. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13959. }
  13960. if s.NotificationConfiguration == nil {
  13961. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  13962. }
  13963. if s.NotificationConfiguration != nil {
  13964. if err := s.NotificationConfiguration.Validate(); err != nil {
  13965. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  13966. }
  13967. }
  13968. if invalidParams.Len() > 0 {
  13969. return invalidParams
  13970. }
  13971. return nil
  13972. }
  13973. // SetBucket sets the Bucket field's value.
  13974. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  13975. s.Bucket = &v
  13976. return s
  13977. }
  13978. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  13979. if s.Bucket == nil {
  13980. return v
  13981. }
  13982. return *s.Bucket
  13983. }
  13984. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  13985. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  13986. s.NotificationConfiguration = v
  13987. return s
  13988. }
  13989. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfigurationOutput
  13990. type PutBucketNotificationConfigurationOutput struct {
  13991. _ struct{} `type:"structure"`
  13992. }
  13993. // String returns the string representation
  13994. func (s PutBucketNotificationConfigurationOutput) String() string {
  13995. return awsutil.Prettify(s)
  13996. }
  13997. // GoString returns the string representation
  13998. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  13999. return s.String()
  14000. }
  14001. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationRequest
  14002. type PutBucketNotificationInput struct {
  14003. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14004. // Bucket is a required field
  14005. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14006. // NotificationConfiguration is a required field
  14007. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14008. }
  14009. // String returns the string representation
  14010. func (s PutBucketNotificationInput) String() string {
  14011. return awsutil.Prettify(s)
  14012. }
  14013. // GoString returns the string representation
  14014. func (s PutBucketNotificationInput) GoString() string {
  14015. return s.String()
  14016. }
  14017. // Validate inspects the fields of the type to determine if they are valid.
  14018. func (s *PutBucketNotificationInput) Validate() error {
  14019. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  14020. if s.Bucket == nil {
  14021. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14022. }
  14023. if s.NotificationConfiguration == nil {
  14024. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  14025. }
  14026. if invalidParams.Len() > 0 {
  14027. return invalidParams
  14028. }
  14029. return nil
  14030. }
  14031. // SetBucket sets the Bucket field's value.
  14032. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  14033. s.Bucket = &v
  14034. return s
  14035. }
  14036. func (s *PutBucketNotificationInput) getBucket() (v string) {
  14037. if s.Bucket == nil {
  14038. return v
  14039. }
  14040. return *s.Bucket
  14041. }
  14042. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  14043. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  14044. s.NotificationConfiguration = v
  14045. return s
  14046. }
  14047. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationOutput
  14048. type PutBucketNotificationOutput struct {
  14049. _ struct{} `type:"structure"`
  14050. }
  14051. // String returns the string representation
  14052. func (s PutBucketNotificationOutput) String() string {
  14053. return awsutil.Prettify(s)
  14054. }
  14055. // GoString returns the string representation
  14056. func (s PutBucketNotificationOutput) GoString() string {
  14057. return s.String()
  14058. }
  14059. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyRequest
  14060. type PutBucketPolicyInput struct {
  14061. _ struct{} `type:"structure" payload:"Policy"`
  14062. // Bucket is a required field
  14063. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14064. // The bucket policy as a JSON document.
  14065. //
  14066. // Policy is a required field
  14067. Policy *string `type:"string" required:"true"`
  14068. }
  14069. // String returns the string representation
  14070. func (s PutBucketPolicyInput) String() string {
  14071. return awsutil.Prettify(s)
  14072. }
  14073. // GoString returns the string representation
  14074. func (s PutBucketPolicyInput) GoString() string {
  14075. return s.String()
  14076. }
  14077. // Validate inspects the fields of the type to determine if they are valid.
  14078. func (s *PutBucketPolicyInput) Validate() error {
  14079. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  14080. if s.Bucket == nil {
  14081. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14082. }
  14083. if s.Policy == nil {
  14084. invalidParams.Add(request.NewErrParamRequired("Policy"))
  14085. }
  14086. if invalidParams.Len() > 0 {
  14087. return invalidParams
  14088. }
  14089. return nil
  14090. }
  14091. // SetBucket sets the Bucket field's value.
  14092. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  14093. s.Bucket = &v
  14094. return s
  14095. }
  14096. func (s *PutBucketPolicyInput) getBucket() (v string) {
  14097. if s.Bucket == nil {
  14098. return v
  14099. }
  14100. return *s.Bucket
  14101. }
  14102. // SetPolicy sets the Policy field's value.
  14103. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  14104. s.Policy = &v
  14105. return s
  14106. }
  14107. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicyOutput
  14108. type PutBucketPolicyOutput struct {
  14109. _ struct{} `type:"structure"`
  14110. }
  14111. // String returns the string representation
  14112. func (s PutBucketPolicyOutput) String() string {
  14113. return awsutil.Prettify(s)
  14114. }
  14115. // GoString returns the string representation
  14116. func (s PutBucketPolicyOutput) GoString() string {
  14117. return s.String()
  14118. }
  14119. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationRequest
  14120. type PutBucketReplicationInput struct {
  14121. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  14122. // Bucket is a required field
  14123. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14124. // Container for replication rules. You can add as many as 1,000 rules. Total
  14125. // replication configuration size can be up to 2 MB.
  14126. //
  14127. // ReplicationConfiguration is a required field
  14128. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14129. }
  14130. // String returns the string representation
  14131. func (s PutBucketReplicationInput) String() string {
  14132. return awsutil.Prettify(s)
  14133. }
  14134. // GoString returns the string representation
  14135. func (s PutBucketReplicationInput) GoString() string {
  14136. return s.String()
  14137. }
  14138. // Validate inspects the fields of the type to determine if they are valid.
  14139. func (s *PutBucketReplicationInput) Validate() error {
  14140. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  14141. if s.Bucket == nil {
  14142. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14143. }
  14144. if s.ReplicationConfiguration == nil {
  14145. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  14146. }
  14147. if s.ReplicationConfiguration != nil {
  14148. if err := s.ReplicationConfiguration.Validate(); err != nil {
  14149. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  14150. }
  14151. }
  14152. if invalidParams.Len() > 0 {
  14153. return invalidParams
  14154. }
  14155. return nil
  14156. }
  14157. // SetBucket sets the Bucket field's value.
  14158. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  14159. s.Bucket = &v
  14160. return s
  14161. }
  14162. func (s *PutBucketReplicationInput) getBucket() (v string) {
  14163. if s.Bucket == nil {
  14164. return v
  14165. }
  14166. return *s.Bucket
  14167. }
  14168. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  14169. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  14170. s.ReplicationConfiguration = v
  14171. return s
  14172. }
  14173. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplicationOutput
  14174. type PutBucketReplicationOutput struct {
  14175. _ struct{} `type:"structure"`
  14176. }
  14177. // String returns the string representation
  14178. func (s PutBucketReplicationOutput) String() string {
  14179. return awsutil.Prettify(s)
  14180. }
  14181. // GoString returns the string representation
  14182. func (s PutBucketReplicationOutput) GoString() string {
  14183. return s.String()
  14184. }
  14185. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentRequest
  14186. type PutBucketRequestPaymentInput struct {
  14187. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  14188. // Bucket is a required field
  14189. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14190. // RequestPaymentConfiguration is a required field
  14191. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14192. }
  14193. // String returns the string representation
  14194. func (s PutBucketRequestPaymentInput) String() string {
  14195. return awsutil.Prettify(s)
  14196. }
  14197. // GoString returns the string representation
  14198. func (s PutBucketRequestPaymentInput) GoString() string {
  14199. return s.String()
  14200. }
  14201. // Validate inspects the fields of the type to determine if they are valid.
  14202. func (s *PutBucketRequestPaymentInput) Validate() error {
  14203. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  14204. if s.Bucket == nil {
  14205. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14206. }
  14207. if s.RequestPaymentConfiguration == nil {
  14208. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  14209. }
  14210. if s.RequestPaymentConfiguration != nil {
  14211. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  14212. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  14213. }
  14214. }
  14215. if invalidParams.Len() > 0 {
  14216. return invalidParams
  14217. }
  14218. return nil
  14219. }
  14220. // SetBucket sets the Bucket field's value.
  14221. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  14222. s.Bucket = &v
  14223. return s
  14224. }
  14225. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  14226. if s.Bucket == nil {
  14227. return v
  14228. }
  14229. return *s.Bucket
  14230. }
  14231. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  14232. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  14233. s.RequestPaymentConfiguration = v
  14234. return s
  14235. }
  14236. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPaymentOutput
  14237. type PutBucketRequestPaymentOutput struct {
  14238. _ struct{} `type:"structure"`
  14239. }
  14240. // String returns the string representation
  14241. func (s PutBucketRequestPaymentOutput) String() string {
  14242. return awsutil.Prettify(s)
  14243. }
  14244. // GoString returns the string representation
  14245. func (s PutBucketRequestPaymentOutput) GoString() string {
  14246. return s.String()
  14247. }
  14248. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingRequest
  14249. type PutBucketTaggingInput struct {
  14250. _ struct{} `type:"structure" payload:"Tagging"`
  14251. // Bucket is a required field
  14252. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14253. // Tagging is a required field
  14254. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14255. }
  14256. // String returns the string representation
  14257. func (s PutBucketTaggingInput) String() string {
  14258. return awsutil.Prettify(s)
  14259. }
  14260. // GoString returns the string representation
  14261. func (s PutBucketTaggingInput) GoString() string {
  14262. return s.String()
  14263. }
  14264. // Validate inspects the fields of the type to determine if they are valid.
  14265. func (s *PutBucketTaggingInput) Validate() error {
  14266. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  14267. if s.Bucket == nil {
  14268. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14269. }
  14270. if s.Tagging == nil {
  14271. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  14272. }
  14273. if s.Tagging != nil {
  14274. if err := s.Tagging.Validate(); err != nil {
  14275. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14276. }
  14277. }
  14278. if invalidParams.Len() > 0 {
  14279. return invalidParams
  14280. }
  14281. return nil
  14282. }
  14283. // SetBucket sets the Bucket field's value.
  14284. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  14285. s.Bucket = &v
  14286. return s
  14287. }
  14288. func (s *PutBucketTaggingInput) getBucket() (v string) {
  14289. if s.Bucket == nil {
  14290. return v
  14291. }
  14292. return *s.Bucket
  14293. }
  14294. // SetTagging sets the Tagging field's value.
  14295. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  14296. s.Tagging = v
  14297. return s
  14298. }
  14299. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTaggingOutput
  14300. type PutBucketTaggingOutput struct {
  14301. _ struct{} `type:"structure"`
  14302. }
  14303. // String returns the string representation
  14304. func (s PutBucketTaggingOutput) String() string {
  14305. return awsutil.Prettify(s)
  14306. }
  14307. // GoString returns the string representation
  14308. func (s PutBucketTaggingOutput) GoString() string {
  14309. return s.String()
  14310. }
  14311. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningRequest
  14312. type PutBucketVersioningInput struct {
  14313. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  14314. // Bucket is a required field
  14315. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14316. // The concatenation of the authentication device's serial number, a space,
  14317. // and the value that is displayed on your authentication device.
  14318. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  14319. // VersioningConfiguration is a required field
  14320. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14321. }
  14322. // String returns the string representation
  14323. func (s PutBucketVersioningInput) String() string {
  14324. return awsutil.Prettify(s)
  14325. }
  14326. // GoString returns the string representation
  14327. func (s PutBucketVersioningInput) GoString() string {
  14328. return s.String()
  14329. }
  14330. // Validate inspects the fields of the type to determine if they are valid.
  14331. func (s *PutBucketVersioningInput) Validate() error {
  14332. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  14333. if s.Bucket == nil {
  14334. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14335. }
  14336. if s.VersioningConfiguration == nil {
  14337. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  14338. }
  14339. if invalidParams.Len() > 0 {
  14340. return invalidParams
  14341. }
  14342. return nil
  14343. }
  14344. // SetBucket sets the Bucket field's value.
  14345. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  14346. s.Bucket = &v
  14347. return s
  14348. }
  14349. func (s *PutBucketVersioningInput) getBucket() (v string) {
  14350. if s.Bucket == nil {
  14351. return v
  14352. }
  14353. return *s.Bucket
  14354. }
  14355. // SetMFA sets the MFA field's value.
  14356. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  14357. s.MFA = &v
  14358. return s
  14359. }
  14360. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  14361. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  14362. s.VersioningConfiguration = v
  14363. return s
  14364. }
  14365. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioningOutput
  14366. type PutBucketVersioningOutput struct {
  14367. _ struct{} `type:"structure"`
  14368. }
  14369. // String returns the string representation
  14370. func (s PutBucketVersioningOutput) String() string {
  14371. return awsutil.Prettify(s)
  14372. }
  14373. // GoString returns the string representation
  14374. func (s PutBucketVersioningOutput) GoString() string {
  14375. return s.String()
  14376. }
  14377. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteRequest
  14378. type PutBucketWebsiteInput struct {
  14379. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  14380. // Bucket is a required field
  14381. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14382. // WebsiteConfiguration is a required field
  14383. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14384. }
  14385. // String returns the string representation
  14386. func (s PutBucketWebsiteInput) String() string {
  14387. return awsutil.Prettify(s)
  14388. }
  14389. // GoString returns the string representation
  14390. func (s PutBucketWebsiteInput) GoString() string {
  14391. return s.String()
  14392. }
  14393. // Validate inspects the fields of the type to determine if they are valid.
  14394. func (s *PutBucketWebsiteInput) Validate() error {
  14395. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  14396. if s.Bucket == nil {
  14397. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14398. }
  14399. if s.WebsiteConfiguration == nil {
  14400. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  14401. }
  14402. if s.WebsiteConfiguration != nil {
  14403. if err := s.WebsiteConfiguration.Validate(); err != nil {
  14404. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  14405. }
  14406. }
  14407. if invalidParams.Len() > 0 {
  14408. return invalidParams
  14409. }
  14410. return nil
  14411. }
  14412. // SetBucket sets the Bucket field's value.
  14413. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  14414. s.Bucket = &v
  14415. return s
  14416. }
  14417. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  14418. if s.Bucket == nil {
  14419. return v
  14420. }
  14421. return *s.Bucket
  14422. }
  14423. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  14424. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  14425. s.WebsiteConfiguration = v
  14426. return s
  14427. }
  14428. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsiteOutput
  14429. type PutBucketWebsiteOutput struct {
  14430. _ struct{} `type:"structure"`
  14431. }
  14432. // String returns the string representation
  14433. func (s PutBucketWebsiteOutput) String() string {
  14434. return awsutil.Prettify(s)
  14435. }
  14436. // GoString returns the string representation
  14437. func (s PutBucketWebsiteOutput) GoString() string {
  14438. return s.String()
  14439. }
  14440. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclRequest
  14441. type PutObjectAclInput struct {
  14442. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  14443. // The canned ACL to apply to the object.
  14444. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  14445. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14446. // Bucket is a required field
  14447. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14448. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  14449. // bucket.
  14450. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  14451. // Allows grantee to list the objects in the bucket.
  14452. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  14453. // Allows grantee to read the bucket ACL.
  14454. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  14455. // Allows grantee to create, overwrite, and delete any object in the bucket.
  14456. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  14457. // Allows grantee to write the ACL for the applicable bucket.
  14458. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  14459. // Key is a required field
  14460. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14461. // Confirms that the requester knows that she or he will be charged for the
  14462. // request. Bucket owners need not specify this parameter in their requests.
  14463. // Documentation on downloading objects from requester pays buckets can be found
  14464. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14465. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14466. // VersionId used to reference a specific version of the object.
  14467. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  14468. }
  14469. // String returns the string representation
  14470. func (s PutObjectAclInput) String() string {
  14471. return awsutil.Prettify(s)
  14472. }
  14473. // GoString returns the string representation
  14474. func (s PutObjectAclInput) GoString() string {
  14475. return s.String()
  14476. }
  14477. // Validate inspects the fields of the type to determine if they are valid.
  14478. func (s *PutObjectAclInput) Validate() error {
  14479. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  14480. if s.Bucket == nil {
  14481. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14482. }
  14483. if s.Key == nil {
  14484. invalidParams.Add(request.NewErrParamRequired("Key"))
  14485. }
  14486. if s.Key != nil && len(*s.Key) < 1 {
  14487. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14488. }
  14489. if s.AccessControlPolicy != nil {
  14490. if err := s.AccessControlPolicy.Validate(); err != nil {
  14491. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  14492. }
  14493. }
  14494. if invalidParams.Len() > 0 {
  14495. return invalidParams
  14496. }
  14497. return nil
  14498. }
  14499. // SetACL sets the ACL field's value.
  14500. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  14501. s.ACL = &v
  14502. return s
  14503. }
  14504. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  14505. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  14506. s.AccessControlPolicy = v
  14507. return s
  14508. }
  14509. // SetBucket sets the Bucket field's value.
  14510. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  14511. s.Bucket = &v
  14512. return s
  14513. }
  14514. func (s *PutObjectAclInput) getBucket() (v string) {
  14515. if s.Bucket == nil {
  14516. return v
  14517. }
  14518. return *s.Bucket
  14519. }
  14520. // SetGrantFullControl sets the GrantFullControl field's value.
  14521. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  14522. s.GrantFullControl = &v
  14523. return s
  14524. }
  14525. // SetGrantRead sets the GrantRead field's value.
  14526. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  14527. s.GrantRead = &v
  14528. return s
  14529. }
  14530. // SetGrantReadACP sets the GrantReadACP field's value.
  14531. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  14532. s.GrantReadACP = &v
  14533. return s
  14534. }
  14535. // SetGrantWrite sets the GrantWrite field's value.
  14536. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  14537. s.GrantWrite = &v
  14538. return s
  14539. }
  14540. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14541. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  14542. s.GrantWriteACP = &v
  14543. return s
  14544. }
  14545. // SetKey sets the Key field's value.
  14546. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  14547. s.Key = &v
  14548. return s
  14549. }
  14550. // SetRequestPayer sets the RequestPayer field's value.
  14551. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  14552. s.RequestPayer = &v
  14553. return s
  14554. }
  14555. // SetVersionId sets the VersionId field's value.
  14556. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  14557. s.VersionId = &v
  14558. return s
  14559. }
  14560. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAclOutput
  14561. type PutObjectAclOutput struct {
  14562. _ struct{} `type:"structure"`
  14563. // If present, indicates that the requester was successfully charged for the
  14564. // request.
  14565. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14566. }
  14567. // String returns the string representation
  14568. func (s PutObjectAclOutput) String() string {
  14569. return awsutil.Prettify(s)
  14570. }
  14571. // GoString returns the string representation
  14572. func (s PutObjectAclOutput) GoString() string {
  14573. return s.String()
  14574. }
  14575. // SetRequestCharged sets the RequestCharged field's value.
  14576. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  14577. s.RequestCharged = &v
  14578. return s
  14579. }
  14580. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRequest
  14581. type PutObjectInput struct {
  14582. _ struct{} `type:"structure" payload:"Body"`
  14583. // The canned ACL to apply to the object.
  14584. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  14585. // Object data.
  14586. Body io.ReadSeeker `type:"blob"`
  14587. // Name of the bucket to which the PUT operation was initiated.
  14588. //
  14589. // Bucket is a required field
  14590. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14591. // Specifies caching behavior along the request/reply chain.
  14592. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  14593. // Specifies presentational information for the object.
  14594. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  14595. // Specifies what content encodings have been applied to the object and thus
  14596. // what decoding mechanisms must be applied to obtain the media-type referenced
  14597. // by the Content-Type header field.
  14598. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  14599. // The language the content is in.
  14600. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  14601. // Size of the body in bytes. This parameter is useful when the size of the
  14602. // body cannot be determined automatically.
  14603. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  14604. // A standard MIME type describing the format of the object data.
  14605. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  14606. // The date and time at which the object is no longer cacheable.
  14607. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  14608. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  14609. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  14610. // Allows grantee to read the object data and its metadata.
  14611. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  14612. // Allows grantee to read the object ACL.
  14613. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  14614. // Allows grantee to write the ACL for the applicable object.
  14615. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  14616. // Object key for which the PUT operation was initiated.
  14617. //
  14618. // Key is a required field
  14619. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14620. // A map of metadata to store with the object in S3.
  14621. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  14622. // Confirms that the requester knows that she or he will be charged for the
  14623. // request. Bucket owners need not specify this parameter in their requests.
  14624. // Documentation on downloading objects from requester pays buckets can be found
  14625. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  14626. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  14627. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  14628. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  14629. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  14630. // data. This value is used to store the object and then it is discarded; Amazon
  14631. // does not store the encryption key. The key must be appropriate for use with
  14632. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  14633. // header.
  14634. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  14635. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  14636. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  14637. // key was transmitted without error.
  14638. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  14639. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  14640. // requests for an object protected by AWS KMS will fail if not made via SSL
  14641. // or using SigV4. Documentation on configuring any of the officially supported
  14642. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  14643. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  14644. // The Server-side encryption algorithm used when storing this object in S3
  14645. // (e.g., AES256, aws:kms).
  14646. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  14647. // The type of storage to use for the object. Defaults to 'STANDARD'.
  14648. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  14649. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  14650. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  14651. // If the bucket is configured as a website, redirects requests for this object
  14652. // to another object in the same bucket or to an external URL. Amazon S3 stores
  14653. // the value of this header in the object metadata.
  14654. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  14655. }
  14656. // String returns the string representation
  14657. func (s PutObjectInput) String() string {
  14658. return awsutil.Prettify(s)
  14659. }
  14660. // GoString returns the string representation
  14661. func (s PutObjectInput) GoString() string {
  14662. return s.String()
  14663. }
  14664. // Validate inspects the fields of the type to determine if they are valid.
  14665. func (s *PutObjectInput) Validate() error {
  14666. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  14667. if s.Bucket == nil {
  14668. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14669. }
  14670. if s.Key == nil {
  14671. invalidParams.Add(request.NewErrParamRequired("Key"))
  14672. }
  14673. if s.Key != nil && len(*s.Key) < 1 {
  14674. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14675. }
  14676. if invalidParams.Len() > 0 {
  14677. return invalidParams
  14678. }
  14679. return nil
  14680. }
  14681. // SetACL sets the ACL field's value.
  14682. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  14683. s.ACL = &v
  14684. return s
  14685. }
  14686. // SetBody sets the Body field's value.
  14687. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  14688. s.Body = v
  14689. return s
  14690. }
  14691. // SetBucket sets the Bucket field's value.
  14692. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  14693. s.Bucket = &v
  14694. return s
  14695. }
  14696. func (s *PutObjectInput) getBucket() (v string) {
  14697. if s.Bucket == nil {
  14698. return v
  14699. }
  14700. return *s.Bucket
  14701. }
  14702. // SetCacheControl sets the CacheControl field's value.
  14703. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  14704. s.CacheControl = &v
  14705. return s
  14706. }
  14707. // SetContentDisposition sets the ContentDisposition field's value.
  14708. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  14709. s.ContentDisposition = &v
  14710. return s
  14711. }
  14712. // SetContentEncoding sets the ContentEncoding field's value.
  14713. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  14714. s.ContentEncoding = &v
  14715. return s
  14716. }
  14717. // SetContentLanguage sets the ContentLanguage field's value.
  14718. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  14719. s.ContentLanguage = &v
  14720. return s
  14721. }
  14722. // SetContentLength sets the ContentLength field's value.
  14723. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  14724. s.ContentLength = &v
  14725. return s
  14726. }
  14727. // SetContentType sets the ContentType field's value.
  14728. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  14729. s.ContentType = &v
  14730. return s
  14731. }
  14732. // SetExpires sets the Expires field's value.
  14733. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  14734. s.Expires = &v
  14735. return s
  14736. }
  14737. // SetGrantFullControl sets the GrantFullControl field's value.
  14738. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  14739. s.GrantFullControl = &v
  14740. return s
  14741. }
  14742. // SetGrantRead sets the GrantRead field's value.
  14743. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  14744. s.GrantRead = &v
  14745. return s
  14746. }
  14747. // SetGrantReadACP sets the GrantReadACP field's value.
  14748. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  14749. s.GrantReadACP = &v
  14750. return s
  14751. }
  14752. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14753. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  14754. s.GrantWriteACP = &v
  14755. return s
  14756. }
  14757. // SetKey sets the Key field's value.
  14758. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  14759. s.Key = &v
  14760. return s
  14761. }
  14762. // SetMetadata sets the Metadata field's value.
  14763. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  14764. s.Metadata = v
  14765. return s
  14766. }
  14767. // SetRequestPayer sets the RequestPayer field's value.
  14768. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  14769. s.RequestPayer = &v
  14770. return s
  14771. }
  14772. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  14773. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  14774. s.SSECustomerAlgorithm = &v
  14775. return s
  14776. }
  14777. // SetSSECustomerKey sets the SSECustomerKey field's value.
  14778. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  14779. s.SSECustomerKey = &v
  14780. return s
  14781. }
  14782. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  14783. if s.SSECustomerKey == nil {
  14784. return v
  14785. }
  14786. return *s.SSECustomerKey
  14787. }
  14788. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  14789. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  14790. s.SSECustomerKeyMD5 = &v
  14791. return s
  14792. }
  14793. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  14794. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  14795. s.SSEKMSKeyId = &v
  14796. return s
  14797. }
  14798. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  14799. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  14800. s.ServerSideEncryption = &v
  14801. return s
  14802. }
  14803. // SetStorageClass sets the StorageClass field's value.
  14804. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  14805. s.StorageClass = &v
  14806. return s
  14807. }
  14808. // SetTagging sets the Tagging field's value.
  14809. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  14810. s.Tagging = &v
  14811. return s
  14812. }
  14813. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  14814. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  14815. s.WebsiteRedirectLocation = &v
  14816. return s
  14817. }
  14818. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectOutput
  14819. type PutObjectOutput struct {
  14820. _ struct{} `type:"structure"`
  14821. // Entity tag for the uploaded object.
  14822. ETag *string `location:"header" locationName:"ETag" type:"string"`
  14823. // If the object expiration is configured, this will contain the expiration
  14824. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  14825. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  14826. // If present, indicates that the requester was successfully charged for the
  14827. // request.
  14828. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  14829. // If server-side encryption with a customer-provided encryption key was requested,
  14830. // the response will include this header confirming the encryption algorithm
  14831. // used.
  14832. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  14833. // If server-side encryption with a customer-provided encryption key was requested,
  14834. // the response will include this header to provide round trip message integrity
  14835. // verification of the customer-provided encryption key.
  14836. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  14837. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  14838. // encryption key that was used for the object.
  14839. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  14840. // The Server-side encryption algorithm used when storing this object in S3
  14841. // (e.g., AES256, aws:kms).
  14842. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  14843. // Version of the object.
  14844. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  14845. }
  14846. // String returns the string representation
  14847. func (s PutObjectOutput) String() string {
  14848. return awsutil.Prettify(s)
  14849. }
  14850. // GoString returns the string representation
  14851. func (s PutObjectOutput) GoString() string {
  14852. return s.String()
  14853. }
  14854. // SetETag sets the ETag field's value.
  14855. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  14856. s.ETag = &v
  14857. return s
  14858. }
  14859. // SetExpiration sets the Expiration field's value.
  14860. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  14861. s.Expiration = &v
  14862. return s
  14863. }
  14864. // SetRequestCharged sets the RequestCharged field's value.
  14865. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  14866. s.RequestCharged = &v
  14867. return s
  14868. }
  14869. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  14870. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  14871. s.SSECustomerAlgorithm = &v
  14872. return s
  14873. }
  14874. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  14875. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  14876. s.SSECustomerKeyMD5 = &v
  14877. return s
  14878. }
  14879. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  14880. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  14881. s.SSEKMSKeyId = &v
  14882. return s
  14883. }
  14884. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  14885. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  14886. s.ServerSideEncryption = &v
  14887. return s
  14888. }
  14889. // SetVersionId sets the VersionId field's value.
  14890. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  14891. s.VersionId = &v
  14892. return s
  14893. }
  14894. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest
  14895. type PutObjectTaggingInput struct {
  14896. _ struct{} `type:"structure" payload:"Tagging"`
  14897. // Bucket is a required field
  14898. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14899. // Key is a required field
  14900. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  14901. // Tagging is a required field
  14902. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14903. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  14904. }
  14905. // String returns the string representation
  14906. func (s PutObjectTaggingInput) String() string {
  14907. return awsutil.Prettify(s)
  14908. }
  14909. // GoString returns the string representation
  14910. func (s PutObjectTaggingInput) GoString() string {
  14911. return s.String()
  14912. }
  14913. // Validate inspects the fields of the type to determine if they are valid.
  14914. func (s *PutObjectTaggingInput) Validate() error {
  14915. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  14916. if s.Bucket == nil {
  14917. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14918. }
  14919. if s.Key == nil {
  14920. invalidParams.Add(request.NewErrParamRequired("Key"))
  14921. }
  14922. if s.Key != nil && len(*s.Key) < 1 {
  14923. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  14924. }
  14925. if s.Tagging == nil {
  14926. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  14927. }
  14928. if s.Tagging != nil {
  14929. if err := s.Tagging.Validate(); err != nil {
  14930. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14931. }
  14932. }
  14933. if invalidParams.Len() > 0 {
  14934. return invalidParams
  14935. }
  14936. return nil
  14937. }
  14938. // SetBucket sets the Bucket field's value.
  14939. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  14940. s.Bucket = &v
  14941. return s
  14942. }
  14943. func (s *PutObjectTaggingInput) getBucket() (v string) {
  14944. if s.Bucket == nil {
  14945. return v
  14946. }
  14947. return *s.Bucket
  14948. }
  14949. // SetKey sets the Key field's value.
  14950. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  14951. s.Key = &v
  14952. return s
  14953. }
  14954. // SetTagging sets the Tagging field's value.
  14955. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  14956. s.Tagging = v
  14957. return s
  14958. }
  14959. // SetVersionId sets the VersionId field's value.
  14960. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  14961. s.VersionId = &v
  14962. return s
  14963. }
  14964. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingOutput
  14965. type PutObjectTaggingOutput struct {
  14966. _ struct{} `type:"structure"`
  14967. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  14968. }
  14969. // String returns the string representation
  14970. func (s PutObjectTaggingOutput) String() string {
  14971. return awsutil.Prettify(s)
  14972. }
  14973. // GoString returns the string representation
  14974. func (s PutObjectTaggingOutput) GoString() string {
  14975. return s.String()
  14976. }
  14977. // SetVersionId sets the VersionId field's value.
  14978. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  14979. s.VersionId = &v
  14980. return s
  14981. }
  14982. // Container for specifying an configuration when you want Amazon S3 to publish
  14983. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  14984. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfiguration
  14985. type QueueConfiguration struct {
  14986. _ struct{} `type:"structure"`
  14987. // Events is a required field
  14988. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  14989. // Container for object key name filtering rules. For information about key
  14990. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  14991. Filter *NotificationConfigurationFilter `type:"structure"`
  14992. // Optional unique identifier for configurations in a notification configuration.
  14993. // If you don't provide one, Amazon S3 will assign an ID.
  14994. Id *string `type:"string"`
  14995. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  14996. // events of specified type.
  14997. //
  14998. // QueueArn is a required field
  14999. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  15000. }
  15001. // String returns the string representation
  15002. func (s QueueConfiguration) String() string {
  15003. return awsutil.Prettify(s)
  15004. }
  15005. // GoString returns the string representation
  15006. func (s QueueConfiguration) GoString() string {
  15007. return s.String()
  15008. }
  15009. // Validate inspects the fields of the type to determine if they are valid.
  15010. func (s *QueueConfiguration) Validate() error {
  15011. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  15012. if s.Events == nil {
  15013. invalidParams.Add(request.NewErrParamRequired("Events"))
  15014. }
  15015. if s.QueueArn == nil {
  15016. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  15017. }
  15018. if invalidParams.Len() > 0 {
  15019. return invalidParams
  15020. }
  15021. return nil
  15022. }
  15023. // SetEvents sets the Events field's value.
  15024. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  15025. s.Events = v
  15026. return s
  15027. }
  15028. // SetFilter sets the Filter field's value.
  15029. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  15030. s.Filter = v
  15031. return s
  15032. }
  15033. // SetId sets the Id field's value.
  15034. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  15035. s.Id = &v
  15036. return s
  15037. }
  15038. // SetQueueArn sets the QueueArn field's value.
  15039. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  15040. s.QueueArn = &v
  15041. return s
  15042. }
  15043. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/QueueConfigurationDeprecated
  15044. type QueueConfigurationDeprecated struct {
  15045. _ struct{} `type:"structure"`
  15046. // Bucket event for which to send notifications.
  15047. Event *string `deprecated:"true" type:"string" enum:"Event"`
  15048. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  15049. // Optional unique identifier for configurations in a notification configuration.
  15050. // If you don't provide one, Amazon S3 will assign an ID.
  15051. Id *string `type:"string"`
  15052. Queue *string `type:"string"`
  15053. }
  15054. // String returns the string representation
  15055. func (s QueueConfigurationDeprecated) String() string {
  15056. return awsutil.Prettify(s)
  15057. }
  15058. // GoString returns the string representation
  15059. func (s QueueConfigurationDeprecated) GoString() string {
  15060. return s.String()
  15061. }
  15062. // SetEvent sets the Event field's value.
  15063. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  15064. s.Event = &v
  15065. return s
  15066. }
  15067. // SetEvents sets the Events field's value.
  15068. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  15069. s.Events = v
  15070. return s
  15071. }
  15072. // SetId sets the Id field's value.
  15073. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  15074. s.Id = &v
  15075. return s
  15076. }
  15077. // SetQueue sets the Queue field's value.
  15078. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  15079. s.Queue = &v
  15080. return s
  15081. }
  15082. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect
  15083. type Redirect struct {
  15084. _ struct{} `type:"structure"`
  15085. // The host name to use in the redirect request.
  15086. HostName *string `type:"string"`
  15087. // The HTTP redirect code to use on the response. Not required if one of the
  15088. // siblings is present.
  15089. HttpRedirectCode *string `type:"string"`
  15090. // Protocol to use (http, https) when redirecting requests. The default is the
  15091. // protocol that is used in the original request.
  15092. Protocol *string `type:"string" enum:"Protocol"`
  15093. // The object key prefix to use in the redirect request. For example, to redirect
  15094. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  15095. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  15096. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  15097. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  15098. // is not provided.
  15099. ReplaceKeyPrefixWith *string `type:"string"`
  15100. // The specific object key to use in the redirect request. For example, redirect
  15101. // request to error.html. Not required if one of the sibling is present. Can
  15102. // be present only if ReplaceKeyPrefixWith is not provided.
  15103. ReplaceKeyWith *string `type:"string"`
  15104. }
  15105. // String returns the string representation
  15106. func (s Redirect) String() string {
  15107. return awsutil.Prettify(s)
  15108. }
  15109. // GoString returns the string representation
  15110. func (s Redirect) GoString() string {
  15111. return s.String()
  15112. }
  15113. // SetHostName sets the HostName field's value.
  15114. func (s *Redirect) SetHostName(v string) *Redirect {
  15115. s.HostName = &v
  15116. return s
  15117. }
  15118. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  15119. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  15120. s.HttpRedirectCode = &v
  15121. return s
  15122. }
  15123. // SetProtocol sets the Protocol field's value.
  15124. func (s *Redirect) SetProtocol(v string) *Redirect {
  15125. s.Protocol = &v
  15126. return s
  15127. }
  15128. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  15129. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  15130. s.ReplaceKeyPrefixWith = &v
  15131. return s
  15132. }
  15133. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  15134. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  15135. s.ReplaceKeyWith = &v
  15136. return s
  15137. }
  15138. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RedirectAllRequestsTo
  15139. type RedirectAllRequestsTo struct {
  15140. _ struct{} `type:"structure"`
  15141. // Name of the host where requests will be redirected.
  15142. //
  15143. // HostName is a required field
  15144. HostName *string `type:"string" required:"true"`
  15145. // Protocol to use (http, https) when redirecting requests. The default is the
  15146. // protocol that is used in the original request.
  15147. Protocol *string `type:"string" enum:"Protocol"`
  15148. }
  15149. // String returns the string representation
  15150. func (s RedirectAllRequestsTo) String() string {
  15151. return awsutil.Prettify(s)
  15152. }
  15153. // GoString returns the string representation
  15154. func (s RedirectAllRequestsTo) GoString() string {
  15155. return s.String()
  15156. }
  15157. // Validate inspects the fields of the type to determine if they are valid.
  15158. func (s *RedirectAllRequestsTo) Validate() error {
  15159. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  15160. if s.HostName == nil {
  15161. invalidParams.Add(request.NewErrParamRequired("HostName"))
  15162. }
  15163. if invalidParams.Len() > 0 {
  15164. return invalidParams
  15165. }
  15166. return nil
  15167. }
  15168. // SetHostName sets the HostName field's value.
  15169. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  15170. s.HostName = &v
  15171. return s
  15172. }
  15173. // SetProtocol sets the Protocol field's value.
  15174. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  15175. s.Protocol = &v
  15176. return s
  15177. }
  15178. // Container for replication rules. You can add as many as 1,000 rules. Total
  15179. // replication configuration size can be up to 2 MB.
  15180. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationConfiguration
  15181. type ReplicationConfiguration struct {
  15182. _ struct{} `type:"structure"`
  15183. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  15184. // the objects.
  15185. //
  15186. // Role is a required field
  15187. Role *string `type:"string" required:"true"`
  15188. // Container for information about a particular replication rule. Replication
  15189. // configuration must have at least one rule and can contain up to 1,000 rules.
  15190. //
  15191. // Rules is a required field
  15192. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  15193. }
  15194. // String returns the string representation
  15195. func (s ReplicationConfiguration) String() string {
  15196. return awsutil.Prettify(s)
  15197. }
  15198. // GoString returns the string representation
  15199. func (s ReplicationConfiguration) GoString() string {
  15200. return s.String()
  15201. }
  15202. // Validate inspects the fields of the type to determine if they are valid.
  15203. func (s *ReplicationConfiguration) Validate() error {
  15204. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  15205. if s.Role == nil {
  15206. invalidParams.Add(request.NewErrParamRequired("Role"))
  15207. }
  15208. if s.Rules == nil {
  15209. invalidParams.Add(request.NewErrParamRequired("Rules"))
  15210. }
  15211. if s.Rules != nil {
  15212. for i, v := range s.Rules {
  15213. if v == nil {
  15214. continue
  15215. }
  15216. if err := v.Validate(); err != nil {
  15217. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  15218. }
  15219. }
  15220. }
  15221. if invalidParams.Len() > 0 {
  15222. return invalidParams
  15223. }
  15224. return nil
  15225. }
  15226. // SetRole sets the Role field's value.
  15227. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  15228. s.Role = &v
  15229. return s
  15230. }
  15231. // SetRules sets the Rules field's value.
  15232. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  15233. s.Rules = v
  15234. return s
  15235. }
  15236. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule
  15237. type ReplicationRule struct {
  15238. _ struct{} `type:"structure"`
  15239. // Destination is a required field
  15240. Destination *Destination `type:"structure" required:"true"`
  15241. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  15242. ID *string `type:"string"`
  15243. // Object keyname prefix identifying one or more objects to which the rule applies.
  15244. // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes
  15245. // are not supported.
  15246. //
  15247. // Prefix is a required field
  15248. Prefix *string `type:"string" required:"true"`
  15249. // The rule is ignored if status is not Enabled.
  15250. //
  15251. // Status is a required field
  15252. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  15253. }
  15254. // String returns the string representation
  15255. func (s ReplicationRule) String() string {
  15256. return awsutil.Prettify(s)
  15257. }
  15258. // GoString returns the string representation
  15259. func (s ReplicationRule) GoString() string {
  15260. return s.String()
  15261. }
  15262. // Validate inspects the fields of the type to determine if they are valid.
  15263. func (s *ReplicationRule) Validate() error {
  15264. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  15265. if s.Destination == nil {
  15266. invalidParams.Add(request.NewErrParamRequired("Destination"))
  15267. }
  15268. if s.Prefix == nil {
  15269. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  15270. }
  15271. if s.Status == nil {
  15272. invalidParams.Add(request.NewErrParamRequired("Status"))
  15273. }
  15274. if s.Destination != nil {
  15275. if err := s.Destination.Validate(); err != nil {
  15276. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  15277. }
  15278. }
  15279. if invalidParams.Len() > 0 {
  15280. return invalidParams
  15281. }
  15282. return nil
  15283. }
  15284. // SetDestination sets the Destination field's value.
  15285. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  15286. s.Destination = v
  15287. return s
  15288. }
  15289. // SetID sets the ID field's value.
  15290. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  15291. s.ID = &v
  15292. return s
  15293. }
  15294. // SetPrefix sets the Prefix field's value.
  15295. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  15296. s.Prefix = &v
  15297. return s
  15298. }
  15299. // SetStatus sets the Status field's value.
  15300. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  15301. s.Status = &v
  15302. return s
  15303. }
  15304. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RequestPaymentConfiguration
  15305. type RequestPaymentConfiguration struct {
  15306. _ struct{} `type:"structure"`
  15307. // Specifies who pays for the download and request fees.
  15308. //
  15309. // Payer is a required field
  15310. Payer *string `type:"string" required:"true" enum:"Payer"`
  15311. }
  15312. // String returns the string representation
  15313. func (s RequestPaymentConfiguration) String() string {
  15314. return awsutil.Prettify(s)
  15315. }
  15316. // GoString returns the string representation
  15317. func (s RequestPaymentConfiguration) GoString() string {
  15318. return s.String()
  15319. }
  15320. // Validate inspects the fields of the type to determine if they are valid.
  15321. func (s *RequestPaymentConfiguration) Validate() error {
  15322. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  15323. if s.Payer == nil {
  15324. invalidParams.Add(request.NewErrParamRequired("Payer"))
  15325. }
  15326. if invalidParams.Len() > 0 {
  15327. return invalidParams
  15328. }
  15329. return nil
  15330. }
  15331. // SetPayer sets the Payer field's value.
  15332. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  15333. s.Payer = &v
  15334. return s
  15335. }
  15336. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectRequest
  15337. type RestoreObjectInput struct {
  15338. _ struct{} `type:"structure" payload:"RestoreRequest"`
  15339. // Bucket is a required field
  15340. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15341. // Key is a required field
  15342. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15343. // Confirms that the requester knows that she or he will be charged for the
  15344. // request. Bucket owners need not specify this parameter in their requests.
  15345. // Documentation on downloading objects from requester pays buckets can be found
  15346. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15347. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15348. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15349. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15350. }
  15351. // String returns the string representation
  15352. func (s RestoreObjectInput) String() string {
  15353. return awsutil.Prettify(s)
  15354. }
  15355. // GoString returns the string representation
  15356. func (s RestoreObjectInput) GoString() string {
  15357. return s.String()
  15358. }
  15359. // Validate inspects the fields of the type to determine if they are valid.
  15360. func (s *RestoreObjectInput) Validate() error {
  15361. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  15362. if s.Bucket == nil {
  15363. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15364. }
  15365. if s.Key == nil {
  15366. invalidParams.Add(request.NewErrParamRequired("Key"))
  15367. }
  15368. if s.Key != nil && len(*s.Key) < 1 {
  15369. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15370. }
  15371. if s.RestoreRequest != nil {
  15372. if err := s.RestoreRequest.Validate(); err != nil {
  15373. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  15374. }
  15375. }
  15376. if invalidParams.Len() > 0 {
  15377. return invalidParams
  15378. }
  15379. return nil
  15380. }
  15381. // SetBucket sets the Bucket field's value.
  15382. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  15383. s.Bucket = &v
  15384. return s
  15385. }
  15386. func (s *RestoreObjectInput) getBucket() (v string) {
  15387. if s.Bucket == nil {
  15388. return v
  15389. }
  15390. return *s.Bucket
  15391. }
  15392. // SetKey sets the Key field's value.
  15393. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  15394. s.Key = &v
  15395. return s
  15396. }
  15397. // SetRequestPayer sets the RequestPayer field's value.
  15398. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  15399. s.RequestPayer = &v
  15400. return s
  15401. }
  15402. // SetRestoreRequest sets the RestoreRequest field's value.
  15403. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  15404. s.RestoreRequest = v
  15405. return s
  15406. }
  15407. // SetVersionId sets the VersionId field's value.
  15408. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  15409. s.VersionId = &v
  15410. return s
  15411. }
  15412. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObjectOutput
  15413. type RestoreObjectOutput struct {
  15414. _ struct{} `type:"structure"`
  15415. // If present, indicates that the requester was successfully charged for the
  15416. // request.
  15417. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15418. }
  15419. // String returns the string representation
  15420. func (s RestoreObjectOutput) String() string {
  15421. return awsutil.Prettify(s)
  15422. }
  15423. // GoString returns the string representation
  15424. func (s RestoreObjectOutput) GoString() string {
  15425. return s.String()
  15426. }
  15427. // SetRequestCharged sets the RequestCharged field's value.
  15428. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  15429. s.RequestCharged = &v
  15430. return s
  15431. }
  15432. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreRequest
  15433. type RestoreRequest struct {
  15434. _ struct{} `type:"structure"`
  15435. // Lifetime of the active copy in days
  15436. //
  15437. // Days is a required field
  15438. Days *int64 `type:"integer" required:"true"`
  15439. // Glacier related prameters pertaining to this job.
  15440. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  15441. }
  15442. // String returns the string representation
  15443. func (s RestoreRequest) String() string {
  15444. return awsutil.Prettify(s)
  15445. }
  15446. // GoString returns the string representation
  15447. func (s RestoreRequest) GoString() string {
  15448. return s.String()
  15449. }
  15450. // Validate inspects the fields of the type to determine if they are valid.
  15451. func (s *RestoreRequest) Validate() error {
  15452. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  15453. if s.Days == nil {
  15454. invalidParams.Add(request.NewErrParamRequired("Days"))
  15455. }
  15456. if s.GlacierJobParameters != nil {
  15457. if err := s.GlacierJobParameters.Validate(); err != nil {
  15458. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  15459. }
  15460. }
  15461. if invalidParams.Len() > 0 {
  15462. return invalidParams
  15463. }
  15464. return nil
  15465. }
  15466. // SetDays sets the Days field's value.
  15467. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  15468. s.Days = &v
  15469. return s
  15470. }
  15471. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  15472. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  15473. s.GlacierJobParameters = v
  15474. return s
  15475. }
  15476. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RoutingRule
  15477. type RoutingRule struct {
  15478. _ struct{} `type:"structure"`
  15479. // A container for describing a condition that must be met for the specified
  15480. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  15481. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  15482. // redirect request to another host where you might process the error.
  15483. Condition *Condition `type:"structure"`
  15484. // Container for redirect information. You can redirect requests to another
  15485. // host, to another page, or with another protocol. In the event of an error,
  15486. // you can can specify a different error code to return.
  15487. //
  15488. // Redirect is a required field
  15489. Redirect *Redirect `type:"structure" required:"true"`
  15490. }
  15491. // String returns the string representation
  15492. func (s RoutingRule) String() string {
  15493. return awsutil.Prettify(s)
  15494. }
  15495. // GoString returns the string representation
  15496. func (s RoutingRule) GoString() string {
  15497. return s.String()
  15498. }
  15499. // Validate inspects the fields of the type to determine if they are valid.
  15500. func (s *RoutingRule) Validate() error {
  15501. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  15502. if s.Redirect == nil {
  15503. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  15504. }
  15505. if invalidParams.Len() > 0 {
  15506. return invalidParams
  15507. }
  15508. return nil
  15509. }
  15510. // SetCondition sets the Condition field's value.
  15511. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  15512. s.Condition = v
  15513. return s
  15514. }
  15515. // SetRedirect sets the Redirect field's value.
  15516. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  15517. s.Redirect = v
  15518. return s
  15519. }
  15520. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Rule
  15521. type Rule struct {
  15522. _ struct{} `type:"structure"`
  15523. // Specifies the days since the initiation of an Incomplete Multipart Upload
  15524. // that Lifecycle will wait before permanently removing all parts of the upload.
  15525. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  15526. Expiration *LifecycleExpiration `type:"structure"`
  15527. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  15528. ID *string `type:"string"`
  15529. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  15530. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  15531. // configuration action on a bucket that has versioning enabled (or suspended)
  15532. // to request that Amazon S3 delete noncurrent object versions at a specific
  15533. // period in the object's lifetime.
  15534. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  15535. // Container for the transition rule that describes when noncurrent objects
  15536. // transition to the STANDARD_IA or GLACIER storage class. If your bucket is
  15537. // versioning-enabled (or versioning is suspended), you can set this action
  15538. // to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA
  15539. // or GLACIER storage class at a specific period in the object's lifetime.
  15540. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  15541. // Prefix identifying one or more objects to which the rule applies.
  15542. //
  15543. // Prefix is a required field
  15544. Prefix *string `type:"string" required:"true"`
  15545. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  15546. // is not currently being applied.
  15547. //
  15548. // Status is a required field
  15549. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  15550. Transition *Transition `type:"structure"`
  15551. }
  15552. // String returns the string representation
  15553. func (s Rule) String() string {
  15554. return awsutil.Prettify(s)
  15555. }
  15556. // GoString returns the string representation
  15557. func (s Rule) GoString() string {
  15558. return s.String()
  15559. }
  15560. // Validate inspects the fields of the type to determine if they are valid.
  15561. func (s *Rule) Validate() error {
  15562. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  15563. if s.Prefix == nil {
  15564. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  15565. }
  15566. if s.Status == nil {
  15567. invalidParams.Add(request.NewErrParamRequired("Status"))
  15568. }
  15569. if invalidParams.Len() > 0 {
  15570. return invalidParams
  15571. }
  15572. return nil
  15573. }
  15574. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  15575. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  15576. s.AbortIncompleteMultipartUpload = v
  15577. return s
  15578. }
  15579. // SetExpiration sets the Expiration field's value.
  15580. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  15581. s.Expiration = v
  15582. return s
  15583. }
  15584. // SetID sets the ID field's value.
  15585. func (s *Rule) SetID(v string) *Rule {
  15586. s.ID = &v
  15587. return s
  15588. }
  15589. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  15590. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  15591. s.NoncurrentVersionExpiration = v
  15592. return s
  15593. }
  15594. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  15595. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  15596. s.NoncurrentVersionTransition = v
  15597. return s
  15598. }
  15599. // SetPrefix sets the Prefix field's value.
  15600. func (s *Rule) SetPrefix(v string) *Rule {
  15601. s.Prefix = &v
  15602. return s
  15603. }
  15604. // SetStatus sets the Status field's value.
  15605. func (s *Rule) SetStatus(v string) *Rule {
  15606. s.Status = &v
  15607. return s
  15608. }
  15609. // SetTransition sets the Transition field's value.
  15610. func (s *Rule) SetTransition(v *Transition) *Rule {
  15611. s.Transition = v
  15612. return s
  15613. }
  15614. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysis
  15615. type StorageClassAnalysis struct {
  15616. _ struct{} `type:"structure"`
  15617. // A container used to describe how data related to the storage class analysis
  15618. // should be exported.
  15619. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  15620. }
  15621. // String returns the string representation
  15622. func (s StorageClassAnalysis) String() string {
  15623. return awsutil.Prettify(s)
  15624. }
  15625. // GoString returns the string representation
  15626. func (s StorageClassAnalysis) GoString() string {
  15627. return s.String()
  15628. }
  15629. // Validate inspects the fields of the type to determine if they are valid.
  15630. func (s *StorageClassAnalysis) Validate() error {
  15631. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  15632. if s.DataExport != nil {
  15633. if err := s.DataExport.Validate(); err != nil {
  15634. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  15635. }
  15636. }
  15637. if invalidParams.Len() > 0 {
  15638. return invalidParams
  15639. }
  15640. return nil
  15641. }
  15642. // SetDataExport sets the DataExport field's value.
  15643. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  15644. s.DataExport = v
  15645. return s
  15646. }
  15647. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StorageClassAnalysisDataExport
  15648. type StorageClassAnalysisDataExport struct {
  15649. _ struct{} `type:"structure"`
  15650. // The place to store the data for an analysis.
  15651. //
  15652. // Destination is a required field
  15653. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  15654. // The version of the output schema to use when exporting data. Must be V_1.
  15655. //
  15656. // OutputSchemaVersion is a required field
  15657. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  15658. }
  15659. // String returns the string representation
  15660. func (s StorageClassAnalysisDataExport) String() string {
  15661. return awsutil.Prettify(s)
  15662. }
  15663. // GoString returns the string representation
  15664. func (s StorageClassAnalysisDataExport) GoString() string {
  15665. return s.String()
  15666. }
  15667. // Validate inspects the fields of the type to determine if they are valid.
  15668. func (s *StorageClassAnalysisDataExport) Validate() error {
  15669. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  15670. if s.Destination == nil {
  15671. invalidParams.Add(request.NewErrParamRequired("Destination"))
  15672. }
  15673. if s.OutputSchemaVersion == nil {
  15674. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  15675. }
  15676. if s.Destination != nil {
  15677. if err := s.Destination.Validate(); err != nil {
  15678. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  15679. }
  15680. }
  15681. if invalidParams.Len() > 0 {
  15682. return invalidParams
  15683. }
  15684. return nil
  15685. }
  15686. // SetDestination sets the Destination field's value.
  15687. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  15688. s.Destination = v
  15689. return s
  15690. }
  15691. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  15692. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  15693. s.OutputSchemaVersion = &v
  15694. return s
  15695. }
  15696. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag
  15697. type Tag struct {
  15698. _ struct{} `type:"structure"`
  15699. // Name of the tag.
  15700. //
  15701. // Key is a required field
  15702. Key *string `min:"1" type:"string" required:"true"`
  15703. // Value of the tag.
  15704. //
  15705. // Value is a required field
  15706. Value *string `type:"string" required:"true"`
  15707. }
  15708. // String returns the string representation
  15709. func (s Tag) String() string {
  15710. return awsutil.Prettify(s)
  15711. }
  15712. // GoString returns the string representation
  15713. func (s Tag) GoString() string {
  15714. return s.String()
  15715. }
  15716. // Validate inspects the fields of the type to determine if they are valid.
  15717. func (s *Tag) Validate() error {
  15718. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  15719. if s.Key == nil {
  15720. invalidParams.Add(request.NewErrParamRequired("Key"))
  15721. }
  15722. if s.Key != nil && len(*s.Key) < 1 {
  15723. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15724. }
  15725. if s.Value == nil {
  15726. invalidParams.Add(request.NewErrParamRequired("Value"))
  15727. }
  15728. if invalidParams.Len() > 0 {
  15729. return invalidParams
  15730. }
  15731. return nil
  15732. }
  15733. // SetKey sets the Key field's value.
  15734. func (s *Tag) SetKey(v string) *Tag {
  15735. s.Key = &v
  15736. return s
  15737. }
  15738. // SetValue sets the Value field's value.
  15739. func (s *Tag) SetValue(v string) *Tag {
  15740. s.Value = &v
  15741. return s
  15742. }
  15743. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging
  15744. type Tagging struct {
  15745. _ struct{} `type:"structure"`
  15746. // TagSet is a required field
  15747. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  15748. }
  15749. // String returns the string representation
  15750. func (s Tagging) String() string {
  15751. return awsutil.Prettify(s)
  15752. }
  15753. // GoString returns the string representation
  15754. func (s Tagging) GoString() string {
  15755. return s.String()
  15756. }
  15757. // Validate inspects the fields of the type to determine if they are valid.
  15758. func (s *Tagging) Validate() error {
  15759. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  15760. if s.TagSet == nil {
  15761. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  15762. }
  15763. if s.TagSet != nil {
  15764. for i, v := range s.TagSet {
  15765. if v == nil {
  15766. continue
  15767. }
  15768. if err := v.Validate(); err != nil {
  15769. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  15770. }
  15771. }
  15772. }
  15773. if invalidParams.Len() > 0 {
  15774. return invalidParams
  15775. }
  15776. return nil
  15777. }
  15778. // SetTagSet sets the TagSet field's value.
  15779. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  15780. s.TagSet = v
  15781. return s
  15782. }
  15783. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TargetGrant
  15784. type TargetGrant struct {
  15785. _ struct{} `type:"structure"`
  15786. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  15787. // Logging permissions assigned to the Grantee for the bucket.
  15788. Permission *string `type:"string" enum:"BucketLogsPermission"`
  15789. }
  15790. // String returns the string representation
  15791. func (s TargetGrant) String() string {
  15792. return awsutil.Prettify(s)
  15793. }
  15794. // GoString returns the string representation
  15795. func (s TargetGrant) GoString() string {
  15796. return s.String()
  15797. }
  15798. // Validate inspects the fields of the type to determine if they are valid.
  15799. func (s *TargetGrant) Validate() error {
  15800. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  15801. if s.Grantee != nil {
  15802. if err := s.Grantee.Validate(); err != nil {
  15803. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  15804. }
  15805. }
  15806. if invalidParams.Len() > 0 {
  15807. return invalidParams
  15808. }
  15809. return nil
  15810. }
  15811. // SetGrantee sets the Grantee field's value.
  15812. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  15813. s.Grantee = v
  15814. return s
  15815. }
  15816. // SetPermission sets the Permission field's value.
  15817. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  15818. s.Permission = &v
  15819. return s
  15820. }
  15821. // Container for specifying the configuration when you want Amazon S3 to publish
  15822. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  15823. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfiguration
  15824. type TopicConfiguration struct {
  15825. _ struct{} `type:"structure"`
  15826. // Events is a required field
  15827. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  15828. // Container for object key name filtering rules. For information about key
  15829. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15830. Filter *NotificationConfigurationFilter `type:"structure"`
  15831. // Optional unique identifier for configurations in a notification configuration.
  15832. // If you don't provide one, Amazon S3 will assign an ID.
  15833. Id *string `type:"string"`
  15834. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  15835. // events of specified type.
  15836. //
  15837. // TopicArn is a required field
  15838. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  15839. }
  15840. // String returns the string representation
  15841. func (s TopicConfiguration) String() string {
  15842. return awsutil.Prettify(s)
  15843. }
  15844. // GoString returns the string representation
  15845. func (s TopicConfiguration) GoString() string {
  15846. return s.String()
  15847. }
  15848. // Validate inspects the fields of the type to determine if they are valid.
  15849. func (s *TopicConfiguration) Validate() error {
  15850. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  15851. if s.Events == nil {
  15852. invalidParams.Add(request.NewErrParamRequired("Events"))
  15853. }
  15854. if s.TopicArn == nil {
  15855. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  15856. }
  15857. if invalidParams.Len() > 0 {
  15858. return invalidParams
  15859. }
  15860. return nil
  15861. }
  15862. // SetEvents sets the Events field's value.
  15863. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  15864. s.Events = v
  15865. return s
  15866. }
  15867. // SetFilter sets the Filter field's value.
  15868. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  15869. s.Filter = v
  15870. return s
  15871. }
  15872. // SetId sets the Id field's value.
  15873. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  15874. s.Id = &v
  15875. return s
  15876. }
  15877. // SetTopicArn sets the TopicArn field's value.
  15878. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  15879. s.TopicArn = &v
  15880. return s
  15881. }
  15882. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/TopicConfigurationDeprecated
  15883. type TopicConfigurationDeprecated struct {
  15884. _ struct{} `type:"structure"`
  15885. // Bucket event for which to send notifications.
  15886. Event *string `deprecated:"true" type:"string" enum:"Event"`
  15887. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  15888. // Optional unique identifier for configurations in a notification configuration.
  15889. // If you don't provide one, Amazon S3 will assign an ID.
  15890. Id *string `type:"string"`
  15891. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  15892. // specified events for the bucket.
  15893. Topic *string `type:"string"`
  15894. }
  15895. // String returns the string representation
  15896. func (s TopicConfigurationDeprecated) String() string {
  15897. return awsutil.Prettify(s)
  15898. }
  15899. // GoString returns the string representation
  15900. func (s TopicConfigurationDeprecated) GoString() string {
  15901. return s.String()
  15902. }
  15903. // SetEvent sets the Event field's value.
  15904. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  15905. s.Event = &v
  15906. return s
  15907. }
  15908. // SetEvents sets the Events field's value.
  15909. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  15910. s.Events = v
  15911. return s
  15912. }
  15913. // SetId sets the Id field's value.
  15914. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  15915. s.Id = &v
  15916. return s
  15917. }
  15918. // SetTopic sets the Topic field's value.
  15919. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  15920. s.Topic = &v
  15921. return s
  15922. }
  15923. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition
  15924. type Transition struct {
  15925. _ struct{} `type:"structure"`
  15926. // Indicates at what date the object is to be moved or deleted. Should be in
  15927. // GMT ISO 8601 Format.
  15928. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  15929. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  15930. // The value must be a non-zero positive integer.
  15931. Days *int64 `type:"integer"`
  15932. // The class of storage used to store the object.
  15933. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  15934. }
  15935. // String returns the string representation
  15936. func (s Transition) String() string {
  15937. return awsutil.Prettify(s)
  15938. }
  15939. // GoString returns the string representation
  15940. func (s Transition) GoString() string {
  15941. return s.String()
  15942. }
  15943. // SetDate sets the Date field's value.
  15944. func (s *Transition) SetDate(v time.Time) *Transition {
  15945. s.Date = &v
  15946. return s
  15947. }
  15948. // SetDays sets the Days field's value.
  15949. func (s *Transition) SetDays(v int64) *Transition {
  15950. s.Days = &v
  15951. return s
  15952. }
  15953. // SetStorageClass sets the StorageClass field's value.
  15954. func (s *Transition) SetStorageClass(v string) *Transition {
  15955. s.StorageClass = &v
  15956. return s
  15957. }
  15958. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyRequest
  15959. type UploadPartCopyInput struct {
  15960. _ struct{} `type:"structure"`
  15961. // Bucket is a required field
  15962. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15963. // The name of the source bucket and key name of the source object, separated
  15964. // by a slash (/). Must be URL-encoded.
  15965. //
  15966. // CopySource is a required field
  15967. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  15968. // Copies the object if its entity tag (ETag) matches the specified tag.
  15969. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  15970. // Copies the object if it has been modified since the specified time.
  15971. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  15972. // Copies the object if its entity tag (ETag) is different than the specified
  15973. // ETag.
  15974. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  15975. // Copies the object if it hasn't been modified since the specified time.
  15976. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  15977. // The range of bytes to copy from the source object. The range value must use
  15978. // the form bytes=first-last, where the first and last are the zero-based byte
  15979. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  15980. // first ten bytes of the source. You can copy a range only if the source object
  15981. // is greater than 5 GB.
  15982. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  15983. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  15984. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  15985. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  15986. // the source object. The encryption key provided in this header must be one
  15987. // that was used when the source object was created.
  15988. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  15989. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15990. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15991. // key was transmitted without error.
  15992. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  15993. // Key is a required field
  15994. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15995. // Part number of part being copied. This is a positive integer between 1 and
  15996. // 10,000.
  15997. //
  15998. // PartNumber is a required field
  15999. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  16000. // Confirms that the requester knows that she or he will be charged for the
  16001. // request. Bucket owners need not specify this parameter in their requests.
  16002. // Documentation on downloading objects from requester pays buckets can be found
  16003. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16004. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  16005. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  16006. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  16007. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  16008. // data. This value is used to store the object and then it is discarded; Amazon
  16009. // does not store the encryption key. The key must be appropriate for use with
  16010. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  16011. // header. This must be the same encryption key specified in the initiate multipart
  16012. // upload request.
  16013. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  16014. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  16015. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  16016. // key was transmitted without error.
  16017. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  16018. // Upload ID identifying the multipart upload whose part is being copied.
  16019. //
  16020. // UploadId is a required field
  16021. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  16022. }
  16023. // String returns the string representation
  16024. func (s UploadPartCopyInput) String() string {
  16025. return awsutil.Prettify(s)
  16026. }
  16027. // GoString returns the string representation
  16028. func (s UploadPartCopyInput) GoString() string {
  16029. return s.String()
  16030. }
  16031. // Validate inspects the fields of the type to determine if they are valid.
  16032. func (s *UploadPartCopyInput) Validate() error {
  16033. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  16034. if s.Bucket == nil {
  16035. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16036. }
  16037. if s.CopySource == nil {
  16038. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  16039. }
  16040. if s.Key == nil {
  16041. invalidParams.Add(request.NewErrParamRequired("Key"))
  16042. }
  16043. if s.Key != nil && len(*s.Key) < 1 {
  16044. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16045. }
  16046. if s.PartNumber == nil {
  16047. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  16048. }
  16049. if s.UploadId == nil {
  16050. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  16051. }
  16052. if invalidParams.Len() > 0 {
  16053. return invalidParams
  16054. }
  16055. return nil
  16056. }
  16057. // SetBucket sets the Bucket field's value.
  16058. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  16059. s.Bucket = &v
  16060. return s
  16061. }
  16062. func (s *UploadPartCopyInput) getBucket() (v string) {
  16063. if s.Bucket == nil {
  16064. return v
  16065. }
  16066. return *s.Bucket
  16067. }
  16068. // SetCopySource sets the CopySource field's value.
  16069. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  16070. s.CopySource = &v
  16071. return s
  16072. }
  16073. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  16074. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  16075. s.CopySourceIfMatch = &v
  16076. return s
  16077. }
  16078. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  16079. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  16080. s.CopySourceIfModifiedSince = &v
  16081. return s
  16082. }
  16083. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  16084. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  16085. s.CopySourceIfNoneMatch = &v
  16086. return s
  16087. }
  16088. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  16089. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  16090. s.CopySourceIfUnmodifiedSince = &v
  16091. return s
  16092. }
  16093. // SetCopySourceRange sets the CopySourceRange field's value.
  16094. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  16095. s.CopySourceRange = &v
  16096. return s
  16097. }
  16098. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  16099. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  16100. s.CopySourceSSECustomerAlgorithm = &v
  16101. return s
  16102. }
  16103. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  16104. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  16105. s.CopySourceSSECustomerKey = &v
  16106. return s
  16107. }
  16108. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  16109. if s.CopySourceSSECustomerKey == nil {
  16110. return v
  16111. }
  16112. return *s.CopySourceSSECustomerKey
  16113. }
  16114. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  16115. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  16116. s.CopySourceSSECustomerKeyMD5 = &v
  16117. return s
  16118. }
  16119. // SetKey sets the Key field's value.
  16120. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  16121. s.Key = &v
  16122. return s
  16123. }
  16124. // SetPartNumber sets the PartNumber field's value.
  16125. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  16126. s.PartNumber = &v
  16127. return s
  16128. }
  16129. // SetRequestPayer sets the RequestPayer field's value.
  16130. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  16131. s.RequestPayer = &v
  16132. return s
  16133. }
  16134. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  16135. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  16136. s.SSECustomerAlgorithm = &v
  16137. return s
  16138. }
  16139. // SetSSECustomerKey sets the SSECustomerKey field's value.
  16140. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  16141. s.SSECustomerKey = &v
  16142. return s
  16143. }
  16144. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  16145. if s.SSECustomerKey == nil {
  16146. return v
  16147. }
  16148. return *s.SSECustomerKey
  16149. }
  16150. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  16151. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  16152. s.SSECustomerKeyMD5 = &v
  16153. return s
  16154. }
  16155. // SetUploadId sets the UploadId field's value.
  16156. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  16157. s.UploadId = &v
  16158. return s
  16159. }
  16160. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopyOutput
  16161. type UploadPartCopyOutput struct {
  16162. _ struct{} `type:"structure" payload:"CopyPartResult"`
  16163. CopyPartResult *CopyPartResult `type:"structure"`
  16164. // The version of the source object that was copied, if you have enabled versioning
  16165. // on the source bucket.
  16166. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  16167. // If present, indicates that the requester was successfully charged for the
  16168. // request.
  16169. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  16170. // If server-side encryption with a customer-provided encryption key was requested,
  16171. // the response will include this header confirming the encryption algorithm
  16172. // used.
  16173. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  16174. // If server-side encryption with a customer-provided encryption key was requested,
  16175. // the response will include this header to provide round trip message integrity
  16176. // verification of the customer-provided encryption key.
  16177. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  16178. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  16179. // encryption key that was used for the object.
  16180. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  16181. // The Server-side encryption algorithm used when storing this object in S3
  16182. // (e.g., AES256, aws:kms).
  16183. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  16184. }
  16185. // String returns the string representation
  16186. func (s UploadPartCopyOutput) String() string {
  16187. return awsutil.Prettify(s)
  16188. }
  16189. // GoString returns the string representation
  16190. func (s UploadPartCopyOutput) GoString() string {
  16191. return s.String()
  16192. }
  16193. // SetCopyPartResult sets the CopyPartResult field's value.
  16194. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  16195. s.CopyPartResult = v
  16196. return s
  16197. }
  16198. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  16199. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  16200. s.CopySourceVersionId = &v
  16201. return s
  16202. }
  16203. // SetRequestCharged sets the RequestCharged field's value.
  16204. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  16205. s.RequestCharged = &v
  16206. return s
  16207. }
  16208. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  16209. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  16210. s.SSECustomerAlgorithm = &v
  16211. return s
  16212. }
  16213. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  16214. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  16215. s.SSECustomerKeyMD5 = &v
  16216. return s
  16217. }
  16218. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  16219. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  16220. s.SSEKMSKeyId = &v
  16221. return s
  16222. }
  16223. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  16224. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  16225. s.ServerSideEncryption = &v
  16226. return s
  16227. }
  16228. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartRequest
  16229. type UploadPartInput struct {
  16230. _ struct{} `type:"structure" payload:"Body"`
  16231. // Object data.
  16232. Body io.ReadSeeker `type:"blob"`
  16233. // Name of the bucket to which the multipart upload was initiated.
  16234. //
  16235. // Bucket is a required field
  16236. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16237. // Size of the body in bytes. This parameter is useful when the size of the
  16238. // body cannot be determined automatically.
  16239. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  16240. // Object key for which the multipart upload was initiated.
  16241. //
  16242. // Key is a required field
  16243. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  16244. // Part number of part being uploaded. This is a positive integer between 1
  16245. // and 10,000.
  16246. //
  16247. // PartNumber is a required field
  16248. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  16249. // Confirms that the requester knows that she or he will be charged for the
  16250. // request. Bucket owners need not specify this parameter in their requests.
  16251. // Documentation on downloading objects from requester pays buckets can be found
  16252. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16253. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  16254. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  16255. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  16256. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  16257. // data. This value is used to store the object and then it is discarded; Amazon
  16258. // does not store the encryption key. The key must be appropriate for use with
  16259. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  16260. // header. This must be the same encryption key specified in the initiate multipart
  16261. // upload request.
  16262. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  16263. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  16264. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  16265. // key was transmitted without error.
  16266. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  16267. // Upload ID identifying the multipart upload whose part is being uploaded.
  16268. //
  16269. // UploadId is a required field
  16270. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  16271. }
  16272. // String returns the string representation
  16273. func (s UploadPartInput) String() string {
  16274. return awsutil.Prettify(s)
  16275. }
  16276. // GoString returns the string representation
  16277. func (s UploadPartInput) GoString() string {
  16278. return s.String()
  16279. }
  16280. // Validate inspects the fields of the type to determine if they are valid.
  16281. func (s *UploadPartInput) Validate() error {
  16282. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  16283. if s.Bucket == nil {
  16284. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16285. }
  16286. if s.Key == nil {
  16287. invalidParams.Add(request.NewErrParamRequired("Key"))
  16288. }
  16289. if s.Key != nil && len(*s.Key) < 1 {
  16290. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16291. }
  16292. if s.PartNumber == nil {
  16293. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  16294. }
  16295. if s.UploadId == nil {
  16296. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  16297. }
  16298. if invalidParams.Len() > 0 {
  16299. return invalidParams
  16300. }
  16301. return nil
  16302. }
  16303. // SetBody sets the Body field's value.
  16304. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  16305. s.Body = v
  16306. return s
  16307. }
  16308. // SetBucket sets the Bucket field's value.
  16309. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  16310. s.Bucket = &v
  16311. return s
  16312. }
  16313. func (s *UploadPartInput) getBucket() (v string) {
  16314. if s.Bucket == nil {
  16315. return v
  16316. }
  16317. return *s.Bucket
  16318. }
  16319. // SetContentLength sets the ContentLength field's value.
  16320. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  16321. s.ContentLength = &v
  16322. return s
  16323. }
  16324. // SetKey sets the Key field's value.
  16325. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  16326. s.Key = &v
  16327. return s
  16328. }
  16329. // SetPartNumber sets the PartNumber field's value.
  16330. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  16331. s.PartNumber = &v
  16332. return s
  16333. }
  16334. // SetRequestPayer sets the RequestPayer field's value.
  16335. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  16336. s.RequestPayer = &v
  16337. return s
  16338. }
  16339. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  16340. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  16341. s.SSECustomerAlgorithm = &v
  16342. return s
  16343. }
  16344. // SetSSECustomerKey sets the SSECustomerKey field's value.
  16345. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  16346. s.SSECustomerKey = &v
  16347. return s
  16348. }
  16349. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  16350. if s.SSECustomerKey == nil {
  16351. return v
  16352. }
  16353. return *s.SSECustomerKey
  16354. }
  16355. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  16356. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  16357. s.SSECustomerKeyMD5 = &v
  16358. return s
  16359. }
  16360. // SetUploadId sets the UploadId field's value.
  16361. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  16362. s.UploadId = &v
  16363. return s
  16364. }
  16365. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartOutput
  16366. type UploadPartOutput struct {
  16367. _ struct{} `type:"structure"`
  16368. // Entity tag for the uploaded object.
  16369. ETag *string `location:"header" locationName:"ETag" type:"string"`
  16370. // If present, indicates that the requester was successfully charged for the
  16371. // request.
  16372. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  16373. // If server-side encryption with a customer-provided encryption key was requested,
  16374. // the response will include this header confirming the encryption algorithm
  16375. // used.
  16376. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  16377. // If server-side encryption with a customer-provided encryption key was requested,
  16378. // the response will include this header to provide round trip message integrity
  16379. // verification of the customer-provided encryption key.
  16380. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  16381. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  16382. // encryption key that was used for the object.
  16383. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  16384. // The Server-side encryption algorithm used when storing this object in S3
  16385. // (e.g., AES256, aws:kms).
  16386. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  16387. }
  16388. // String returns the string representation
  16389. func (s UploadPartOutput) String() string {
  16390. return awsutil.Prettify(s)
  16391. }
  16392. // GoString returns the string representation
  16393. func (s UploadPartOutput) GoString() string {
  16394. return s.String()
  16395. }
  16396. // SetETag sets the ETag field's value.
  16397. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  16398. s.ETag = &v
  16399. return s
  16400. }
  16401. // SetRequestCharged sets the RequestCharged field's value.
  16402. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  16403. s.RequestCharged = &v
  16404. return s
  16405. }
  16406. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  16407. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  16408. s.SSECustomerAlgorithm = &v
  16409. return s
  16410. }
  16411. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  16412. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  16413. s.SSECustomerKeyMD5 = &v
  16414. return s
  16415. }
  16416. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  16417. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  16418. s.SSEKMSKeyId = &v
  16419. return s
  16420. }
  16421. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  16422. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  16423. s.ServerSideEncryption = &v
  16424. return s
  16425. }
  16426. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/VersioningConfiguration
  16427. type VersioningConfiguration struct {
  16428. _ struct{} `type:"structure"`
  16429. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  16430. // This element is only returned if the bucket has been configured with MFA
  16431. // delete. If the bucket has never been so configured, this element is not returned.
  16432. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  16433. // The versioning state of the bucket.
  16434. Status *string `type:"string" enum:"BucketVersioningStatus"`
  16435. }
  16436. // String returns the string representation
  16437. func (s VersioningConfiguration) String() string {
  16438. return awsutil.Prettify(s)
  16439. }
  16440. // GoString returns the string representation
  16441. func (s VersioningConfiguration) GoString() string {
  16442. return s.String()
  16443. }
  16444. // SetMFADelete sets the MFADelete field's value.
  16445. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  16446. s.MFADelete = &v
  16447. return s
  16448. }
  16449. // SetStatus sets the Status field's value.
  16450. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  16451. s.Status = &v
  16452. return s
  16453. }
  16454. // Please also see https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WebsiteConfiguration
  16455. type WebsiteConfiguration struct {
  16456. _ struct{} `type:"structure"`
  16457. ErrorDocument *ErrorDocument `type:"structure"`
  16458. IndexDocument *IndexDocument `type:"structure"`
  16459. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  16460. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  16461. }
  16462. // String returns the string representation
  16463. func (s WebsiteConfiguration) String() string {
  16464. return awsutil.Prettify(s)
  16465. }
  16466. // GoString returns the string representation
  16467. func (s WebsiteConfiguration) GoString() string {
  16468. return s.String()
  16469. }
  16470. // Validate inspects the fields of the type to determine if they are valid.
  16471. func (s *WebsiteConfiguration) Validate() error {
  16472. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  16473. if s.ErrorDocument != nil {
  16474. if err := s.ErrorDocument.Validate(); err != nil {
  16475. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  16476. }
  16477. }
  16478. if s.IndexDocument != nil {
  16479. if err := s.IndexDocument.Validate(); err != nil {
  16480. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  16481. }
  16482. }
  16483. if s.RedirectAllRequestsTo != nil {
  16484. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  16485. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  16486. }
  16487. }
  16488. if s.RoutingRules != nil {
  16489. for i, v := range s.RoutingRules {
  16490. if v == nil {
  16491. continue
  16492. }
  16493. if err := v.Validate(); err != nil {
  16494. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  16495. }
  16496. }
  16497. }
  16498. if invalidParams.Len() > 0 {
  16499. return invalidParams
  16500. }
  16501. return nil
  16502. }
  16503. // SetErrorDocument sets the ErrorDocument field's value.
  16504. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  16505. s.ErrorDocument = v
  16506. return s
  16507. }
  16508. // SetIndexDocument sets the IndexDocument field's value.
  16509. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  16510. s.IndexDocument = v
  16511. return s
  16512. }
  16513. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  16514. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  16515. s.RedirectAllRequestsTo = v
  16516. return s
  16517. }
  16518. // SetRoutingRules sets the RoutingRules field's value.
  16519. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  16520. s.RoutingRules = v
  16521. return s
  16522. }
  16523. const (
  16524. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  16525. AnalyticsS3ExportFileFormatCsv = "CSV"
  16526. )
  16527. const (
  16528. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  16529. BucketAccelerateStatusEnabled = "Enabled"
  16530. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  16531. BucketAccelerateStatusSuspended = "Suspended"
  16532. )
  16533. const (
  16534. // BucketCannedACLPrivate is a BucketCannedACL enum value
  16535. BucketCannedACLPrivate = "private"
  16536. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  16537. BucketCannedACLPublicRead = "public-read"
  16538. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  16539. BucketCannedACLPublicReadWrite = "public-read-write"
  16540. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  16541. BucketCannedACLAuthenticatedRead = "authenticated-read"
  16542. )
  16543. const (
  16544. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  16545. BucketLocationConstraintEu = "EU"
  16546. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  16547. BucketLocationConstraintEuWest1 = "eu-west-1"
  16548. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  16549. BucketLocationConstraintUsWest1 = "us-west-1"
  16550. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  16551. BucketLocationConstraintUsWest2 = "us-west-2"
  16552. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  16553. BucketLocationConstraintApSouth1 = "ap-south-1"
  16554. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  16555. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  16556. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  16557. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  16558. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  16559. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  16560. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  16561. BucketLocationConstraintSaEast1 = "sa-east-1"
  16562. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  16563. BucketLocationConstraintCnNorth1 = "cn-north-1"
  16564. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  16565. BucketLocationConstraintEuCentral1 = "eu-central-1"
  16566. )
  16567. const (
  16568. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  16569. BucketLogsPermissionFullControl = "FULL_CONTROL"
  16570. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  16571. BucketLogsPermissionRead = "READ"
  16572. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  16573. BucketLogsPermissionWrite = "WRITE"
  16574. )
  16575. const (
  16576. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  16577. BucketVersioningStatusEnabled = "Enabled"
  16578. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  16579. BucketVersioningStatusSuspended = "Suspended"
  16580. )
  16581. // Requests Amazon S3 to encode the object keys in the response and specifies
  16582. // the encoding method to use. An object key may contain any Unicode character;
  16583. // however, XML 1.0 parser cannot parse some characters, such as characters
  16584. // with an ASCII value from 0 to 10. For characters that are not supported in
  16585. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  16586. // keys in the response.
  16587. const (
  16588. // EncodingTypeUrl is a EncodingType enum value
  16589. EncodingTypeUrl = "url"
  16590. )
  16591. // Bucket event for which to send notifications.
  16592. const (
  16593. // EventS3ReducedRedundancyLostObject is a Event enum value
  16594. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  16595. // EventS3ObjectCreated is a Event enum value
  16596. EventS3ObjectCreated = "s3:ObjectCreated:*"
  16597. // EventS3ObjectCreatedPut is a Event enum value
  16598. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  16599. // EventS3ObjectCreatedPost is a Event enum value
  16600. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  16601. // EventS3ObjectCreatedCopy is a Event enum value
  16602. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  16603. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  16604. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  16605. // EventS3ObjectRemoved is a Event enum value
  16606. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  16607. // EventS3ObjectRemovedDelete is a Event enum value
  16608. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  16609. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  16610. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  16611. )
  16612. const (
  16613. // ExpirationStatusEnabled is a ExpirationStatus enum value
  16614. ExpirationStatusEnabled = "Enabled"
  16615. // ExpirationStatusDisabled is a ExpirationStatus enum value
  16616. ExpirationStatusDisabled = "Disabled"
  16617. )
  16618. const (
  16619. // FilterRuleNamePrefix is a FilterRuleName enum value
  16620. FilterRuleNamePrefix = "prefix"
  16621. // FilterRuleNameSuffix is a FilterRuleName enum value
  16622. FilterRuleNameSuffix = "suffix"
  16623. )
  16624. const (
  16625. // InventoryFormatCsv is a InventoryFormat enum value
  16626. InventoryFormatCsv = "CSV"
  16627. )
  16628. const (
  16629. // InventoryFrequencyDaily is a InventoryFrequency enum value
  16630. InventoryFrequencyDaily = "Daily"
  16631. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  16632. InventoryFrequencyWeekly = "Weekly"
  16633. )
  16634. const (
  16635. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  16636. InventoryIncludedObjectVersionsAll = "All"
  16637. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  16638. InventoryIncludedObjectVersionsCurrent = "Current"
  16639. )
  16640. const (
  16641. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  16642. InventoryOptionalFieldSize = "Size"
  16643. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  16644. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  16645. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  16646. InventoryOptionalFieldStorageClass = "StorageClass"
  16647. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  16648. InventoryOptionalFieldEtag = "ETag"
  16649. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  16650. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  16651. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  16652. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  16653. )
  16654. const (
  16655. // MFADeleteEnabled is a MFADelete enum value
  16656. MFADeleteEnabled = "Enabled"
  16657. // MFADeleteDisabled is a MFADelete enum value
  16658. MFADeleteDisabled = "Disabled"
  16659. )
  16660. const (
  16661. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  16662. MFADeleteStatusEnabled = "Enabled"
  16663. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  16664. MFADeleteStatusDisabled = "Disabled"
  16665. )
  16666. const (
  16667. // MetadataDirectiveCopy is a MetadataDirective enum value
  16668. MetadataDirectiveCopy = "COPY"
  16669. // MetadataDirectiveReplace is a MetadataDirective enum value
  16670. MetadataDirectiveReplace = "REPLACE"
  16671. )
  16672. const (
  16673. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  16674. ObjectCannedACLPrivate = "private"
  16675. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  16676. ObjectCannedACLPublicRead = "public-read"
  16677. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  16678. ObjectCannedACLPublicReadWrite = "public-read-write"
  16679. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  16680. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  16681. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  16682. ObjectCannedACLAwsExecRead = "aws-exec-read"
  16683. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  16684. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  16685. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  16686. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  16687. )
  16688. const (
  16689. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  16690. ObjectStorageClassStandard = "STANDARD"
  16691. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  16692. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  16693. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  16694. ObjectStorageClassGlacier = "GLACIER"
  16695. )
  16696. const (
  16697. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  16698. ObjectVersionStorageClassStandard = "STANDARD"
  16699. )
  16700. const (
  16701. // PayerRequester is a Payer enum value
  16702. PayerRequester = "Requester"
  16703. // PayerBucketOwner is a Payer enum value
  16704. PayerBucketOwner = "BucketOwner"
  16705. )
  16706. const (
  16707. // PermissionFullControl is a Permission enum value
  16708. PermissionFullControl = "FULL_CONTROL"
  16709. // PermissionWrite is a Permission enum value
  16710. PermissionWrite = "WRITE"
  16711. // PermissionWriteAcp is a Permission enum value
  16712. PermissionWriteAcp = "WRITE_ACP"
  16713. // PermissionRead is a Permission enum value
  16714. PermissionRead = "READ"
  16715. // PermissionReadAcp is a Permission enum value
  16716. PermissionReadAcp = "READ_ACP"
  16717. )
  16718. const (
  16719. // ProtocolHttp is a Protocol enum value
  16720. ProtocolHttp = "http"
  16721. // ProtocolHttps is a Protocol enum value
  16722. ProtocolHttps = "https"
  16723. )
  16724. const (
  16725. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  16726. ReplicationRuleStatusEnabled = "Enabled"
  16727. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  16728. ReplicationRuleStatusDisabled = "Disabled"
  16729. )
  16730. const (
  16731. // ReplicationStatusComplete is a ReplicationStatus enum value
  16732. ReplicationStatusComplete = "COMPLETE"
  16733. // ReplicationStatusPending is a ReplicationStatus enum value
  16734. ReplicationStatusPending = "PENDING"
  16735. // ReplicationStatusFailed is a ReplicationStatus enum value
  16736. ReplicationStatusFailed = "FAILED"
  16737. // ReplicationStatusReplica is a ReplicationStatus enum value
  16738. ReplicationStatusReplica = "REPLICA"
  16739. )
  16740. // If present, indicates that the requester was successfully charged for the
  16741. // request.
  16742. const (
  16743. // RequestChargedRequester is a RequestCharged enum value
  16744. RequestChargedRequester = "requester"
  16745. )
  16746. // Confirms that the requester knows that she or he will be charged for the
  16747. // request. Bucket owners need not specify this parameter in their requests.
  16748. // Documentation on downloading objects from requester pays buckets can be found
  16749. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16750. const (
  16751. // RequestPayerRequester is a RequestPayer enum value
  16752. RequestPayerRequester = "requester"
  16753. )
  16754. const (
  16755. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  16756. ServerSideEncryptionAes256 = "AES256"
  16757. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  16758. ServerSideEncryptionAwsKms = "aws:kms"
  16759. )
  16760. const (
  16761. // StorageClassStandard is a StorageClass enum value
  16762. StorageClassStandard = "STANDARD"
  16763. // StorageClassReducedRedundancy is a StorageClass enum value
  16764. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  16765. // StorageClassStandardIa is a StorageClass enum value
  16766. StorageClassStandardIa = "STANDARD_IA"
  16767. )
  16768. const (
  16769. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  16770. StorageClassAnalysisSchemaVersionV1 = "V_1"
  16771. )
  16772. const (
  16773. // TaggingDirectiveCopy is a TaggingDirective enum value
  16774. TaggingDirectiveCopy = "COPY"
  16775. // TaggingDirectiveReplace is a TaggingDirective enum value
  16776. TaggingDirectiveReplace = "REPLACE"
  16777. )
  16778. const (
  16779. // TierStandard is a Tier enum value
  16780. TierStandard = "Standard"
  16781. // TierBulk is a Tier enum value
  16782. TierBulk = "Bulk"
  16783. // TierExpedited is a Tier enum value
  16784. TierExpedited = "Expedited"
  16785. )
  16786. const (
  16787. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  16788. TransitionStorageClassGlacier = "GLACIER"
  16789. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  16790. TransitionStorageClassStandardIa = "STANDARD_IA"
  16791. )
  16792. const (
  16793. // TypeCanonicalUser is a Type enum value
  16794. TypeCanonicalUser = "CanonicalUser"
  16795. // TypeAmazonCustomerByEmail is a Type enum value
  16796. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  16797. // TypeGroup is a Type enum value
  16798. TypeGroup = "Group"
  16799. )