api.go 695 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247
  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 will be populated with the request's response once the request completes
  17. // successfuly.
  18. //
  19. // Use "Send" method on the returned Request to send the API call to the service.
  20. // the "output" return value is not valid until after Send returns without error.
  21. //
  22. // See AbortMultipartUpload for more information on using the AbortMultipartUpload
  23. // API call, and error handling.
  24. //
  25. // This method is useful when you want to inject custom logic or configuration
  26. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  27. //
  28. //
  29. // // Example sending a request using the AbortMultipartUploadRequest method.
  30. // req, resp := client.AbortMultipartUploadRequest(params)
  31. //
  32. // err := req.Send()
  33. // if err == nil { // resp is now filled
  34. // fmt.Println(resp)
  35. // }
  36. //
  37. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  38. func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
  39. op := &request.Operation{
  40. Name: opAbortMultipartUpload,
  41. HTTPMethod: "DELETE",
  42. HTTPPath: "/{Bucket}/{Key+}",
  43. }
  44. if input == nil {
  45. input = &AbortMultipartUploadInput{}
  46. }
  47. output = &AbortMultipartUploadOutput{}
  48. req = c.newRequest(op, input, output)
  49. return
  50. }
  51. // AbortMultipartUpload API operation for Amazon Simple Storage Service.
  52. //
  53. // Aborts a multipart upload.
  54. //
  55. // To verify that all parts have been removed, so you don't get charged for
  56. // the part storage, you should call the List Parts operation and ensure the
  57. // parts list is empty.
  58. //
  59. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  60. // with awserr.Error's Code and Message methods to get detailed information about
  61. // the error.
  62. //
  63. // See the AWS API reference guide for Amazon Simple Storage Service's
  64. // API operation AbortMultipartUpload for usage and error information.
  65. //
  66. // Returned Error Codes:
  67. // * ErrCodeNoSuchUpload "NoSuchUpload"
  68. // The specified multipart upload does not exist.
  69. //
  70. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
  71. func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
  72. req, out := c.AbortMultipartUploadRequest(input)
  73. return out, req.Send()
  74. }
  75. // AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
  76. // the ability to pass a context and additional request options.
  77. //
  78. // See AbortMultipartUpload for details on how to use this API operation.
  79. //
  80. // The context must be non-nil and will be used for request cancellation. If
  81. // the context is nil a panic will occur. In the future the SDK may create
  82. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  83. // for more information on using Contexts.
  84. func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
  85. req, out := c.AbortMultipartUploadRequest(input)
  86. req.SetContext(ctx)
  87. req.ApplyOptions(opts...)
  88. return out, req.Send()
  89. }
  90. const opCompleteMultipartUpload = "CompleteMultipartUpload"
  91. // CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
  92. // client's request for the CompleteMultipartUpload operation. The "output" return
  93. // value will be populated with the request's response once the request completes
  94. // successfuly.
  95. //
  96. // Use "Send" method on the returned Request to send the API call to the service.
  97. // the "output" return value is not valid until after Send returns without error.
  98. //
  99. // See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
  100. // API call, and error handling.
  101. //
  102. // This method is useful when you want to inject custom logic or configuration
  103. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  104. //
  105. //
  106. // // Example sending a request using the CompleteMultipartUploadRequest method.
  107. // req, resp := client.CompleteMultipartUploadRequest(params)
  108. //
  109. // err := req.Send()
  110. // if err == nil { // resp is now filled
  111. // fmt.Println(resp)
  112. // }
  113. //
  114. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  115. func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
  116. op := &request.Operation{
  117. Name: opCompleteMultipartUpload,
  118. HTTPMethod: "POST",
  119. HTTPPath: "/{Bucket}/{Key+}",
  120. }
  121. if input == nil {
  122. input = &CompleteMultipartUploadInput{}
  123. }
  124. output = &CompleteMultipartUploadOutput{}
  125. req = c.newRequest(op, input, output)
  126. return
  127. }
  128. // CompleteMultipartUpload API operation for Amazon Simple Storage Service.
  129. //
  130. // Completes a multipart upload by assembling previously uploaded parts.
  131. //
  132. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  133. // with awserr.Error's Code and Message methods to get detailed information about
  134. // the error.
  135. //
  136. // See the AWS API reference guide for Amazon Simple Storage Service's
  137. // API operation CompleteMultipartUpload for usage and error information.
  138. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
  139. func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
  140. req, out := c.CompleteMultipartUploadRequest(input)
  141. return out, req.Send()
  142. }
  143. // CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
  144. // the ability to pass a context and additional request options.
  145. //
  146. // See CompleteMultipartUpload for details on how to use this API operation.
  147. //
  148. // The context must be non-nil and will be used for request cancellation. If
  149. // the context is nil a panic will occur. In the future the SDK may create
  150. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  151. // for more information on using Contexts.
  152. func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
  153. req, out := c.CompleteMultipartUploadRequest(input)
  154. req.SetContext(ctx)
  155. req.ApplyOptions(opts...)
  156. return out, req.Send()
  157. }
  158. const opCopyObject = "CopyObject"
  159. // CopyObjectRequest generates a "aws/request.Request" representing the
  160. // client's request for the CopyObject operation. The "output" return
  161. // value will be populated with the request's response once the request completes
  162. // successfuly.
  163. //
  164. // Use "Send" method on the returned Request to send the API call to the service.
  165. // the "output" return value is not valid until after Send returns without error.
  166. //
  167. // See CopyObject for more information on using the CopyObject
  168. // API call, and error handling.
  169. //
  170. // This method is useful when you want to inject custom logic or configuration
  171. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  172. //
  173. //
  174. // // Example sending a request using the CopyObjectRequest method.
  175. // req, resp := client.CopyObjectRequest(params)
  176. //
  177. // err := req.Send()
  178. // if err == nil { // resp is now filled
  179. // fmt.Println(resp)
  180. // }
  181. //
  182. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  183. func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
  184. op := &request.Operation{
  185. Name: opCopyObject,
  186. HTTPMethod: "PUT",
  187. HTTPPath: "/{Bucket}/{Key+}",
  188. }
  189. if input == nil {
  190. input = &CopyObjectInput{}
  191. }
  192. output = &CopyObjectOutput{}
  193. req = c.newRequest(op, input, output)
  194. return
  195. }
  196. // CopyObject API operation for Amazon Simple Storage Service.
  197. //
  198. // Creates a copy of an object that is already stored in Amazon S3.
  199. //
  200. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  201. // with awserr.Error's Code and Message methods to get detailed information about
  202. // the error.
  203. //
  204. // See the AWS API reference guide for Amazon Simple Storage Service's
  205. // API operation CopyObject for usage and error information.
  206. //
  207. // Returned Error Codes:
  208. // * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
  209. // The source object of the COPY operation is not in the active tier and is
  210. // only stored in Amazon Glacier.
  211. //
  212. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
  213. func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
  214. req, out := c.CopyObjectRequest(input)
  215. return out, req.Send()
  216. }
  217. // CopyObjectWithContext is the same as CopyObject with the addition of
  218. // the ability to pass a context and additional request options.
  219. //
  220. // See CopyObject for details on how to use this API operation.
  221. //
  222. // The context must be non-nil and will be used for request cancellation. If
  223. // the context is nil a panic will occur. In the future the SDK may create
  224. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  225. // for more information on using Contexts.
  226. func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
  227. req, out := c.CopyObjectRequest(input)
  228. req.SetContext(ctx)
  229. req.ApplyOptions(opts...)
  230. return out, req.Send()
  231. }
  232. const opCreateBucket = "CreateBucket"
  233. // CreateBucketRequest generates a "aws/request.Request" representing the
  234. // client's request for the CreateBucket operation. The "output" return
  235. // value will be populated with the request's response once the request completes
  236. // successfuly.
  237. //
  238. // Use "Send" method on the returned Request to send the API call to the service.
  239. // the "output" return value is not valid until after Send returns without error.
  240. //
  241. // See CreateBucket for more information on using the CreateBucket
  242. // API call, and error handling.
  243. //
  244. // This method is useful when you want to inject custom logic or configuration
  245. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  246. //
  247. //
  248. // // Example sending a request using the CreateBucketRequest method.
  249. // req, resp := client.CreateBucketRequest(params)
  250. //
  251. // err := req.Send()
  252. // if err == nil { // resp is now filled
  253. // fmt.Println(resp)
  254. // }
  255. //
  256. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  257. func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
  258. op := &request.Operation{
  259. Name: opCreateBucket,
  260. HTTPMethod: "PUT",
  261. HTTPPath: "/{Bucket}",
  262. }
  263. if input == nil {
  264. input = &CreateBucketInput{}
  265. }
  266. output = &CreateBucketOutput{}
  267. req = c.newRequest(op, input, output)
  268. return
  269. }
  270. // CreateBucket API operation for Amazon Simple Storage Service.
  271. //
  272. // Creates a new bucket.
  273. //
  274. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  275. // with awserr.Error's Code and Message methods to get detailed information about
  276. // the error.
  277. //
  278. // See the AWS API reference guide for Amazon Simple Storage Service's
  279. // API operation CreateBucket for usage and error information.
  280. //
  281. // Returned Error Codes:
  282. // * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
  283. // The requested bucket name is not available. The bucket namespace is shared
  284. // by all users of the system. Please select a different name and try again.
  285. //
  286. // * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
  287. //
  288. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
  289. func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
  290. req, out := c.CreateBucketRequest(input)
  291. return out, req.Send()
  292. }
  293. // CreateBucketWithContext is the same as CreateBucket with the addition of
  294. // the ability to pass a context and additional request options.
  295. //
  296. // See CreateBucket for details on how to use this API operation.
  297. //
  298. // The context must be non-nil and will be used for request cancellation. If
  299. // the context is nil a panic will occur. In the future the SDK may create
  300. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  301. // for more information on using Contexts.
  302. func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
  303. req, out := c.CreateBucketRequest(input)
  304. req.SetContext(ctx)
  305. req.ApplyOptions(opts...)
  306. return out, req.Send()
  307. }
  308. const opCreateMultipartUpload = "CreateMultipartUpload"
  309. // CreateMultipartUploadRequest generates a "aws/request.Request" representing the
  310. // client's request for the CreateMultipartUpload operation. The "output" return
  311. // value will be populated with the request's response once the request completes
  312. // successfuly.
  313. //
  314. // Use "Send" method on the returned Request to send the API call to the service.
  315. // the "output" return value is not valid until after Send returns without error.
  316. //
  317. // See CreateMultipartUpload for more information on using the CreateMultipartUpload
  318. // API call, and error handling.
  319. //
  320. // This method is useful when you want to inject custom logic or configuration
  321. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  322. //
  323. //
  324. // // Example sending a request using the CreateMultipartUploadRequest method.
  325. // req, resp := client.CreateMultipartUploadRequest(params)
  326. //
  327. // err := req.Send()
  328. // if err == nil { // resp is now filled
  329. // fmt.Println(resp)
  330. // }
  331. //
  332. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  333. func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
  334. op := &request.Operation{
  335. Name: opCreateMultipartUpload,
  336. HTTPMethod: "POST",
  337. HTTPPath: "/{Bucket}/{Key+}?uploads",
  338. }
  339. if input == nil {
  340. input = &CreateMultipartUploadInput{}
  341. }
  342. output = &CreateMultipartUploadOutput{}
  343. req = c.newRequest(op, input, output)
  344. return
  345. }
  346. // CreateMultipartUpload API operation for Amazon Simple Storage Service.
  347. //
  348. // Initiates a multipart upload and returns an upload ID.
  349. //
  350. // Note: After you initiate multipart upload and upload one or more parts, you
  351. // must either complete or abort multipart upload in order to stop getting charged
  352. // for storage of the uploaded parts. Only after you either complete or abort
  353. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  354. // you for the parts storage.
  355. //
  356. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  357. // with awserr.Error's Code and Message methods to get detailed information about
  358. // the error.
  359. //
  360. // See the AWS API reference guide for Amazon Simple Storage Service's
  361. // API operation CreateMultipartUpload for usage and error information.
  362. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
  363. func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
  364. req, out := c.CreateMultipartUploadRequest(input)
  365. return out, req.Send()
  366. }
  367. // CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
  368. // the ability to pass a context and additional request options.
  369. //
  370. // See CreateMultipartUpload for details on how to use this API operation.
  371. //
  372. // The context must be non-nil and will be used for request cancellation. If
  373. // the context is nil a panic will occur. In the future the SDK may create
  374. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  375. // for more information on using Contexts.
  376. func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
  377. req, out := c.CreateMultipartUploadRequest(input)
  378. req.SetContext(ctx)
  379. req.ApplyOptions(opts...)
  380. return out, req.Send()
  381. }
  382. const opDeleteBucket = "DeleteBucket"
  383. // DeleteBucketRequest generates a "aws/request.Request" representing the
  384. // client's request for the DeleteBucket operation. The "output" return
  385. // value will be populated with the request's response once the request completes
  386. // successfuly.
  387. //
  388. // Use "Send" method on the returned Request to send the API call to the service.
  389. // the "output" return value is not valid until after Send returns without error.
  390. //
  391. // See DeleteBucket for more information on using the DeleteBucket
  392. // API call, and error handling.
  393. //
  394. // This method is useful when you want to inject custom logic or configuration
  395. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  396. //
  397. //
  398. // // Example sending a request using the DeleteBucketRequest method.
  399. // req, resp := client.DeleteBucketRequest(params)
  400. //
  401. // err := req.Send()
  402. // if err == nil { // resp is now filled
  403. // fmt.Println(resp)
  404. // }
  405. //
  406. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  407. func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
  408. op := &request.Operation{
  409. Name: opDeleteBucket,
  410. HTTPMethod: "DELETE",
  411. HTTPPath: "/{Bucket}",
  412. }
  413. if input == nil {
  414. input = &DeleteBucketInput{}
  415. }
  416. output = &DeleteBucketOutput{}
  417. req = c.newRequest(op, input, output)
  418. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  419. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  420. return
  421. }
  422. // DeleteBucket API operation for Amazon Simple Storage Service.
  423. //
  424. // Deletes the bucket. All objects (including all object versions and Delete
  425. // Markers) in the bucket must be deleted before the bucket itself can be deleted.
  426. //
  427. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  428. // with awserr.Error's Code and Message methods to get detailed information about
  429. // the error.
  430. //
  431. // See the AWS API reference guide for Amazon Simple Storage Service's
  432. // API operation DeleteBucket for usage and error information.
  433. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
  434. func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
  435. req, out := c.DeleteBucketRequest(input)
  436. return out, req.Send()
  437. }
  438. // DeleteBucketWithContext is the same as DeleteBucket with the addition of
  439. // the ability to pass a context and additional request options.
  440. //
  441. // See DeleteBucket for details on how to use this API operation.
  442. //
  443. // The context must be non-nil and will be used for request cancellation. If
  444. // the context is nil a panic will occur. In the future the SDK may create
  445. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  446. // for more information on using Contexts.
  447. func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
  448. req, out := c.DeleteBucketRequest(input)
  449. req.SetContext(ctx)
  450. req.ApplyOptions(opts...)
  451. return out, req.Send()
  452. }
  453. const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
  454. // DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  455. // client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
  456. // value will be populated with the request's response once the request completes
  457. // successfuly.
  458. //
  459. // Use "Send" method on the returned Request to send the API call to the service.
  460. // the "output" return value is not valid until after Send returns without error.
  461. //
  462. // See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
  463. // API call, and error handling.
  464. //
  465. // This method is useful when you want to inject custom logic or configuration
  466. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  467. //
  468. //
  469. // // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
  470. // req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
  471. //
  472. // err := req.Send()
  473. // if err == nil { // resp is now filled
  474. // fmt.Println(resp)
  475. // }
  476. //
  477. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  478. func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
  479. op := &request.Operation{
  480. Name: opDeleteBucketAnalyticsConfiguration,
  481. HTTPMethod: "DELETE",
  482. HTTPPath: "/{Bucket}?analytics",
  483. }
  484. if input == nil {
  485. input = &DeleteBucketAnalyticsConfigurationInput{}
  486. }
  487. output = &DeleteBucketAnalyticsConfigurationOutput{}
  488. req = c.newRequest(op, input, output)
  489. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  490. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  491. return
  492. }
  493. // DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  494. //
  495. // Deletes an analytics configuration for the bucket (specified by the analytics
  496. // configuration ID).
  497. //
  498. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  499. // with awserr.Error's Code and Message methods to get detailed information about
  500. // the error.
  501. //
  502. // See the AWS API reference guide for Amazon Simple Storage Service's
  503. // API operation DeleteBucketAnalyticsConfiguration for usage and error information.
  504. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
  505. func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  506. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  507. return out, req.Send()
  508. }
  509. // DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
  510. // the ability to pass a context and additional request options.
  511. //
  512. // See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
  513. //
  514. // The context must be non-nil and will be used for request cancellation. If
  515. // the context is nil a panic will occur. In the future the SDK may create
  516. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  517. // for more information on using Contexts.
  518. func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
  519. req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
  520. req.SetContext(ctx)
  521. req.ApplyOptions(opts...)
  522. return out, req.Send()
  523. }
  524. const opDeleteBucketCors = "DeleteBucketCors"
  525. // DeleteBucketCorsRequest generates a "aws/request.Request" representing the
  526. // client's request for the DeleteBucketCors operation. The "output" return
  527. // value will be populated with the request's response once the request completes
  528. // successfuly.
  529. //
  530. // Use "Send" method on the returned Request to send the API call to the service.
  531. // the "output" return value is not valid until after Send returns without error.
  532. //
  533. // See DeleteBucketCors for more information on using the DeleteBucketCors
  534. // API call, and error handling.
  535. //
  536. // This method is useful when you want to inject custom logic or configuration
  537. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  538. //
  539. //
  540. // // Example sending a request using the DeleteBucketCorsRequest method.
  541. // req, resp := client.DeleteBucketCorsRequest(params)
  542. //
  543. // err := req.Send()
  544. // if err == nil { // resp is now filled
  545. // fmt.Println(resp)
  546. // }
  547. //
  548. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  549. func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
  550. op := &request.Operation{
  551. Name: opDeleteBucketCors,
  552. HTTPMethod: "DELETE",
  553. HTTPPath: "/{Bucket}?cors",
  554. }
  555. if input == nil {
  556. input = &DeleteBucketCorsInput{}
  557. }
  558. output = &DeleteBucketCorsOutput{}
  559. req = c.newRequest(op, input, output)
  560. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  561. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  562. return
  563. }
  564. // DeleteBucketCors API operation for Amazon Simple Storage Service.
  565. //
  566. // Deletes the cors configuration information set for the bucket.
  567. //
  568. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  569. // with awserr.Error's Code and Message methods to get detailed information about
  570. // the error.
  571. //
  572. // See the AWS API reference guide for Amazon Simple Storage Service's
  573. // API operation DeleteBucketCors for usage and error information.
  574. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
  575. func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
  576. req, out := c.DeleteBucketCorsRequest(input)
  577. return out, req.Send()
  578. }
  579. // DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
  580. // the ability to pass a context and additional request options.
  581. //
  582. // See DeleteBucketCors for details on how to use this API operation.
  583. //
  584. // The context must be non-nil and will be used for request cancellation. If
  585. // the context is nil a panic will occur. In the future the SDK may create
  586. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  587. // for more information on using Contexts.
  588. func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
  589. req, out := c.DeleteBucketCorsRequest(input)
  590. req.SetContext(ctx)
  591. req.ApplyOptions(opts...)
  592. return out, req.Send()
  593. }
  594. const opDeleteBucketEncryption = "DeleteBucketEncryption"
  595. // DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
  596. // client's request for the DeleteBucketEncryption operation. The "output" return
  597. // value will be populated with the request's response once the request completes
  598. // successfuly.
  599. //
  600. // Use "Send" method on the returned Request to send the API call to the service.
  601. // the "output" return value is not valid until after Send returns without error.
  602. //
  603. // See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
  604. // API call, and error handling.
  605. //
  606. // This method is useful when you want to inject custom logic or configuration
  607. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  608. //
  609. //
  610. // // Example sending a request using the DeleteBucketEncryptionRequest method.
  611. // req, resp := client.DeleteBucketEncryptionRequest(params)
  612. //
  613. // err := req.Send()
  614. // if err == nil { // resp is now filled
  615. // fmt.Println(resp)
  616. // }
  617. //
  618. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  619. func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
  620. op := &request.Operation{
  621. Name: opDeleteBucketEncryption,
  622. HTTPMethod: "DELETE",
  623. HTTPPath: "/{Bucket}?encryption",
  624. }
  625. if input == nil {
  626. input = &DeleteBucketEncryptionInput{}
  627. }
  628. output = &DeleteBucketEncryptionOutput{}
  629. req = c.newRequest(op, input, output)
  630. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  631. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  632. return
  633. }
  634. // DeleteBucketEncryption API operation for Amazon Simple Storage Service.
  635. //
  636. // Deletes the server-side encryption configuration from the bucket.
  637. //
  638. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  639. // with awserr.Error's Code and Message methods to get detailed information about
  640. // the error.
  641. //
  642. // See the AWS API reference guide for Amazon Simple Storage Service's
  643. // API operation DeleteBucketEncryption for usage and error information.
  644. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
  645. func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
  646. req, out := c.DeleteBucketEncryptionRequest(input)
  647. return out, req.Send()
  648. }
  649. // DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
  650. // the ability to pass a context and additional request options.
  651. //
  652. // See DeleteBucketEncryption for details on how to use this API operation.
  653. //
  654. // The context must be non-nil and will be used for request cancellation. If
  655. // the context is nil a panic will occur. In the future the SDK may create
  656. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  657. // for more information on using Contexts.
  658. func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
  659. req, out := c.DeleteBucketEncryptionRequest(input)
  660. req.SetContext(ctx)
  661. req.ApplyOptions(opts...)
  662. return out, req.Send()
  663. }
  664. const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
  665. // DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  666. // client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
  667. // value will be populated with the request's response once the request completes
  668. // successfuly.
  669. //
  670. // Use "Send" method on the returned Request to send the API call to the service.
  671. // the "output" return value is not valid until after Send returns without error.
  672. //
  673. // See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
  674. // API call, and error handling.
  675. //
  676. // This method is useful when you want to inject custom logic or configuration
  677. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  678. //
  679. //
  680. // // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
  681. // req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
  682. //
  683. // err := req.Send()
  684. // if err == nil { // resp is now filled
  685. // fmt.Println(resp)
  686. // }
  687. //
  688. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  689. func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
  690. op := &request.Operation{
  691. Name: opDeleteBucketInventoryConfiguration,
  692. HTTPMethod: "DELETE",
  693. HTTPPath: "/{Bucket}?inventory",
  694. }
  695. if input == nil {
  696. input = &DeleteBucketInventoryConfigurationInput{}
  697. }
  698. output = &DeleteBucketInventoryConfigurationOutput{}
  699. req = c.newRequest(op, input, output)
  700. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  701. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  702. return
  703. }
  704. // DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  705. //
  706. // Deletes an inventory configuration (identified by the inventory ID) from
  707. // the bucket.
  708. //
  709. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  710. // with awserr.Error's Code and Message methods to get detailed information about
  711. // the error.
  712. //
  713. // See the AWS API reference guide for Amazon Simple Storage Service's
  714. // API operation DeleteBucketInventoryConfiguration for usage and error information.
  715. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
  716. func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
  717. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  718. return out, req.Send()
  719. }
  720. // DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
  721. // the ability to pass a context and additional request options.
  722. //
  723. // See DeleteBucketInventoryConfiguration for details on how to use this API operation.
  724. //
  725. // The context must be non-nil and will be used for request cancellation. If
  726. // the context is nil a panic will occur. In the future the SDK may create
  727. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  728. // for more information on using Contexts.
  729. func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
  730. req, out := c.DeleteBucketInventoryConfigurationRequest(input)
  731. req.SetContext(ctx)
  732. req.ApplyOptions(opts...)
  733. return out, req.Send()
  734. }
  735. const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
  736. // DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
  737. // client's request for the DeleteBucketLifecycle operation. The "output" return
  738. // value will be populated with the request's response once the request completes
  739. // successfuly.
  740. //
  741. // Use "Send" method on the returned Request to send the API call to the service.
  742. // the "output" return value is not valid until after Send returns without error.
  743. //
  744. // See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
  745. // API call, and error handling.
  746. //
  747. // This method is useful when you want to inject custom logic or configuration
  748. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  749. //
  750. //
  751. // // Example sending a request using the DeleteBucketLifecycleRequest method.
  752. // req, resp := client.DeleteBucketLifecycleRequest(params)
  753. //
  754. // err := req.Send()
  755. // if err == nil { // resp is now filled
  756. // fmt.Println(resp)
  757. // }
  758. //
  759. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  760. func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
  761. op := &request.Operation{
  762. Name: opDeleteBucketLifecycle,
  763. HTTPMethod: "DELETE",
  764. HTTPPath: "/{Bucket}?lifecycle",
  765. }
  766. if input == nil {
  767. input = &DeleteBucketLifecycleInput{}
  768. }
  769. output = &DeleteBucketLifecycleOutput{}
  770. req = c.newRequest(op, input, output)
  771. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  772. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  773. return
  774. }
  775. // DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
  776. //
  777. // Deletes the lifecycle configuration from the bucket.
  778. //
  779. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  780. // with awserr.Error's Code and Message methods to get detailed information about
  781. // the error.
  782. //
  783. // See the AWS API reference guide for Amazon Simple Storage Service's
  784. // API operation DeleteBucketLifecycle for usage and error information.
  785. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
  786. func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
  787. req, out := c.DeleteBucketLifecycleRequest(input)
  788. return out, req.Send()
  789. }
  790. // DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
  791. // the ability to pass a context and additional request options.
  792. //
  793. // See DeleteBucketLifecycle for details on how to use this API operation.
  794. //
  795. // The context must be non-nil and will be used for request cancellation. If
  796. // the context is nil a panic will occur. In the future the SDK may create
  797. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  798. // for more information on using Contexts.
  799. func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
  800. req, out := c.DeleteBucketLifecycleRequest(input)
  801. req.SetContext(ctx)
  802. req.ApplyOptions(opts...)
  803. return out, req.Send()
  804. }
  805. const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
  806. // DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  807. // client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
  808. // value will be populated with the request's response once the request completes
  809. // successfuly.
  810. //
  811. // Use "Send" method on the returned Request to send the API call to the service.
  812. // the "output" return value is not valid until after Send returns without error.
  813. //
  814. // See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
  815. // API call, and error handling.
  816. //
  817. // This method is useful when you want to inject custom logic or configuration
  818. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  819. //
  820. //
  821. // // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
  822. // req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
  823. //
  824. // err := req.Send()
  825. // if err == nil { // resp is now filled
  826. // fmt.Println(resp)
  827. // }
  828. //
  829. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  830. func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
  831. op := &request.Operation{
  832. Name: opDeleteBucketMetricsConfiguration,
  833. HTTPMethod: "DELETE",
  834. HTTPPath: "/{Bucket}?metrics",
  835. }
  836. if input == nil {
  837. input = &DeleteBucketMetricsConfigurationInput{}
  838. }
  839. output = &DeleteBucketMetricsConfigurationOutput{}
  840. req = c.newRequest(op, input, output)
  841. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  842. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  843. return
  844. }
  845. // DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  846. //
  847. // Deletes a metrics configuration (specified by the metrics configuration ID)
  848. // from the bucket.
  849. //
  850. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  851. // with awserr.Error's Code and Message methods to get detailed information about
  852. // the error.
  853. //
  854. // See the AWS API reference guide for Amazon Simple Storage Service's
  855. // API operation DeleteBucketMetricsConfiguration for usage and error information.
  856. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
  857. func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
  858. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  859. return out, req.Send()
  860. }
  861. // DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
  862. // the ability to pass a context and additional request options.
  863. //
  864. // See DeleteBucketMetricsConfiguration for details on how to use this API operation.
  865. //
  866. // The context must be non-nil and will be used for request cancellation. If
  867. // the context is nil a panic will occur. In the future the SDK may create
  868. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  869. // for more information on using Contexts.
  870. func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
  871. req, out := c.DeleteBucketMetricsConfigurationRequest(input)
  872. req.SetContext(ctx)
  873. req.ApplyOptions(opts...)
  874. return out, req.Send()
  875. }
  876. const opDeleteBucketPolicy = "DeleteBucketPolicy"
  877. // DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
  878. // client's request for the DeleteBucketPolicy operation. The "output" return
  879. // value will be populated with the request's response once the request completes
  880. // successfuly.
  881. //
  882. // Use "Send" method on the returned Request to send the API call to the service.
  883. // the "output" return value is not valid until after Send returns without error.
  884. //
  885. // See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
  886. // API call, and error handling.
  887. //
  888. // This method is useful when you want to inject custom logic or configuration
  889. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  890. //
  891. //
  892. // // Example sending a request using the DeleteBucketPolicyRequest method.
  893. // req, resp := client.DeleteBucketPolicyRequest(params)
  894. //
  895. // err := req.Send()
  896. // if err == nil { // resp is now filled
  897. // fmt.Println(resp)
  898. // }
  899. //
  900. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  901. func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
  902. op := &request.Operation{
  903. Name: opDeleteBucketPolicy,
  904. HTTPMethod: "DELETE",
  905. HTTPPath: "/{Bucket}?policy",
  906. }
  907. if input == nil {
  908. input = &DeleteBucketPolicyInput{}
  909. }
  910. output = &DeleteBucketPolicyOutput{}
  911. req = c.newRequest(op, input, output)
  912. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  913. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  914. return
  915. }
  916. // DeleteBucketPolicy API operation for Amazon Simple Storage Service.
  917. //
  918. // Deletes the policy from the bucket.
  919. //
  920. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  921. // with awserr.Error's Code and Message methods to get detailed information about
  922. // the error.
  923. //
  924. // See the AWS API reference guide for Amazon Simple Storage Service's
  925. // API operation DeleteBucketPolicy for usage and error information.
  926. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
  927. func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
  928. req, out := c.DeleteBucketPolicyRequest(input)
  929. return out, req.Send()
  930. }
  931. // DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
  932. // the ability to pass a context and additional request options.
  933. //
  934. // See DeleteBucketPolicy for details on how to use this API operation.
  935. //
  936. // The context must be non-nil and will be used for request cancellation. If
  937. // the context is nil a panic will occur. In the future the SDK may create
  938. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  939. // for more information on using Contexts.
  940. func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
  941. req, out := c.DeleteBucketPolicyRequest(input)
  942. req.SetContext(ctx)
  943. req.ApplyOptions(opts...)
  944. return out, req.Send()
  945. }
  946. const opDeleteBucketReplication = "DeleteBucketReplication"
  947. // DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
  948. // client's request for the DeleteBucketReplication operation. The "output" return
  949. // value will be populated with the request's response once the request completes
  950. // successfuly.
  951. //
  952. // Use "Send" method on the returned Request to send the API call to the service.
  953. // the "output" return value is not valid until after Send returns without error.
  954. //
  955. // See DeleteBucketReplication for more information on using the DeleteBucketReplication
  956. // API call, and error handling.
  957. //
  958. // This method is useful when you want to inject custom logic or configuration
  959. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  960. //
  961. //
  962. // // Example sending a request using the DeleteBucketReplicationRequest method.
  963. // req, resp := client.DeleteBucketReplicationRequest(params)
  964. //
  965. // err := req.Send()
  966. // if err == nil { // resp is now filled
  967. // fmt.Println(resp)
  968. // }
  969. //
  970. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  971. func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
  972. op := &request.Operation{
  973. Name: opDeleteBucketReplication,
  974. HTTPMethod: "DELETE",
  975. HTTPPath: "/{Bucket}?replication",
  976. }
  977. if input == nil {
  978. input = &DeleteBucketReplicationInput{}
  979. }
  980. output = &DeleteBucketReplicationOutput{}
  981. req = c.newRequest(op, input, output)
  982. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  983. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  984. return
  985. }
  986. // DeleteBucketReplication API operation for Amazon Simple Storage Service.
  987. //
  988. // Deletes the replication configuration from the bucket.
  989. //
  990. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  991. // with awserr.Error's Code and Message methods to get detailed information about
  992. // the error.
  993. //
  994. // See the AWS API reference guide for Amazon Simple Storage Service's
  995. // API operation DeleteBucketReplication for usage and error information.
  996. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
  997. func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
  998. req, out := c.DeleteBucketReplicationRequest(input)
  999. return out, req.Send()
  1000. }
  1001. // DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
  1002. // the ability to pass a context and additional request options.
  1003. //
  1004. // See DeleteBucketReplication for details on how to use this API operation.
  1005. //
  1006. // The context must be non-nil and will be used for request cancellation. If
  1007. // the context is nil a panic will occur. In the future the SDK may create
  1008. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1009. // for more information on using Contexts.
  1010. func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
  1011. req, out := c.DeleteBucketReplicationRequest(input)
  1012. req.SetContext(ctx)
  1013. req.ApplyOptions(opts...)
  1014. return out, req.Send()
  1015. }
  1016. const opDeleteBucketTagging = "DeleteBucketTagging"
  1017. // DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
  1018. // client's request for the DeleteBucketTagging operation. The "output" return
  1019. // value will be populated with the request's response once the request completes
  1020. // successfuly.
  1021. //
  1022. // Use "Send" method on the returned Request to send the API call to the service.
  1023. // the "output" return value is not valid until after Send returns without error.
  1024. //
  1025. // See DeleteBucketTagging for more information on using the DeleteBucketTagging
  1026. // API call, and error handling.
  1027. //
  1028. // This method is useful when you want to inject custom logic or configuration
  1029. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1030. //
  1031. //
  1032. // // Example sending a request using the DeleteBucketTaggingRequest method.
  1033. // req, resp := client.DeleteBucketTaggingRequest(params)
  1034. //
  1035. // err := req.Send()
  1036. // if err == nil { // resp is now filled
  1037. // fmt.Println(resp)
  1038. // }
  1039. //
  1040. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1041. func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
  1042. op := &request.Operation{
  1043. Name: opDeleteBucketTagging,
  1044. HTTPMethod: "DELETE",
  1045. HTTPPath: "/{Bucket}?tagging",
  1046. }
  1047. if input == nil {
  1048. input = &DeleteBucketTaggingInput{}
  1049. }
  1050. output = &DeleteBucketTaggingOutput{}
  1051. req = c.newRequest(op, input, output)
  1052. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1053. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1054. return
  1055. }
  1056. // DeleteBucketTagging API operation for Amazon Simple Storage Service.
  1057. //
  1058. // Deletes the tags from the bucket.
  1059. //
  1060. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1061. // with awserr.Error's Code and Message methods to get detailed information about
  1062. // the error.
  1063. //
  1064. // See the AWS API reference guide for Amazon Simple Storage Service's
  1065. // API operation DeleteBucketTagging for usage and error information.
  1066. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
  1067. func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
  1068. req, out := c.DeleteBucketTaggingRequest(input)
  1069. return out, req.Send()
  1070. }
  1071. // DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
  1072. // the ability to pass a context and additional request options.
  1073. //
  1074. // See DeleteBucketTagging for details on how to use this API operation.
  1075. //
  1076. // The context must be non-nil and will be used for request cancellation. If
  1077. // the context is nil a panic will occur. In the future the SDK may create
  1078. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1079. // for more information on using Contexts.
  1080. func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
  1081. req, out := c.DeleteBucketTaggingRequest(input)
  1082. req.SetContext(ctx)
  1083. req.ApplyOptions(opts...)
  1084. return out, req.Send()
  1085. }
  1086. const opDeleteBucketWebsite = "DeleteBucketWebsite"
  1087. // DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
  1088. // client's request for the DeleteBucketWebsite operation. The "output" return
  1089. // value will be populated with the request's response once the request completes
  1090. // successfuly.
  1091. //
  1092. // Use "Send" method on the returned Request to send the API call to the service.
  1093. // the "output" return value is not valid until after Send returns without error.
  1094. //
  1095. // See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
  1096. // API call, and error handling.
  1097. //
  1098. // This method is useful when you want to inject custom logic or configuration
  1099. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1100. //
  1101. //
  1102. // // Example sending a request using the DeleteBucketWebsiteRequest method.
  1103. // req, resp := client.DeleteBucketWebsiteRequest(params)
  1104. //
  1105. // err := req.Send()
  1106. // if err == nil { // resp is now filled
  1107. // fmt.Println(resp)
  1108. // }
  1109. //
  1110. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1111. func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
  1112. op := &request.Operation{
  1113. Name: opDeleteBucketWebsite,
  1114. HTTPMethod: "DELETE",
  1115. HTTPPath: "/{Bucket}?website",
  1116. }
  1117. if input == nil {
  1118. input = &DeleteBucketWebsiteInput{}
  1119. }
  1120. output = &DeleteBucketWebsiteOutput{}
  1121. req = c.newRequest(op, input, output)
  1122. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  1123. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  1124. return
  1125. }
  1126. // DeleteBucketWebsite API operation for Amazon Simple Storage Service.
  1127. //
  1128. // This operation removes the website configuration from the bucket.
  1129. //
  1130. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1131. // with awserr.Error's Code and Message methods to get detailed information about
  1132. // the error.
  1133. //
  1134. // See the AWS API reference guide for Amazon Simple Storage Service's
  1135. // API operation DeleteBucketWebsite for usage and error information.
  1136. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
  1137. func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
  1138. req, out := c.DeleteBucketWebsiteRequest(input)
  1139. return out, req.Send()
  1140. }
  1141. // DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
  1142. // the ability to pass a context and additional request options.
  1143. //
  1144. // See DeleteBucketWebsite for details on how to use this API operation.
  1145. //
  1146. // The context must be non-nil and will be used for request cancellation. If
  1147. // the context is nil a panic will occur. In the future the SDK may create
  1148. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1149. // for more information on using Contexts.
  1150. func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
  1151. req, out := c.DeleteBucketWebsiteRequest(input)
  1152. req.SetContext(ctx)
  1153. req.ApplyOptions(opts...)
  1154. return out, req.Send()
  1155. }
  1156. const opDeleteObject = "DeleteObject"
  1157. // DeleteObjectRequest generates a "aws/request.Request" representing the
  1158. // client's request for the DeleteObject operation. The "output" return
  1159. // value will be populated with the request's response once the request completes
  1160. // successfuly.
  1161. //
  1162. // Use "Send" method on the returned Request to send the API call to the service.
  1163. // the "output" return value is not valid until after Send returns without error.
  1164. //
  1165. // See DeleteObject for more information on using the DeleteObject
  1166. // API call, and error handling.
  1167. //
  1168. // This method is useful when you want to inject custom logic or configuration
  1169. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1170. //
  1171. //
  1172. // // Example sending a request using the DeleteObjectRequest method.
  1173. // req, resp := client.DeleteObjectRequest(params)
  1174. //
  1175. // err := req.Send()
  1176. // if err == nil { // resp is now filled
  1177. // fmt.Println(resp)
  1178. // }
  1179. //
  1180. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1181. func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
  1182. op := &request.Operation{
  1183. Name: opDeleteObject,
  1184. HTTPMethod: "DELETE",
  1185. HTTPPath: "/{Bucket}/{Key+}",
  1186. }
  1187. if input == nil {
  1188. input = &DeleteObjectInput{}
  1189. }
  1190. output = &DeleteObjectOutput{}
  1191. req = c.newRequest(op, input, output)
  1192. return
  1193. }
  1194. // DeleteObject API operation for Amazon Simple Storage Service.
  1195. //
  1196. // Removes the null version (if there is one) of an object and inserts a delete
  1197. // marker, which becomes the latest version of the object. If there isn't a
  1198. // null version, Amazon S3 does not remove any objects.
  1199. //
  1200. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1201. // with awserr.Error's Code and Message methods to get detailed information about
  1202. // the error.
  1203. //
  1204. // See the AWS API reference guide for Amazon Simple Storage Service's
  1205. // API operation DeleteObject for usage and error information.
  1206. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
  1207. func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
  1208. req, out := c.DeleteObjectRequest(input)
  1209. return out, req.Send()
  1210. }
  1211. // DeleteObjectWithContext is the same as DeleteObject with the addition of
  1212. // the ability to pass a context and additional request options.
  1213. //
  1214. // See DeleteObject for details on how to use this API operation.
  1215. //
  1216. // The context must be non-nil and will be used for request cancellation. If
  1217. // the context is nil a panic will occur. In the future the SDK may create
  1218. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1219. // for more information on using Contexts.
  1220. func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
  1221. req, out := c.DeleteObjectRequest(input)
  1222. req.SetContext(ctx)
  1223. req.ApplyOptions(opts...)
  1224. return out, req.Send()
  1225. }
  1226. const opDeleteObjectTagging = "DeleteObjectTagging"
  1227. // DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
  1228. // client's request for the DeleteObjectTagging operation. The "output" return
  1229. // value will be populated with the request's response once the request completes
  1230. // successfuly.
  1231. //
  1232. // Use "Send" method on the returned Request to send the API call to the service.
  1233. // the "output" return value is not valid until after Send returns without error.
  1234. //
  1235. // See DeleteObjectTagging for more information on using the DeleteObjectTagging
  1236. // API call, and error handling.
  1237. //
  1238. // This method is useful when you want to inject custom logic or configuration
  1239. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1240. //
  1241. //
  1242. // // Example sending a request using the DeleteObjectTaggingRequest method.
  1243. // req, resp := client.DeleteObjectTaggingRequest(params)
  1244. //
  1245. // err := req.Send()
  1246. // if err == nil { // resp is now filled
  1247. // fmt.Println(resp)
  1248. // }
  1249. //
  1250. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1251. func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
  1252. op := &request.Operation{
  1253. Name: opDeleteObjectTagging,
  1254. HTTPMethod: "DELETE",
  1255. HTTPPath: "/{Bucket}/{Key+}?tagging",
  1256. }
  1257. if input == nil {
  1258. input = &DeleteObjectTaggingInput{}
  1259. }
  1260. output = &DeleteObjectTaggingOutput{}
  1261. req = c.newRequest(op, input, output)
  1262. return
  1263. }
  1264. // DeleteObjectTagging API operation for Amazon Simple Storage Service.
  1265. //
  1266. // Removes the tag-set from an existing object.
  1267. //
  1268. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1269. // with awserr.Error's Code and Message methods to get detailed information about
  1270. // the error.
  1271. //
  1272. // See the AWS API reference guide for Amazon Simple Storage Service's
  1273. // API operation DeleteObjectTagging for usage and error information.
  1274. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
  1275. func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
  1276. req, out := c.DeleteObjectTaggingRequest(input)
  1277. return out, req.Send()
  1278. }
  1279. // DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
  1280. // the ability to pass a context and additional request options.
  1281. //
  1282. // See DeleteObjectTagging for details on how to use this API operation.
  1283. //
  1284. // The context must be non-nil and will be used for request cancellation. If
  1285. // the context is nil a panic will occur. In the future the SDK may create
  1286. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1287. // for more information on using Contexts.
  1288. func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
  1289. req, out := c.DeleteObjectTaggingRequest(input)
  1290. req.SetContext(ctx)
  1291. req.ApplyOptions(opts...)
  1292. return out, req.Send()
  1293. }
  1294. const opDeleteObjects = "DeleteObjects"
  1295. // DeleteObjectsRequest generates a "aws/request.Request" representing the
  1296. // client's request for the DeleteObjects operation. The "output" return
  1297. // value will be populated with the request's response once the request completes
  1298. // successfuly.
  1299. //
  1300. // Use "Send" method on the returned Request to send the API call to the service.
  1301. // the "output" return value is not valid until after Send returns without error.
  1302. //
  1303. // See DeleteObjects for more information on using the DeleteObjects
  1304. // API call, and error handling.
  1305. //
  1306. // This method is useful when you want to inject custom logic or configuration
  1307. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1308. //
  1309. //
  1310. // // Example sending a request using the DeleteObjectsRequest method.
  1311. // req, resp := client.DeleteObjectsRequest(params)
  1312. //
  1313. // err := req.Send()
  1314. // if err == nil { // resp is now filled
  1315. // fmt.Println(resp)
  1316. // }
  1317. //
  1318. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1319. func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
  1320. op := &request.Operation{
  1321. Name: opDeleteObjects,
  1322. HTTPMethod: "POST",
  1323. HTTPPath: "/{Bucket}?delete",
  1324. }
  1325. if input == nil {
  1326. input = &DeleteObjectsInput{}
  1327. }
  1328. output = &DeleteObjectsOutput{}
  1329. req = c.newRequest(op, input, output)
  1330. return
  1331. }
  1332. // DeleteObjects API operation for Amazon Simple Storage Service.
  1333. //
  1334. // This operation enables you to delete multiple objects from a bucket using
  1335. // a single HTTP request. You may specify up to 1000 keys.
  1336. //
  1337. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1338. // with awserr.Error's Code and Message methods to get detailed information about
  1339. // the error.
  1340. //
  1341. // See the AWS API reference guide for Amazon Simple Storage Service's
  1342. // API operation DeleteObjects for usage and error information.
  1343. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
  1344. func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
  1345. req, out := c.DeleteObjectsRequest(input)
  1346. return out, req.Send()
  1347. }
  1348. // DeleteObjectsWithContext is the same as DeleteObjects with the addition of
  1349. // the ability to pass a context and additional request options.
  1350. //
  1351. // See DeleteObjects for details on how to use this API operation.
  1352. //
  1353. // The context must be non-nil and will be used for request cancellation. If
  1354. // the context is nil a panic will occur. In the future the SDK may create
  1355. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1356. // for more information on using Contexts.
  1357. func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
  1358. req, out := c.DeleteObjectsRequest(input)
  1359. req.SetContext(ctx)
  1360. req.ApplyOptions(opts...)
  1361. return out, req.Send()
  1362. }
  1363. const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
  1364. // GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  1365. // client's request for the GetBucketAccelerateConfiguration operation. The "output" return
  1366. // value will be populated with the request's response once the request completes
  1367. // successfuly.
  1368. //
  1369. // Use "Send" method on the returned Request to send the API call to the service.
  1370. // the "output" return value is not valid until after Send returns without error.
  1371. //
  1372. // See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
  1373. // API call, and error handling.
  1374. //
  1375. // This method is useful when you want to inject custom logic or configuration
  1376. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1377. //
  1378. //
  1379. // // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
  1380. // req, resp := client.GetBucketAccelerateConfigurationRequest(params)
  1381. //
  1382. // err := req.Send()
  1383. // if err == nil { // resp is now filled
  1384. // fmt.Println(resp)
  1385. // }
  1386. //
  1387. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1388. func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
  1389. op := &request.Operation{
  1390. Name: opGetBucketAccelerateConfiguration,
  1391. HTTPMethod: "GET",
  1392. HTTPPath: "/{Bucket}?accelerate",
  1393. }
  1394. if input == nil {
  1395. input = &GetBucketAccelerateConfigurationInput{}
  1396. }
  1397. output = &GetBucketAccelerateConfigurationOutput{}
  1398. req = c.newRequest(op, input, output)
  1399. return
  1400. }
  1401. // GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  1402. //
  1403. // Returns the accelerate configuration of a bucket.
  1404. //
  1405. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1406. // with awserr.Error's Code and Message methods to get detailed information about
  1407. // the error.
  1408. //
  1409. // See the AWS API reference guide for Amazon Simple Storage Service's
  1410. // API operation GetBucketAccelerateConfiguration for usage and error information.
  1411. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
  1412. func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
  1413. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1414. return out, req.Send()
  1415. }
  1416. // GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
  1417. // the ability to pass a context and additional request options.
  1418. //
  1419. // See GetBucketAccelerateConfiguration for details on how to use this API operation.
  1420. //
  1421. // The context must be non-nil and will be used for request cancellation. If
  1422. // the context is nil a panic will occur. In the future the SDK may create
  1423. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1424. // for more information on using Contexts.
  1425. func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
  1426. req, out := c.GetBucketAccelerateConfigurationRequest(input)
  1427. req.SetContext(ctx)
  1428. req.ApplyOptions(opts...)
  1429. return out, req.Send()
  1430. }
  1431. const opGetBucketAcl = "GetBucketAcl"
  1432. // GetBucketAclRequest generates a "aws/request.Request" representing the
  1433. // client's request for the GetBucketAcl operation. The "output" return
  1434. // value will be populated with the request's response once the request completes
  1435. // successfuly.
  1436. //
  1437. // Use "Send" method on the returned Request to send the API call to the service.
  1438. // the "output" return value is not valid until after Send returns without error.
  1439. //
  1440. // See GetBucketAcl for more information on using the GetBucketAcl
  1441. // API call, and error handling.
  1442. //
  1443. // This method is useful when you want to inject custom logic or configuration
  1444. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1445. //
  1446. //
  1447. // // Example sending a request using the GetBucketAclRequest method.
  1448. // req, resp := client.GetBucketAclRequest(params)
  1449. //
  1450. // err := req.Send()
  1451. // if err == nil { // resp is now filled
  1452. // fmt.Println(resp)
  1453. // }
  1454. //
  1455. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1456. func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
  1457. op := &request.Operation{
  1458. Name: opGetBucketAcl,
  1459. HTTPMethod: "GET",
  1460. HTTPPath: "/{Bucket}?acl",
  1461. }
  1462. if input == nil {
  1463. input = &GetBucketAclInput{}
  1464. }
  1465. output = &GetBucketAclOutput{}
  1466. req = c.newRequest(op, input, output)
  1467. return
  1468. }
  1469. // GetBucketAcl API operation for Amazon Simple Storage Service.
  1470. //
  1471. // Gets the access control policy for the bucket.
  1472. //
  1473. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1474. // with awserr.Error's Code and Message methods to get detailed information about
  1475. // the error.
  1476. //
  1477. // See the AWS API reference guide for Amazon Simple Storage Service's
  1478. // API operation GetBucketAcl for usage and error information.
  1479. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
  1480. func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
  1481. req, out := c.GetBucketAclRequest(input)
  1482. return out, req.Send()
  1483. }
  1484. // GetBucketAclWithContext is the same as GetBucketAcl with the addition of
  1485. // the ability to pass a context and additional request options.
  1486. //
  1487. // See GetBucketAcl for details on how to use this API operation.
  1488. //
  1489. // The context must be non-nil and will be used for request cancellation. If
  1490. // the context is nil a panic will occur. In the future the SDK may create
  1491. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1492. // for more information on using Contexts.
  1493. func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
  1494. req, out := c.GetBucketAclRequest(input)
  1495. req.SetContext(ctx)
  1496. req.ApplyOptions(opts...)
  1497. return out, req.Send()
  1498. }
  1499. const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
  1500. // GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  1501. // client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
  1502. // value will be populated with the request's response once the request completes
  1503. // successfuly.
  1504. //
  1505. // Use "Send" method on the returned Request to send the API call to the service.
  1506. // the "output" return value is not valid until after Send returns without error.
  1507. //
  1508. // See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
  1509. // API call, and error handling.
  1510. //
  1511. // This method is useful when you want to inject custom logic or configuration
  1512. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1513. //
  1514. //
  1515. // // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
  1516. // req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
  1517. //
  1518. // err := req.Send()
  1519. // if err == nil { // resp is now filled
  1520. // fmt.Println(resp)
  1521. // }
  1522. //
  1523. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1524. func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
  1525. op := &request.Operation{
  1526. Name: opGetBucketAnalyticsConfiguration,
  1527. HTTPMethod: "GET",
  1528. HTTPPath: "/{Bucket}?analytics",
  1529. }
  1530. if input == nil {
  1531. input = &GetBucketAnalyticsConfigurationInput{}
  1532. }
  1533. output = &GetBucketAnalyticsConfigurationOutput{}
  1534. req = c.newRequest(op, input, output)
  1535. return
  1536. }
  1537. // GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  1538. //
  1539. // Gets an analytics configuration for the bucket (specified by the analytics
  1540. // configuration ID).
  1541. //
  1542. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1543. // with awserr.Error's Code and Message methods to get detailed information about
  1544. // the error.
  1545. //
  1546. // See the AWS API reference guide for Amazon Simple Storage Service's
  1547. // API operation GetBucketAnalyticsConfiguration for usage and error information.
  1548. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
  1549. func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
  1550. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1551. return out, req.Send()
  1552. }
  1553. // GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
  1554. // the ability to pass a context and additional request options.
  1555. //
  1556. // See GetBucketAnalyticsConfiguration for details on how to use this API operation.
  1557. //
  1558. // The context must be non-nil and will be used for request cancellation. If
  1559. // the context is nil a panic will occur. In the future the SDK may create
  1560. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1561. // for more information on using Contexts.
  1562. func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
  1563. req, out := c.GetBucketAnalyticsConfigurationRequest(input)
  1564. req.SetContext(ctx)
  1565. req.ApplyOptions(opts...)
  1566. return out, req.Send()
  1567. }
  1568. const opGetBucketCors = "GetBucketCors"
  1569. // GetBucketCorsRequest generates a "aws/request.Request" representing the
  1570. // client's request for the GetBucketCors operation. The "output" return
  1571. // value will be populated with the request's response once the request completes
  1572. // successfuly.
  1573. //
  1574. // Use "Send" method on the returned Request to send the API call to the service.
  1575. // the "output" return value is not valid until after Send returns without error.
  1576. //
  1577. // See GetBucketCors for more information on using the GetBucketCors
  1578. // API call, and error handling.
  1579. //
  1580. // This method is useful when you want to inject custom logic or configuration
  1581. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1582. //
  1583. //
  1584. // // Example sending a request using the GetBucketCorsRequest method.
  1585. // req, resp := client.GetBucketCorsRequest(params)
  1586. //
  1587. // err := req.Send()
  1588. // if err == nil { // resp is now filled
  1589. // fmt.Println(resp)
  1590. // }
  1591. //
  1592. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1593. func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
  1594. op := &request.Operation{
  1595. Name: opGetBucketCors,
  1596. HTTPMethod: "GET",
  1597. HTTPPath: "/{Bucket}?cors",
  1598. }
  1599. if input == nil {
  1600. input = &GetBucketCorsInput{}
  1601. }
  1602. output = &GetBucketCorsOutput{}
  1603. req = c.newRequest(op, input, output)
  1604. return
  1605. }
  1606. // GetBucketCors API operation for Amazon Simple Storage Service.
  1607. //
  1608. // Returns the cors configuration for the bucket.
  1609. //
  1610. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1611. // with awserr.Error's Code and Message methods to get detailed information about
  1612. // the error.
  1613. //
  1614. // See the AWS API reference guide for Amazon Simple Storage Service's
  1615. // API operation GetBucketCors for usage and error information.
  1616. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
  1617. func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
  1618. req, out := c.GetBucketCorsRequest(input)
  1619. return out, req.Send()
  1620. }
  1621. // GetBucketCorsWithContext is the same as GetBucketCors with the addition of
  1622. // the ability to pass a context and additional request options.
  1623. //
  1624. // See GetBucketCors for details on how to use this API operation.
  1625. //
  1626. // The context must be non-nil and will be used for request cancellation. If
  1627. // the context is nil a panic will occur. In the future the SDK may create
  1628. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1629. // for more information on using Contexts.
  1630. func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
  1631. req, out := c.GetBucketCorsRequest(input)
  1632. req.SetContext(ctx)
  1633. req.ApplyOptions(opts...)
  1634. return out, req.Send()
  1635. }
  1636. const opGetBucketEncryption = "GetBucketEncryption"
  1637. // GetBucketEncryptionRequest generates a "aws/request.Request" representing the
  1638. // client's request for the GetBucketEncryption operation. The "output" return
  1639. // value will be populated with the request's response once the request completes
  1640. // successfuly.
  1641. //
  1642. // Use "Send" method on the returned Request to send the API call to the service.
  1643. // the "output" return value is not valid until after Send returns without error.
  1644. //
  1645. // See GetBucketEncryption for more information on using the GetBucketEncryption
  1646. // API call, and error handling.
  1647. //
  1648. // This method is useful when you want to inject custom logic or configuration
  1649. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1650. //
  1651. //
  1652. // // Example sending a request using the GetBucketEncryptionRequest method.
  1653. // req, resp := client.GetBucketEncryptionRequest(params)
  1654. //
  1655. // err := req.Send()
  1656. // if err == nil { // resp is now filled
  1657. // fmt.Println(resp)
  1658. // }
  1659. //
  1660. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1661. func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
  1662. op := &request.Operation{
  1663. Name: opGetBucketEncryption,
  1664. HTTPMethod: "GET",
  1665. HTTPPath: "/{Bucket}?encryption",
  1666. }
  1667. if input == nil {
  1668. input = &GetBucketEncryptionInput{}
  1669. }
  1670. output = &GetBucketEncryptionOutput{}
  1671. req = c.newRequest(op, input, output)
  1672. return
  1673. }
  1674. // GetBucketEncryption API operation for Amazon Simple Storage Service.
  1675. //
  1676. // Returns the server-side encryption configuration of a bucket.
  1677. //
  1678. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1679. // with awserr.Error's Code and Message methods to get detailed information about
  1680. // the error.
  1681. //
  1682. // See the AWS API reference guide for Amazon Simple Storage Service's
  1683. // API operation GetBucketEncryption for usage and error information.
  1684. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
  1685. func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
  1686. req, out := c.GetBucketEncryptionRequest(input)
  1687. return out, req.Send()
  1688. }
  1689. // GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
  1690. // the ability to pass a context and additional request options.
  1691. //
  1692. // See GetBucketEncryption for details on how to use this API operation.
  1693. //
  1694. // The context must be non-nil and will be used for request cancellation. If
  1695. // the context is nil a panic will occur. In the future the SDK may create
  1696. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1697. // for more information on using Contexts.
  1698. func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
  1699. req, out := c.GetBucketEncryptionRequest(input)
  1700. req.SetContext(ctx)
  1701. req.ApplyOptions(opts...)
  1702. return out, req.Send()
  1703. }
  1704. const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
  1705. // GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  1706. // client's request for the GetBucketInventoryConfiguration operation. The "output" return
  1707. // value will be populated with the request's response once the request completes
  1708. // successfuly.
  1709. //
  1710. // Use "Send" method on the returned Request to send the API call to the service.
  1711. // the "output" return value is not valid until after Send returns without error.
  1712. //
  1713. // See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
  1714. // API call, and error handling.
  1715. //
  1716. // This method is useful when you want to inject custom logic or configuration
  1717. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1718. //
  1719. //
  1720. // // Example sending a request using the GetBucketInventoryConfigurationRequest method.
  1721. // req, resp := client.GetBucketInventoryConfigurationRequest(params)
  1722. //
  1723. // err := req.Send()
  1724. // if err == nil { // resp is now filled
  1725. // fmt.Println(resp)
  1726. // }
  1727. //
  1728. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1729. func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
  1730. op := &request.Operation{
  1731. Name: opGetBucketInventoryConfiguration,
  1732. HTTPMethod: "GET",
  1733. HTTPPath: "/{Bucket}?inventory",
  1734. }
  1735. if input == nil {
  1736. input = &GetBucketInventoryConfigurationInput{}
  1737. }
  1738. output = &GetBucketInventoryConfigurationOutput{}
  1739. req = c.newRequest(op, input, output)
  1740. return
  1741. }
  1742. // GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  1743. //
  1744. // Returns an inventory configuration (identified by the inventory ID) from
  1745. // the bucket.
  1746. //
  1747. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1748. // with awserr.Error's Code and Message methods to get detailed information about
  1749. // the error.
  1750. //
  1751. // See the AWS API reference guide for Amazon Simple Storage Service's
  1752. // API operation GetBucketInventoryConfiguration for usage and error information.
  1753. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
  1754. func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
  1755. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1756. return out, req.Send()
  1757. }
  1758. // GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
  1759. // the ability to pass a context and additional request options.
  1760. //
  1761. // See GetBucketInventoryConfiguration for details on how to use this API operation.
  1762. //
  1763. // The context must be non-nil and will be used for request cancellation. If
  1764. // the context is nil a panic will occur. In the future the SDK may create
  1765. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1766. // for more information on using Contexts.
  1767. func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
  1768. req, out := c.GetBucketInventoryConfigurationRequest(input)
  1769. req.SetContext(ctx)
  1770. req.ApplyOptions(opts...)
  1771. return out, req.Send()
  1772. }
  1773. const opGetBucketLifecycle = "GetBucketLifecycle"
  1774. // GetBucketLifecycleRequest generates a "aws/request.Request" representing the
  1775. // client's request for the GetBucketLifecycle operation. The "output" return
  1776. // value will be populated with the request's response once the request completes
  1777. // successfuly.
  1778. //
  1779. // Use "Send" method on the returned Request to send the API call to the service.
  1780. // the "output" return value is not valid until after Send returns without error.
  1781. //
  1782. // See GetBucketLifecycle for more information on using the GetBucketLifecycle
  1783. // API call, and error handling.
  1784. //
  1785. // This method is useful when you want to inject custom logic or configuration
  1786. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1787. //
  1788. //
  1789. // // Example sending a request using the GetBucketLifecycleRequest method.
  1790. // req, resp := client.GetBucketLifecycleRequest(params)
  1791. //
  1792. // err := req.Send()
  1793. // if err == nil { // resp is now filled
  1794. // fmt.Println(resp)
  1795. // }
  1796. //
  1797. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1798. func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
  1799. if c.Client.Config.Logger != nil {
  1800. c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
  1801. }
  1802. op := &request.Operation{
  1803. Name: opGetBucketLifecycle,
  1804. HTTPMethod: "GET",
  1805. HTTPPath: "/{Bucket}?lifecycle",
  1806. }
  1807. if input == nil {
  1808. input = &GetBucketLifecycleInput{}
  1809. }
  1810. output = &GetBucketLifecycleOutput{}
  1811. req = c.newRequest(op, input, output)
  1812. return
  1813. }
  1814. // GetBucketLifecycle API operation for Amazon Simple Storage Service.
  1815. //
  1816. // Deprecated, see the GetBucketLifecycleConfiguration operation.
  1817. //
  1818. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1819. // with awserr.Error's Code and Message methods to get detailed information about
  1820. // the error.
  1821. //
  1822. // See the AWS API reference guide for Amazon Simple Storage Service's
  1823. // API operation GetBucketLifecycle for usage and error information.
  1824. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
  1825. func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
  1826. req, out := c.GetBucketLifecycleRequest(input)
  1827. return out, req.Send()
  1828. }
  1829. // GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
  1830. // the ability to pass a context and additional request options.
  1831. //
  1832. // See GetBucketLifecycle for details on how to use this API operation.
  1833. //
  1834. // The context must be non-nil and will be used for request cancellation. If
  1835. // the context is nil a panic will occur. In the future the SDK may create
  1836. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1837. // for more information on using Contexts.
  1838. func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
  1839. req, out := c.GetBucketLifecycleRequest(input)
  1840. req.SetContext(ctx)
  1841. req.ApplyOptions(opts...)
  1842. return out, req.Send()
  1843. }
  1844. const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
  1845. // GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  1846. // client's request for the GetBucketLifecycleConfiguration operation. The "output" return
  1847. // value will be populated with the request's response once the request completes
  1848. // successfuly.
  1849. //
  1850. // Use "Send" method on the returned Request to send the API call to the service.
  1851. // the "output" return value is not valid until after Send returns without error.
  1852. //
  1853. // See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
  1854. // API call, and error handling.
  1855. //
  1856. // This method is useful when you want to inject custom logic or configuration
  1857. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1858. //
  1859. //
  1860. // // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
  1861. // req, resp := client.GetBucketLifecycleConfigurationRequest(params)
  1862. //
  1863. // err := req.Send()
  1864. // if err == nil { // resp is now filled
  1865. // fmt.Println(resp)
  1866. // }
  1867. //
  1868. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1869. func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
  1870. op := &request.Operation{
  1871. Name: opGetBucketLifecycleConfiguration,
  1872. HTTPMethod: "GET",
  1873. HTTPPath: "/{Bucket}?lifecycle",
  1874. }
  1875. if input == nil {
  1876. input = &GetBucketLifecycleConfigurationInput{}
  1877. }
  1878. output = &GetBucketLifecycleConfigurationOutput{}
  1879. req = c.newRequest(op, input, output)
  1880. return
  1881. }
  1882. // GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  1883. //
  1884. // Returns the lifecycle configuration information set on the bucket.
  1885. //
  1886. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1887. // with awserr.Error's Code and Message methods to get detailed information about
  1888. // the error.
  1889. //
  1890. // See the AWS API reference guide for Amazon Simple Storage Service's
  1891. // API operation GetBucketLifecycleConfiguration for usage and error information.
  1892. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
  1893. func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
  1894. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1895. return out, req.Send()
  1896. }
  1897. // GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
  1898. // the ability to pass a context and additional request options.
  1899. //
  1900. // See GetBucketLifecycleConfiguration for details on how to use this API operation.
  1901. //
  1902. // The context must be non-nil and will be used for request cancellation. If
  1903. // the context is nil a panic will occur. In the future the SDK may create
  1904. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1905. // for more information on using Contexts.
  1906. func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
  1907. req, out := c.GetBucketLifecycleConfigurationRequest(input)
  1908. req.SetContext(ctx)
  1909. req.ApplyOptions(opts...)
  1910. return out, req.Send()
  1911. }
  1912. const opGetBucketLocation = "GetBucketLocation"
  1913. // GetBucketLocationRequest generates a "aws/request.Request" representing the
  1914. // client's request for the GetBucketLocation operation. The "output" return
  1915. // value will be populated with the request's response once the request completes
  1916. // successfuly.
  1917. //
  1918. // Use "Send" method on the returned Request to send the API call to the service.
  1919. // the "output" return value is not valid until after Send returns without error.
  1920. //
  1921. // See GetBucketLocation for more information on using the GetBucketLocation
  1922. // API call, and error handling.
  1923. //
  1924. // This method is useful when you want to inject custom logic or configuration
  1925. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1926. //
  1927. //
  1928. // // Example sending a request using the GetBucketLocationRequest method.
  1929. // req, resp := client.GetBucketLocationRequest(params)
  1930. //
  1931. // err := req.Send()
  1932. // if err == nil { // resp is now filled
  1933. // fmt.Println(resp)
  1934. // }
  1935. //
  1936. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1937. func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
  1938. op := &request.Operation{
  1939. Name: opGetBucketLocation,
  1940. HTTPMethod: "GET",
  1941. HTTPPath: "/{Bucket}?location",
  1942. }
  1943. if input == nil {
  1944. input = &GetBucketLocationInput{}
  1945. }
  1946. output = &GetBucketLocationOutput{}
  1947. req = c.newRequest(op, input, output)
  1948. return
  1949. }
  1950. // GetBucketLocation API operation for Amazon Simple Storage Service.
  1951. //
  1952. // Returns the region the bucket resides in.
  1953. //
  1954. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1955. // with awserr.Error's Code and Message methods to get detailed information about
  1956. // the error.
  1957. //
  1958. // See the AWS API reference guide for Amazon Simple Storage Service's
  1959. // API operation GetBucketLocation for usage and error information.
  1960. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
  1961. func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
  1962. req, out := c.GetBucketLocationRequest(input)
  1963. return out, req.Send()
  1964. }
  1965. // GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
  1966. // the ability to pass a context and additional request options.
  1967. //
  1968. // See GetBucketLocation for details on how to use this API operation.
  1969. //
  1970. // The context must be non-nil and will be used for request cancellation. If
  1971. // the context is nil a panic will occur. In the future the SDK may create
  1972. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1973. // for more information on using Contexts.
  1974. func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
  1975. req, out := c.GetBucketLocationRequest(input)
  1976. req.SetContext(ctx)
  1977. req.ApplyOptions(opts...)
  1978. return out, req.Send()
  1979. }
  1980. const opGetBucketLogging = "GetBucketLogging"
  1981. // GetBucketLoggingRequest generates a "aws/request.Request" representing the
  1982. // client's request for the GetBucketLogging operation. The "output" return
  1983. // value will be populated with the request's response once the request completes
  1984. // successfuly.
  1985. //
  1986. // Use "Send" method on the returned Request to send the API call to the service.
  1987. // the "output" return value is not valid until after Send returns without error.
  1988. //
  1989. // See GetBucketLogging for more information on using the GetBucketLogging
  1990. // API call, and error handling.
  1991. //
  1992. // This method is useful when you want to inject custom logic or configuration
  1993. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1994. //
  1995. //
  1996. // // Example sending a request using the GetBucketLoggingRequest method.
  1997. // req, resp := client.GetBucketLoggingRequest(params)
  1998. //
  1999. // err := req.Send()
  2000. // if err == nil { // resp is now filled
  2001. // fmt.Println(resp)
  2002. // }
  2003. //
  2004. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2005. func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
  2006. op := &request.Operation{
  2007. Name: opGetBucketLogging,
  2008. HTTPMethod: "GET",
  2009. HTTPPath: "/{Bucket}?logging",
  2010. }
  2011. if input == nil {
  2012. input = &GetBucketLoggingInput{}
  2013. }
  2014. output = &GetBucketLoggingOutput{}
  2015. req = c.newRequest(op, input, output)
  2016. return
  2017. }
  2018. // GetBucketLogging API operation for Amazon Simple Storage Service.
  2019. //
  2020. // Returns the logging status of a bucket and the permissions users have to
  2021. // view and modify that status. To use GET, you must be the bucket owner.
  2022. //
  2023. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2024. // with awserr.Error's Code and Message methods to get detailed information about
  2025. // the error.
  2026. //
  2027. // See the AWS API reference guide for Amazon Simple Storage Service's
  2028. // API operation GetBucketLogging for usage and error information.
  2029. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
  2030. func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
  2031. req, out := c.GetBucketLoggingRequest(input)
  2032. return out, req.Send()
  2033. }
  2034. // GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
  2035. // the ability to pass a context and additional request options.
  2036. //
  2037. // See GetBucketLogging for details on how to use this API operation.
  2038. //
  2039. // The context must be non-nil and will be used for request cancellation. If
  2040. // the context is nil a panic will occur. In the future the SDK may create
  2041. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2042. // for more information on using Contexts.
  2043. func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
  2044. req, out := c.GetBucketLoggingRequest(input)
  2045. req.SetContext(ctx)
  2046. req.ApplyOptions(opts...)
  2047. return out, req.Send()
  2048. }
  2049. const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
  2050. // GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  2051. // client's request for the GetBucketMetricsConfiguration operation. The "output" return
  2052. // value will be populated with the request's response once the request completes
  2053. // successfuly.
  2054. //
  2055. // Use "Send" method on the returned Request to send the API call to the service.
  2056. // the "output" return value is not valid until after Send returns without error.
  2057. //
  2058. // See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
  2059. // API call, and error handling.
  2060. //
  2061. // This method is useful when you want to inject custom logic or configuration
  2062. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2063. //
  2064. //
  2065. // // Example sending a request using the GetBucketMetricsConfigurationRequest method.
  2066. // req, resp := client.GetBucketMetricsConfigurationRequest(params)
  2067. //
  2068. // err := req.Send()
  2069. // if err == nil { // resp is now filled
  2070. // fmt.Println(resp)
  2071. // }
  2072. //
  2073. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2074. func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
  2075. op := &request.Operation{
  2076. Name: opGetBucketMetricsConfiguration,
  2077. HTTPMethod: "GET",
  2078. HTTPPath: "/{Bucket}?metrics",
  2079. }
  2080. if input == nil {
  2081. input = &GetBucketMetricsConfigurationInput{}
  2082. }
  2083. output = &GetBucketMetricsConfigurationOutput{}
  2084. req = c.newRequest(op, input, output)
  2085. return
  2086. }
  2087. // GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  2088. //
  2089. // Gets a metrics configuration (specified by the metrics configuration ID)
  2090. // from the bucket.
  2091. //
  2092. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2093. // with awserr.Error's Code and Message methods to get detailed information about
  2094. // the error.
  2095. //
  2096. // See the AWS API reference guide for Amazon Simple Storage Service's
  2097. // API operation GetBucketMetricsConfiguration for usage and error information.
  2098. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
  2099. func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
  2100. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2101. return out, req.Send()
  2102. }
  2103. // GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
  2104. // the ability to pass a context and additional request options.
  2105. //
  2106. // See GetBucketMetricsConfiguration for details on how to use this API operation.
  2107. //
  2108. // The context must be non-nil and will be used for request cancellation. If
  2109. // the context is nil a panic will occur. In the future the SDK may create
  2110. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2111. // for more information on using Contexts.
  2112. func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
  2113. req, out := c.GetBucketMetricsConfigurationRequest(input)
  2114. req.SetContext(ctx)
  2115. req.ApplyOptions(opts...)
  2116. return out, req.Send()
  2117. }
  2118. const opGetBucketNotification = "GetBucketNotification"
  2119. // GetBucketNotificationRequest generates a "aws/request.Request" representing the
  2120. // client's request for the GetBucketNotification operation. The "output" return
  2121. // value will be populated with the request's response once the request completes
  2122. // successfuly.
  2123. //
  2124. // Use "Send" method on the returned Request to send the API call to the service.
  2125. // the "output" return value is not valid until after Send returns without error.
  2126. //
  2127. // See GetBucketNotification for more information on using the GetBucketNotification
  2128. // API call, and error handling.
  2129. //
  2130. // This method is useful when you want to inject custom logic or configuration
  2131. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2132. //
  2133. //
  2134. // // Example sending a request using the GetBucketNotificationRequest method.
  2135. // req, resp := client.GetBucketNotificationRequest(params)
  2136. //
  2137. // err := req.Send()
  2138. // if err == nil { // resp is now filled
  2139. // fmt.Println(resp)
  2140. // }
  2141. //
  2142. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2143. func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
  2144. if c.Client.Config.Logger != nil {
  2145. c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
  2146. }
  2147. op := &request.Operation{
  2148. Name: opGetBucketNotification,
  2149. HTTPMethod: "GET",
  2150. HTTPPath: "/{Bucket}?notification",
  2151. }
  2152. if input == nil {
  2153. input = &GetBucketNotificationConfigurationRequest{}
  2154. }
  2155. output = &NotificationConfigurationDeprecated{}
  2156. req = c.newRequest(op, input, output)
  2157. return
  2158. }
  2159. // GetBucketNotification API operation for Amazon Simple Storage Service.
  2160. //
  2161. // Deprecated, see the GetBucketNotificationConfiguration operation.
  2162. //
  2163. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2164. // with awserr.Error's Code and Message methods to get detailed information about
  2165. // the error.
  2166. //
  2167. // See the AWS API reference guide for Amazon Simple Storage Service's
  2168. // API operation GetBucketNotification for usage and error information.
  2169. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
  2170. func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
  2171. req, out := c.GetBucketNotificationRequest(input)
  2172. return out, req.Send()
  2173. }
  2174. // GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
  2175. // the ability to pass a context and additional request options.
  2176. //
  2177. // See GetBucketNotification for details on how to use this API operation.
  2178. //
  2179. // The context must be non-nil and will be used for request cancellation. If
  2180. // the context is nil a panic will occur. In the future the SDK may create
  2181. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2182. // for more information on using Contexts.
  2183. func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
  2184. req, out := c.GetBucketNotificationRequest(input)
  2185. req.SetContext(ctx)
  2186. req.ApplyOptions(opts...)
  2187. return out, req.Send()
  2188. }
  2189. const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
  2190. // GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  2191. // client's request for the GetBucketNotificationConfiguration operation. The "output" return
  2192. // value will be populated with the request's response once the request completes
  2193. // successfuly.
  2194. //
  2195. // Use "Send" method on the returned Request to send the API call to the service.
  2196. // the "output" return value is not valid until after Send returns without error.
  2197. //
  2198. // See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
  2199. // API call, and error handling.
  2200. //
  2201. // This method is useful when you want to inject custom logic or configuration
  2202. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2203. //
  2204. //
  2205. // // Example sending a request using the GetBucketNotificationConfigurationRequest method.
  2206. // req, resp := client.GetBucketNotificationConfigurationRequest(params)
  2207. //
  2208. // err := req.Send()
  2209. // if err == nil { // resp is now filled
  2210. // fmt.Println(resp)
  2211. // }
  2212. //
  2213. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2214. func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
  2215. op := &request.Operation{
  2216. Name: opGetBucketNotificationConfiguration,
  2217. HTTPMethod: "GET",
  2218. HTTPPath: "/{Bucket}?notification",
  2219. }
  2220. if input == nil {
  2221. input = &GetBucketNotificationConfigurationRequest{}
  2222. }
  2223. output = &NotificationConfiguration{}
  2224. req = c.newRequest(op, input, output)
  2225. return
  2226. }
  2227. // GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  2228. //
  2229. // Returns the notification configuration of a bucket.
  2230. //
  2231. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2232. // with awserr.Error's Code and Message methods to get detailed information about
  2233. // the error.
  2234. //
  2235. // See the AWS API reference guide for Amazon Simple Storage Service's
  2236. // API operation GetBucketNotificationConfiguration for usage and error information.
  2237. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
  2238. func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
  2239. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2240. return out, req.Send()
  2241. }
  2242. // GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
  2243. // the ability to pass a context and additional request options.
  2244. //
  2245. // See GetBucketNotificationConfiguration for details on how to use this API operation.
  2246. //
  2247. // The context must be non-nil and will be used for request cancellation. If
  2248. // the context is nil a panic will occur. In the future the SDK may create
  2249. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2250. // for more information on using Contexts.
  2251. func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
  2252. req, out := c.GetBucketNotificationConfigurationRequest(input)
  2253. req.SetContext(ctx)
  2254. req.ApplyOptions(opts...)
  2255. return out, req.Send()
  2256. }
  2257. const opGetBucketPolicy = "GetBucketPolicy"
  2258. // GetBucketPolicyRequest generates a "aws/request.Request" representing the
  2259. // client's request for the GetBucketPolicy operation. The "output" return
  2260. // value will be populated with the request's response once the request completes
  2261. // successfuly.
  2262. //
  2263. // Use "Send" method on the returned Request to send the API call to the service.
  2264. // the "output" return value is not valid until after Send returns without error.
  2265. //
  2266. // See GetBucketPolicy for more information on using the GetBucketPolicy
  2267. // API call, and error handling.
  2268. //
  2269. // This method is useful when you want to inject custom logic or configuration
  2270. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2271. //
  2272. //
  2273. // // Example sending a request using the GetBucketPolicyRequest method.
  2274. // req, resp := client.GetBucketPolicyRequest(params)
  2275. //
  2276. // err := req.Send()
  2277. // if err == nil { // resp is now filled
  2278. // fmt.Println(resp)
  2279. // }
  2280. //
  2281. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2282. func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
  2283. op := &request.Operation{
  2284. Name: opGetBucketPolicy,
  2285. HTTPMethod: "GET",
  2286. HTTPPath: "/{Bucket}?policy",
  2287. }
  2288. if input == nil {
  2289. input = &GetBucketPolicyInput{}
  2290. }
  2291. output = &GetBucketPolicyOutput{}
  2292. req = c.newRequest(op, input, output)
  2293. return
  2294. }
  2295. // GetBucketPolicy API operation for Amazon Simple Storage Service.
  2296. //
  2297. // Returns the policy of a specified bucket.
  2298. //
  2299. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2300. // with awserr.Error's Code and Message methods to get detailed information about
  2301. // the error.
  2302. //
  2303. // See the AWS API reference guide for Amazon Simple Storage Service's
  2304. // API operation GetBucketPolicy for usage and error information.
  2305. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
  2306. func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
  2307. req, out := c.GetBucketPolicyRequest(input)
  2308. return out, req.Send()
  2309. }
  2310. // GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
  2311. // the ability to pass a context and additional request options.
  2312. //
  2313. // See GetBucketPolicy for details on how to use this API operation.
  2314. //
  2315. // The context must be non-nil and will be used for request cancellation. If
  2316. // the context is nil a panic will occur. In the future the SDK may create
  2317. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2318. // for more information on using Contexts.
  2319. func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
  2320. req, out := c.GetBucketPolicyRequest(input)
  2321. req.SetContext(ctx)
  2322. req.ApplyOptions(opts...)
  2323. return out, req.Send()
  2324. }
  2325. const opGetBucketReplication = "GetBucketReplication"
  2326. // GetBucketReplicationRequest generates a "aws/request.Request" representing the
  2327. // client's request for the GetBucketReplication operation. The "output" return
  2328. // value will be populated with the request's response once the request completes
  2329. // successfuly.
  2330. //
  2331. // Use "Send" method on the returned Request to send the API call to the service.
  2332. // the "output" return value is not valid until after Send returns without error.
  2333. //
  2334. // See GetBucketReplication for more information on using the GetBucketReplication
  2335. // API call, and error handling.
  2336. //
  2337. // This method is useful when you want to inject custom logic or configuration
  2338. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2339. //
  2340. //
  2341. // // Example sending a request using the GetBucketReplicationRequest method.
  2342. // req, resp := client.GetBucketReplicationRequest(params)
  2343. //
  2344. // err := req.Send()
  2345. // if err == nil { // resp is now filled
  2346. // fmt.Println(resp)
  2347. // }
  2348. //
  2349. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2350. func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
  2351. op := &request.Operation{
  2352. Name: opGetBucketReplication,
  2353. HTTPMethod: "GET",
  2354. HTTPPath: "/{Bucket}?replication",
  2355. }
  2356. if input == nil {
  2357. input = &GetBucketReplicationInput{}
  2358. }
  2359. output = &GetBucketReplicationOutput{}
  2360. req = c.newRequest(op, input, output)
  2361. return
  2362. }
  2363. // GetBucketReplication API operation for Amazon Simple Storage Service.
  2364. //
  2365. // Returns the replication configuration of a bucket.
  2366. //
  2367. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2368. // with awserr.Error's Code and Message methods to get detailed information about
  2369. // the error.
  2370. //
  2371. // See the AWS API reference guide for Amazon Simple Storage Service's
  2372. // API operation GetBucketReplication for usage and error information.
  2373. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
  2374. func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
  2375. req, out := c.GetBucketReplicationRequest(input)
  2376. return out, req.Send()
  2377. }
  2378. // GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
  2379. // the ability to pass a context and additional request options.
  2380. //
  2381. // See GetBucketReplication for details on how to use this API operation.
  2382. //
  2383. // The context must be non-nil and will be used for request cancellation. If
  2384. // the context is nil a panic will occur. In the future the SDK may create
  2385. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2386. // for more information on using Contexts.
  2387. func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
  2388. req, out := c.GetBucketReplicationRequest(input)
  2389. req.SetContext(ctx)
  2390. req.ApplyOptions(opts...)
  2391. return out, req.Send()
  2392. }
  2393. const opGetBucketRequestPayment = "GetBucketRequestPayment"
  2394. // GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  2395. // client's request for the GetBucketRequestPayment operation. The "output" return
  2396. // value will be populated with the request's response once the request completes
  2397. // successfuly.
  2398. //
  2399. // Use "Send" method on the returned Request to send the API call to the service.
  2400. // the "output" return value is not valid until after Send returns without error.
  2401. //
  2402. // See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
  2403. // API call, and error handling.
  2404. //
  2405. // This method is useful when you want to inject custom logic or configuration
  2406. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2407. //
  2408. //
  2409. // // Example sending a request using the GetBucketRequestPaymentRequest method.
  2410. // req, resp := client.GetBucketRequestPaymentRequest(params)
  2411. //
  2412. // err := req.Send()
  2413. // if err == nil { // resp is now filled
  2414. // fmt.Println(resp)
  2415. // }
  2416. //
  2417. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2418. func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
  2419. op := &request.Operation{
  2420. Name: opGetBucketRequestPayment,
  2421. HTTPMethod: "GET",
  2422. HTTPPath: "/{Bucket}?requestPayment",
  2423. }
  2424. if input == nil {
  2425. input = &GetBucketRequestPaymentInput{}
  2426. }
  2427. output = &GetBucketRequestPaymentOutput{}
  2428. req = c.newRequest(op, input, output)
  2429. return
  2430. }
  2431. // GetBucketRequestPayment API operation for Amazon Simple Storage Service.
  2432. //
  2433. // Returns the request payment configuration of a bucket.
  2434. //
  2435. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2436. // with awserr.Error's Code and Message methods to get detailed information about
  2437. // the error.
  2438. //
  2439. // See the AWS API reference guide for Amazon Simple Storage Service's
  2440. // API operation GetBucketRequestPayment for usage and error information.
  2441. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
  2442. func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
  2443. req, out := c.GetBucketRequestPaymentRequest(input)
  2444. return out, req.Send()
  2445. }
  2446. // GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
  2447. // the ability to pass a context and additional request options.
  2448. //
  2449. // See GetBucketRequestPayment for details on how to use this API operation.
  2450. //
  2451. // The context must be non-nil and will be used for request cancellation. If
  2452. // the context is nil a panic will occur. In the future the SDK may create
  2453. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2454. // for more information on using Contexts.
  2455. func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
  2456. req, out := c.GetBucketRequestPaymentRequest(input)
  2457. req.SetContext(ctx)
  2458. req.ApplyOptions(opts...)
  2459. return out, req.Send()
  2460. }
  2461. const opGetBucketTagging = "GetBucketTagging"
  2462. // GetBucketTaggingRequest generates a "aws/request.Request" representing the
  2463. // client's request for the GetBucketTagging operation. The "output" return
  2464. // value will be populated with the request's response once the request completes
  2465. // successfuly.
  2466. //
  2467. // Use "Send" method on the returned Request to send the API call to the service.
  2468. // the "output" return value is not valid until after Send returns without error.
  2469. //
  2470. // See GetBucketTagging for more information on using the GetBucketTagging
  2471. // API call, and error handling.
  2472. //
  2473. // This method is useful when you want to inject custom logic or configuration
  2474. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2475. //
  2476. //
  2477. // // Example sending a request using the GetBucketTaggingRequest method.
  2478. // req, resp := client.GetBucketTaggingRequest(params)
  2479. //
  2480. // err := req.Send()
  2481. // if err == nil { // resp is now filled
  2482. // fmt.Println(resp)
  2483. // }
  2484. //
  2485. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2486. func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
  2487. op := &request.Operation{
  2488. Name: opGetBucketTagging,
  2489. HTTPMethod: "GET",
  2490. HTTPPath: "/{Bucket}?tagging",
  2491. }
  2492. if input == nil {
  2493. input = &GetBucketTaggingInput{}
  2494. }
  2495. output = &GetBucketTaggingOutput{}
  2496. req = c.newRequest(op, input, output)
  2497. return
  2498. }
  2499. // GetBucketTagging API operation for Amazon Simple Storage Service.
  2500. //
  2501. // Returns the tag set associated with the bucket.
  2502. //
  2503. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2504. // with awserr.Error's Code and Message methods to get detailed information about
  2505. // the error.
  2506. //
  2507. // See the AWS API reference guide for Amazon Simple Storage Service's
  2508. // API operation GetBucketTagging for usage and error information.
  2509. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
  2510. func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
  2511. req, out := c.GetBucketTaggingRequest(input)
  2512. return out, req.Send()
  2513. }
  2514. // GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
  2515. // the ability to pass a context and additional request options.
  2516. //
  2517. // See GetBucketTagging for details on how to use this API operation.
  2518. //
  2519. // The context must be non-nil and will be used for request cancellation. If
  2520. // the context is nil a panic will occur. In the future the SDK may create
  2521. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2522. // for more information on using Contexts.
  2523. func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
  2524. req, out := c.GetBucketTaggingRequest(input)
  2525. req.SetContext(ctx)
  2526. req.ApplyOptions(opts...)
  2527. return out, req.Send()
  2528. }
  2529. const opGetBucketVersioning = "GetBucketVersioning"
  2530. // GetBucketVersioningRequest generates a "aws/request.Request" representing the
  2531. // client's request for the GetBucketVersioning operation. The "output" return
  2532. // value will be populated with the request's response once the request completes
  2533. // successfuly.
  2534. //
  2535. // Use "Send" method on the returned Request to send the API call to the service.
  2536. // the "output" return value is not valid until after Send returns without error.
  2537. //
  2538. // See GetBucketVersioning for more information on using the GetBucketVersioning
  2539. // API call, and error handling.
  2540. //
  2541. // This method is useful when you want to inject custom logic or configuration
  2542. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2543. //
  2544. //
  2545. // // Example sending a request using the GetBucketVersioningRequest method.
  2546. // req, resp := client.GetBucketVersioningRequest(params)
  2547. //
  2548. // err := req.Send()
  2549. // if err == nil { // resp is now filled
  2550. // fmt.Println(resp)
  2551. // }
  2552. //
  2553. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2554. func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
  2555. op := &request.Operation{
  2556. Name: opGetBucketVersioning,
  2557. HTTPMethod: "GET",
  2558. HTTPPath: "/{Bucket}?versioning",
  2559. }
  2560. if input == nil {
  2561. input = &GetBucketVersioningInput{}
  2562. }
  2563. output = &GetBucketVersioningOutput{}
  2564. req = c.newRequest(op, input, output)
  2565. return
  2566. }
  2567. // GetBucketVersioning API operation for Amazon Simple Storage Service.
  2568. //
  2569. // Returns the versioning state of a bucket.
  2570. //
  2571. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2572. // with awserr.Error's Code and Message methods to get detailed information about
  2573. // the error.
  2574. //
  2575. // See the AWS API reference guide for Amazon Simple Storage Service's
  2576. // API operation GetBucketVersioning for usage and error information.
  2577. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
  2578. func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
  2579. req, out := c.GetBucketVersioningRequest(input)
  2580. return out, req.Send()
  2581. }
  2582. // GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
  2583. // the ability to pass a context and additional request options.
  2584. //
  2585. // See GetBucketVersioning for details on how to use this API operation.
  2586. //
  2587. // The context must be non-nil and will be used for request cancellation. If
  2588. // the context is nil a panic will occur. In the future the SDK may create
  2589. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2590. // for more information on using Contexts.
  2591. func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
  2592. req, out := c.GetBucketVersioningRequest(input)
  2593. req.SetContext(ctx)
  2594. req.ApplyOptions(opts...)
  2595. return out, req.Send()
  2596. }
  2597. const opGetBucketWebsite = "GetBucketWebsite"
  2598. // GetBucketWebsiteRequest generates a "aws/request.Request" representing the
  2599. // client's request for the GetBucketWebsite operation. The "output" return
  2600. // value will be populated with the request's response once the request completes
  2601. // successfuly.
  2602. //
  2603. // Use "Send" method on the returned Request to send the API call to the service.
  2604. // the "output" return value is not valid until after Send returns without error.
  2605. //
  2606. // See GetBucketWebsite for more information on using the GetBucketWebsite
  2607. // API call, and error handling.
  2608. //
  2609. // This method is useful when you want to inject custom logic or configuration
  2610. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2611. //
  2612. //
  2613. // // Example sending a request using the GetBucketWebsiteRequest method.
  2614. // req, resp := client.GetBucketWebsiteRequest(params)
  2615. //
  2616. // err := req.Send()
  2617. // if err == nil { // resp is now filled
  2618. // fmt.Println(resp)
  2619. // }
  2620. //
  2621. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2622. func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
  2623. op := &request.Operation{
  2624. Name: opGetBucketWebsite,
  2625. HTTPMethod: "GET",
  2626. HTTPPath: "/{Bucket}?website",
  2627. }
  2628. if input == nil {
  2629. input = &GetBucketWebsiteInput{}
  2630. }
  2631. output = &GetBucketWebsiteOutput{}
  2632. req = c.newRequest(op, input, output)
  2633. return
  2634. }
  2635. // GetBucketWebsite API operation for Amazon Simple Storage Service.
  2636. //
  2637. // Returns the website configuration for a bucket.
  2638. //
  2639. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2640. // with awserr.Error's Code and Message methods to get detailed information about
  2641. // the error.
  2642. //
  2643. // See the AWS API reference guide for Amazon Simple Storage Service's
  2644. // API operation GetBucketWebsite for usage and error information.
  2645. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
  2646. func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
  2647. req, out := c.GetBucketWebsiteRequest(input)
  2648. return out, req.Send()
  2649. }
  2650. // GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
  2651. // the ability to pass a context and additional request options.
  2652. //
  2653. // See GetBucketWebsite for details on how to use this API operation.
  2654. //
  2655. // The context must be non-nil and will be used for request cancellation. If
  2656. // the context is nil a panic will occur. In the future the SDK may create
  2657. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2658. // for more information on using Contexts.
  2659. func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
  2660. req, out := c.GetBucketWebsiteRequest(input)
  2661. req.SetContext(ctx)
  2662. req.ApplyOptions(opts...)
  2663. return out, req.Send()
  2664. }
  2665. const opGetObject = "GetObject"
  2666. // GetObjectRequest generates a "aws/request.Request" representing the
  2667. // client's request for the GetObject operation. The "output" return
  2668. // value will be populated with the request's response once the request completes
  2669. // successfuly.
  2670. //
  2671. // Use "Send" method on the returned Request to send the API call to the service.
  2672. // the "output" return value is not valid until after Send returns without error.
  2673. //
  2674. // See GetObject for more information on using the GetObject
  2675. // API call, and error handling.
  2676. //
  2677. // This method is useful when you want to inject custom logic or configuration
  2678. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2679. //
  2680. //
  2681. // // Example sending a request using the GetObjectRequest method.
  2682. // req, resp := client.GetObjectRequest(params)
  2683. //
  2684. // err := req.Send()
  2685. // if err == nil { // resp is now filled
  2686. // fmt.Println(resp)
  2687. // }
  2688. //
  2689. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2690. func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
  2691. op := &request.Operation{
  2692. Name: opGetObject,
  2693. HTTPMethod: "GET",
  2694. HTTPPath: "/{Bucket}/{Key+}",
  2695. }
  2696. if input == nil {
  2697. input = &GetObjectInput{}
  2698. }
  2699. output = &GetObjectOutput{}
  2700. req = c.newRequest(op, input, output)
  2701. return
  2702. }
  2703. // GetObject API operation for Amazon Simple Storage Service.
  2704. //
  2705. // Retrieves objects from Amazon S3.
  2706. //
  2707. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2708. // with awserr.Error's Code and Message methods to get detailed information about
  2709. // the error.
  2710. //
  2711. // See the AWS API reference guide for Amazon Simple Storage Service's
  2712. // API operation GetObject for usage and error information.
  2713. //
  2714. // Returned Error Codes:
  2715. // * ErrCodeNoSuchKey "NoSuchKey"
  2716. // The specified key does not exist.
  2717. //
  2718. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
  2719. func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
  2720. req, out := c.GetObjectRequest(input)
  2721. return out, req.Send()
  2722. }
  2723. // GetObjectWithContext is the same as GetObject with the addition of
  2724. // the ability to pass a context and additional request options.
  2725. //
  2726. // See GetObject for details on how to use this API operation.
  2727. //
  2728. // The context must be non-nil and will be used for request cancellation. If
  2729. // the context is nil a panic will occur. In the future the SDK may create
  2730. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2731. // for more information on using Contexts.
  2732. func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
  2733. req, out := c.GetObjectRequest(input)
  2734. req.SetContext(ctx)
  2735. req.ApplyOptions(opts...)
  2736. return out, req.Send()
  2737. }
  2738. const opGetObjectAcl = "GetObjectAcl"
  2739. // GetObjectAclRequest generates a "aws/request.Request" representing the
  2740. // client's request for the GetObjectAcl operation. The "output" return
  2741. // value will be populated with the request's response once the request completes
  2742. // successfuly.
  2743. //
  2744. // Use "Send" method on the returned Request to send the API call to the service.
  2745. // the "output" return value is not valid until after Send returns without error.
  2746. //
  2747. // See GetObjectAcl for more information on using the GetObjectAcl
  2748. // API call, and error handling.
  2749. //
  2750. // This method is useful when you want to inject custom logic or configuration
  2751. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2752. //
  2753. //
  2754. // // Example sending a request using the GetObjectAclRequest method.
  2755. // req, resp := client.GetObjectAclRequest(params)
  2756. //
  2757. // err := req.Send()
  2758. // if err == nil { // resp is now filled
  2759. // fmt.Println(resp)
  2760. // }
  2761. //
  2762. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2763. func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
  2764. op := &request.Operation{
  2765. Name: opGetObjectAcl,
  2766. HTTPMethod: "GET",
  2767. HTTPPath: "/{Bucket}/{Key+}?acl",
  2768. }
  2769. if input == nil {
  2770. input = &GetObjectAclInput{}
  2771. }
  2772. output = &GetObjectAclOutput{}
  2773. req = c.newRequest(op, input, output)
  2774. return
  2775. }
  2776. // GetObjectAcl API operation for Amazon Simple Storage Service.
  2777. //
  2778. // Returns the access control list (ACL) of an object.
  2779. //
  2780. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2781. // with awserr.Error's Code and Message methods to get detailed information about
  2782. // the error.
  2783. //
  2784. // See the AWS API reference guide for Amazon Simple Storage Service's
  2785. // API operation GetObjectAcl for usage and error information.
  2786. //
  2787. // Returned Error Codes:
  2788. // * ErrCodeNoSuchKey "NoSuchKey"
  2789. // The specified key does not exist.
  2790. //
  2791. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
  2792. func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
  2793. req, out := c.GetObjectAclRequest(input)
  2794. return out, req.Send()
  2795. }
  2796. // GetObjectAclWithContext is the same as GetObjectAcl with the addition of
  2797. // the ability to pass a context and additional request options.
  2798. //
  2799. // See GetObjectAcl for details on how to use this API operation.
  2800. //
  2801. // The context must be non-nil and will be used for request cancellation. If
  2802. // the context is nil a panic will occur. In the future the SDK may create
  2803. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2804. // for more information on using Contexts.
  2805. func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
  2806. req, out := c.GetObjectAclRequest(input)
  2807. req.SetContext(ctx)
  2808. req.ApplyOptions(opts...)
  2809. return out, req.Send()
  2810. }
  2811. const opGetObjectTagging = "GetObjectTagging"
  2812. // GetObjectTaggingRequest generates a "aws/request.Request" representing the
  2813. // client's request for the GetObjectTagging operation. The "output" return
  2814. // value will be populated with the request's response once the request completes
  2815. // successfuly.
  2816. //
  2817. // Use "Send" method on the returned Request to send the API call to the service.
  2818. // the "output" return value is not valid until after Send returns without error.
  2819. //
  2820. // See GetObjectTagging for more information on using the GetObjectTagging
  2821. // API call, and error handling.
  2822. //
  2823. // This method is useful when you want to inject custom logic or configuration
  2824. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2825. //
  2826. //
  2827. // // Example sending a request using the GetObjectTaggingRequest method.
  2828. // req, resp := client.GetObjectTaggingRequest(params)
  2829. //
  2830. // err := req.Send()
  2831. // if err == nil { // resp is now filled
  2832. // fmt.Println(resp)
  2833. // }
  2834. //
  2835. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2836. func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
  2837. op := &request.Operation{
  2838. Name: opGetObjectTagging,
  2839. HTTPMethod: "GET",
  2840. HTTPPath: "/{Bucket}/{Key+}?tagging",
  2841. }
  2842. if input == nil {
  2843. input = &GetObjectTaggingInput{}
  2844. }
  2845. output = &GetObjectTaggingOutput{}
  2846. req = c.newRequest(op, input, output)
  2847. return
  2848. }
  2849. // GetObjectTagging API operation for Amazon Simple Storage Service.
  2850. //
  2851. // Returns the tag-set of an object.
  2852. //
  2853. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2854. // with awserr.Error's Code and Message methods to get detailed information about
  2855. // the error.
  2856. //
  2857. // See the AWS API reference guide for Amazon Simple Storage Service's
  2858. // API operation GetObjectTagging for usage and error information.
  2859. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
  2860. func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
  2861. req, out := c.GetObjectTaggingRequest(input)
  2862. return out, req.Send()
  2863. }
  2864. // GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
  2865. // the ability to pass a context and additional request options.
  2866. //
  2867. // See GetObjectTagging for details on how to use this API operation.
  2868. //
  2869. // The context must be non-nil and will be used for request cancellation. If
  2870. // the context is nil a panic will occur. In the future the SDK may create
  2871. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2872. // for more information on using Contexts.
  2873. func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
  2874. req, out := c.GetObjectTaggingRequest(input)
  2875. req.SetContext(ctx)
  2876. req.ApplyOptions(opts...)
  2877. return out, req.Send()
  2878. }
  2879. const opGetObjectTorrent = "GetObjectTorrent"
  2880. // GetObjectTorrentRequest generates a "aws/request.Request" representing the
  2881. // client's request for the GetObjectTorrent operation. The "output" return
  2882. // value will be populated with the request's response once the request completes
  2883. // successfuly.
  2884. //
  2885. // Use "Send" method on the returned Request to send the API call to the service.
  2886. // the "output" return value is not valid until after Send returns without error.
  2887. //
  2888. // See GetObjectTorrent for more information on using the GetObjectTorrent
  2889. // API call, and error handling.
  2890. //
  2891. // This method is useful when you want to inject custom logic or configuration
  2892. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2893. //
  2894. //
  2895. // // Example sending a request using the GetObjectTorrentRequest method.
  2896. // req, resp := client.GetObjectTorrentRequest(params)
  2897. //
  2898. // err := req.Send()
  2899. // if err == nil { // resp is now filled
  2900. // fmt.Println(resp)
  2901. // }
  2902. //
  2903. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2904. func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
  2905. op := &request.Operation{
  2906. Name: opGetObjectTorrent,
  2907. HTTPMethod: "GET",
  2908. HTTPPath: "/{Bucket}/{Key+}?torrent",
  2909. }
  2910. if input == nil {
  2911. input = &GetObjectTorrentInput{}
  2912. }
  2913. output = &GetObjectTorrentOutput{}
  2914. req = c.newRequest(op, input, output)
  2915. return
  2916. }
  2917. // GetObjectTorrent API operation for Amazon Simple Storage Service.
  2918. //
  2919. // Return torrent files from a bucket.
  2920. //
  2921. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2922. // with awserr.Error's Code and Message methods to get detailed information about
  2923. // the error.
  2924. //
  2925. // See the AWS API reference guide for Amazon Simple Storage Service's
  2926. // API operation GetObjectTorrent for usage and error information.
  2927. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
  2928. func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
  2929. req, out := c.GetObjectTorrentRequest(input)
  2930. return out, req.Send()
  2931. }
  2932. // GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
  2933. // the ability to pass a context and additional request options.
  2934. //
  2935. // See GetObjectTorrent for details on how to use this API operation.
  2936. //
  2937. // The context must be non-nil and will be used for request cancellation. If
  2938. // the context is nil a panic will occur. In the future the SDK may create
  2939. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  2940. // for more information on using Contexts.
  2941. func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
  2942. req, out := c.GetObjectTorrentRequest(input)
  2943. req.SetContext(ctx)
  2944. req.ApplyOptions(opts...)
  2945. return out, req.Send()
  2946. }
  2947. const opHeadBucket = "HeadBucket"
  2948. // HeadBucketRequest generates a "aws/request.Request" representing the
  2949. // client's request for the HeadBucket operation. The "output" return
  2950. // value will be populated with the request's response once the request completes
  2951. // successfuly.
  2952. //
  2953. // Use "Send" method on the returned Request to send the API call to the service.
  2954. // the "output" return value is not valid until after Send returns without error.
  2955. //
  2956. // See HeadBucket for more information on using the HeadBucket
  2957. // API call, and error handling.
  2958. //
  2959. // This method is useful when you want to inject custom logic or configuration
  2960. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  2961. //
  2962. //
  2963. // // Example sending a request using the HeadBucketRequest method.
  2964. // req, resp := client.HeadBucketRequest(params)
  2965. //
  2966. // err := req.Send()
  2967. // if err == nil { // resp is now filled
  2968. // fmt.Println(resp)
  2969. // }
  2970. //
  2971. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  2972. func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
  2973. op := &request.Operation{
  2974. Name: opHeadBucket,
  2975. HTTPMethod: "HEAD",
  2976. HTTPPath: "/{Bucket}",
  2977. }
  2978. if input == nil {
  2979. input = &HeadBucketInput{}
  2980. }
  2981. output = &HeadBucketOutput{}
  2982. req = c.newRequest(op, input, output)
  2983. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  2984. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  2985. return
  2986. }
  2987. // HeadBucket API operation for Amazon Simple Storage Service.
  2988. //
  2989. // This operation is useful to determine if a bucket exists and you have permission
  2990. // to access it.
  2991. //
  2992. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  2993. // with awserr.Error's Code and Message methods to get detailed information about
  2994. // the error.
  2995. //
  2996. // See the AWS API reference guide for Amazon Simple Storage Service's
  2997. // API operation HeadBucket for usage and error information.
  2998. //
  2999. // Returned Error Codes:
  3000. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3001. // The specified bucket does not exist.
  3002. //
  3003. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
  3004. func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
  3005. req, out := c.HeadBucketRequest(input)
  3006. return out, req.Send()
  3007. }
  3008. // HeadBucketWithContext is the same as HeadBucket with the addition of
  3009. // the ability to pass a context and additional request options.
  3010. //
  3011. // See HeadBucket for details on how to use this API operation.
  3012. //
  3013. // The context must be non-nil and will be used for request cancellation. If
  3014. // the context is nil a panic will occur. In the future the SDK may create
  3015. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3016. // for more information on using Contexts.
  3017. func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
  3018. req, out := c.HeadBucketRequest(input)
  3019. req.SetContext(ctx)
  3020. req.ApplyOptions(opts...)
  3021. return out, req.Send()
  3022. }
  3023. const opHeadObject = "HeadObject"
  3024. // HeadObjectRequest generates a "aws/request.Request" representing the
  3025. // client's request for the HeadObject operation. The "output" return
  3026. // value will be populated with the request's response once the request completes
  3027. // successfuly.
  3028. //
  3029. // Use "Send" method on the returned Request to send the API call to the service.
  3030. // the "output" return value is not valid until after Send returns without error.
  3031. //
  3032. // See HeadObject for more information on using the HeadObject
  3033. // API call, and error handling.
  3034. //
  3035. // This method is useful when you want to inject custom logic or configuration
  3036. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3037. //
  3038. //
  3039. // // Example sending a request using the HeadObjectRequest method.
  3040. // req, resp := client.HeadObjectRequest(params)
  3041. //
  3042. // err := req.Send()
  3043. // if err == nil { // resp is now filled
  3044. // fmt.Println(resp)
  3045. // }
  3046. //
  3047. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3048. func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
  3049. op := &request.Operation{
  3050. Name: opHeadObject,
  3051. HTTPMethod: "HEAD",
  3052. HTTPPath: "/{Bucket}/{Key+}",
  3053. }
  3054. if input == nil {
  3055. input = &HeadObjectInput{}
  3056. }
  3057. output = &HeadObjectOutput{}
  3058. req = c.newRequest(op, input, output)
  3059. return
  3060. }
  3061. // HeadObject API operation for Amazon Simple Storage Service.
  3062. //
  3063. // The HEAD operation retrieves metadata from an object without returning the
  3064. // object itself. This operation is useful if you're only interested in an object's
  3065. // metadata. To use HEAD, you must have READ access to the object.
  3066. //
  3067. // See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
  3068. // for more information on returned errors.
  3069. //
  3070. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3071. // with awserr.Error's Code and Message methods to get detailed information about
  3072. // the error.
  3073. //
  3074. // See the AWS API reference guide for Amazon Simple Storage Service's
  3075. // API operation HeadObject for usage and error information.
  3076. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
  3077. func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
  3078. req, out := c.HeadObjectRequest(input)
  3079. return out, req.Send()
  3080. }
  3081. // HeadObjectWithContext is the same as HeadObject with the addition of
  3082. // the ability to pass a context and additional request options.
  3083. //
  3084. // See HeadObject for details on how to use this API operation.
  3085. //
  3086. // The context must be non-nil and will be used for request cancellation. If
  3087. // the context is nil a panic will occur. In the future the SDK may create
  3088. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3089. // for more information on using Contexts.
  3090. func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
  3091. req, out := c.HeadObjectRequest(input)
  3092. req.SetContext(ctx)
  3093. req.ApplyOptions(opts...)
  3094. return out, req.Send()
  3095. }
  3096. const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
  3097. // ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
  3098. // client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
  3099. // value will be populated with the request's response once the request completes
  3100. // successfuly.
  3101. //
  3102. // Use "Send" method on the returned Request to send the API call to the service.
  3103. // the "output" return value is not valid until after Send returns without error.
  3104. //
  3105. // See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
  3106. // API call, and error handling.
  3107. //
  3108. // This method is useful when you want to inject custom logic or configuration
  3109. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3110. //
  3111. //
  3112. // // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
  3113. // req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
  3114. //
  3115. // err := req.Send()
  3116. // if err == nil { // resp is now filled
  3117. // fmt.Println(resp)
  3118. // }
  3119. //
  3120. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3121. func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
  3122. op := &request.Operation{
  3123. Name: opListBucketAnalyticsConfigurations,
  3124. HTTPMethod: "GET",
  3125. HTTPPath: "/{Bucket}?analytics",
  3126. }
  3127. if input == nil {
  3128. input = &ListBucketAnalyticsConfigurationsInput{}
  3129. }
  3130. output = &ListBucketAnalyticsConfigurationsOutput{}
  3131. req = c.newRequest(op, input, output)
  3132. return
  3133. }
  3134. // ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
  3135. //
  3136. // Lists the analytics configurations for the bucket.
  3137. //
  3138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3139. // with awserr.Error's Code and Message methods to get detailed information about
  3140. // the error.
  3141. //
  3142. // See the AWS API reference guide for Amazon Simple Storage Service's
  3143. // API operation ListBucketAnalyticsConfigurations for usage and error information.
  3144. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
  3145. func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3146. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3147. return out, req.Send()
  3148. }
  3149. // ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
  3150. // the ability to pass a context and additional request options.
  3151. //
  3152. // See ListBucketAnalyticsConfigurations for details on how to use this API operation.
  3153. //
  3154. // The context must be non-nil and will be used for request cancellation. If
  3155. // the context is nil a panic will occur. In the future the SDK may create
  3156. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3157. // for more information on using Contexts.
  3158. func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
  3159. req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
  3160. req.SetContext(ctx)
  3161. req.ApplyOptions(opts...)
  3162. return out, req.Send()
  3163. }
  3164. const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
  3165. // ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
  3166. // client's request for the ListBucketInventoryConfigurations operation. The "output" return
  3167. // value will be populated with the request's response once the request completes
  3168. // successfuly.
  3169. //
  3170. // Use "Send" method on the returned Request to send the API call to the service.
  3171. // the "output" return value is not valid until after Send returns without error.
  3172. //
  3173. // See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
  3174. // API call, and error handling.
  3175. //
  3176. // This method is useful when you want to inject custom logic or configuration
  3177. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3178. //
  3179. //
  3180. // // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
  3181. // req, resp := client.ListBucketInventoryConfigurationsRequest(params)
  3182. //
  3183. // err := req.Send()
  3184. // if err == nil { // resp is now filled
  3185. // fmt.Println(resp)
  3186. // }
  3187. //
  3188. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3189. func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
  3190. op := &request.Operation{
  3191. Name: opListBucketInventoryConfigurations,
  3192. HTTPMethod: "GET",
  3193. HTTPPath: "/{Bucket}?inventory",
  3194. }
  3195. if input == nil {
  3196. input = &ListBucketInventoryConfigurationsInput{}
  3197. }
  3198. output = &ListBucketInventoryConfigurationsOutput{}
  3199. req = c.newRequest(op, input, output)
  3200. return
  3201. }
  3202. // ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
  3203. //
  3204. // Returns a list of inventory configurations for the bucket.
  3205. //
  3206. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3207. // with awserr.Error's Code and Message methods to get detailed information about
  3208. // the error.
  3209. //
  3210. // See the AWS API reference guide for Amazon Simple Storage Service's
  3211. // API operation ListBucketInventoryConfigurations for usage and error information.
  3212. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
  3213. func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
  3214. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3215. return out, req.Send()
  3216. }
  3217. // ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
  3218. // the ability to pass a context and additional request options.
  3219. //
  3220. // See ListBucketInventoryConfigurations for details on how to use this API operation.
  3221. //
  3222. // The context must be non-nil and will be used for request cancellation. If
  3223. // the context is nil a panic will occur. In the future the SDK may create
  3224. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3225. // for more information on using Contexts.
  3226. func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
  3227. req, out := c.ListBucketInventoryConfigurationsRequest(input)
  3228. req.SetContext(ctx)
  3229. req.ApplyOptions(opts...)
  3230. return out, req.Send()
  3231. }
  3232. const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
  3233. // ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
  3234. // client's request for the ListBucketMetricsConfigurations operation. The "output" return
  3235. // value will be populated with the request's response once the request completes
  3236. // successfuly.
  3237. //
  3238. // Use "Send" method on the returned Request to send the API call to the service.
  3239. // the "output" return value is not valid until after Send returns without error.
  3240. //
  3241. // See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
  3242. // API call, and error handling.
  3243. //
  3244. // This method is useful when you want to inject custom logic or configuration
  3245. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3246. //
  3247. //
  3248. // // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
  3249. // req, resp := client.ListBucketMetricsConfigurationsRequest(params)
  3250. //
  3251. // err := req.Send()
  3252. // if err == nil { // resp is now filled
  3253. // fmt.Println(resp)
  3254. // }
  3255. //
  3256. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3257. func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
  3258. op := &request.Operation{
  3259. Name: opListBucketMetricsConfigurations,
  3260. HTTPMethod: "GET",
  3261. HTTPPath: "/{Bucket}?metrics",
  3262. }
  3263. if input == nil {
  3264. input = &ListBucketMetricsConfigurationsInput{}
  3265. }
  3266. output = &ListBucketMetricsConfigurationsOutput{}
  3267. req = c.newRequest(op, input, output)
  3268. return
  3269. }
  3270. // ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
  3271. //
  3272. // Lists the metrics configurations for the bucket.
  3273. //
  3274. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3275. // with awserr.Error's Code and Message methods to get detailed information about
  3276. // the error.
  3277. //
  3278. // See the AWS API reference guide for Amazon Simple Storage Service's
  3279. // API operation ListBucketMetricsConfigurations for usage and error information.
  3280. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
  3281. func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
  3282. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3283. return out, req.Send()
  3284. }
  3285. // ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
  3286. // the ability to pass a context and additional request options.
  3287. //
  3288. // See ListBucketMetricsConfigurations for details on how to use this API operation.
  3289. //
  3290. // The context must be non-nil and will be used for request cancellation. If
  3291. // the context is nil a panic will occur. In the future the SDK may create
  3292. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3293. // for more information on using Contexts.
  3294. func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
  3295. req, out := c.ListBucketMetricsConfigurationsRequest(input)
  3296. req.SetContext(ctx)
  3297. req.ApplyOptions(opts...)
  3298. return out, req.Send()
  3299. }
  3300. const opListBuckets = "ListBuckets"
  3301. // ListBucketsRequest generates a "aws/request.Request" representing the
  3302. // client's request for the ListBuckets operation. The "output" return
  3303. // value will be populated with the request's response once the request completes
  3304. // successfuly.
  3305. //
  3306. // Use "Send" method on the returned Request to send the API call to the service.
  3307. // the "output" return value is not valid until after Send returns without error.
  3308. //
  3309. // See ListBuckets for more information on using the ListBuckets
  3310. // API call, and error handling.
  3311. //
  3312. // This method is useful when you want to inject custom logic or configuration
  3313. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3314. //
  3315. //
  3316. // // Example sending a request using the ListBucketsRequest method.
  3317. // req, resp := client.ListBucketsRequest(params)
  3318. //
  3319. // err := req.Send()
  3320. // if err == nil { // resp is now filled
  3321. // fmt.Println(resp)
  3322. // }
  3323. //
  3324. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3325. func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
  3326. op := &request.Operation{
  3327. Name: opListBuckets,
  3328. HTTPMethod: "GET",
  3329. HTTPPath: "/",
  3330. }
  3331. if input == nil {
  3332. input = &ListBucketsInput{}
  3333. }
  3334. output = &ListBucketsOutput{}
  3335. req = c.newRequest(op, input, output)
  3336. return
  3337. }
  3338. // ListBuckets API operation for Amazon Simple Storage Service.
  3339. //
  3340. // Returns a list of all buckets owned by the authenticated sender of the request.
  3341. //
  3342. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3343. // with awserr.Error's Code and Message methods to get detailed information about
  3344. // the error.
  3345. //
  3346. // See the AWS API reference guide for Amazon Simple Storage Service's
  3347. // API operation ListBuckets for usage and error information.
  3348. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
  3349. func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
  3350. req, out := c.ListBucketsRequest(input)
  3351. return out, req.Send()
  3352. }
  3353. // ListBucketsWithContext is the same as ListBuckets with the addition of
  3354. // the ability to pass a context and additional request options.
  3355. //
  3356. // See ListBuckets for details on how to use this API operation.
  3357. //
  3358. // The context must be non-nil and will be used for request cancellation. If
  3359. // the context is nil a panic will occur. In the future the SDK may create
  3360. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3361. // for more information on using Contexts.
  3362. func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
  3363. req, out := c.ListBucketsRequest(input)
  3364. req.SetContext(ctx)
  3365. req.ApplyOptions(opts...)
  3366. return out, req.Send()
  3367. }
  3368. const opListMultipartUploads = "ListMultipartUploads"
  3369. // ListMultipartUploadsRequest generates a "aws/request.Request" representing the
  3370. // client's request for the ListMultipartUploads operation. The "output" return
  3371. // value will be populated with the request's response once the request completes
  3372. // successfuly.
  3373. //
  3374. // Use "Send" method on the returned Request to send the API call to the service.
  3375. // the "output" return value is not valid until after Send returns without error.
  3376. //
  3377. // See ListMultipartUploads for more information on using the ListMultipartUploads
  3378. // API call, and error handling.
  3379. //
  3380. // This method is useful when you want to inject custom logic or configuration
  3381. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3382. //
  3383. //
  3384. // // Example sending a request using the ListMultipartUploadsRequest method.
  3385. // req, resp := client.ListMultipartUploadsRequest(params)
  3386. //
  3387. // err := req.Send()
  3388. // if err == nil { // resp is now filled
  3389. // fmt.Println(resp)
  3390. // }
  3391. //
  3392. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3393. func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
  3394. op := &request.Operation{
  3395. Name: opListMultipartUploads,
  3396. HTTPMethod: "GET",
  3397. HTTPPath: "/{Bucket}?uploads",
  3398. Paginator: &request.Paginator{
  3399. InputTokens: []string{"KeyMarker", "UploadIdMarker"},
  3400. OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
  3401. LimitToken: "MaxUploads",
  3402. TruncationToken: "IsTruncated",
  3403. },
  3404. }
  3405. if input == nil {
  3406. input = &ListMultipartUploadsInput{}
  3407. }
  3408. output = &ListMultipartUploadsOutput{}
  3409. req = c.newRequest(op, input, output)
  3410. return
  3411. }
  3412. // ListMultipartUploads API operation for Amazon Simple Storage Service.
  3413. //
  3414. // This operation lists in-progress multipart uploads.
  3415. //
  3416. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3417. // with awserr.Error's Code and Message methods to get detailed information about
  3418. // the error.
  3419. //
  3420. // See the AWS API reference guide for Amazon Simple Storage Service's
  3421. // API operation ListMultipartUploads for usage and error information.
  3422. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
  3423. func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
  3424. req, out := c.ListMultipartUploadsRequest(input)
  3425. return out, req.Send()
  3426. }
  3427. // ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
  3428. // the ability to pass a context and additional request options.
  3429. //
  3430. // See ListMultipartUploads for details on how to use this API operation.
  3431. //
  3432. // The context must be non-nil and will be used for request cancellation. If
  3433. // the context is nil a panic will occur. In the future the SDK may create
  3434. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3435. // for more information on using Contexts.
  3436. func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
  3437. req, out := c.ListMultipartUploadsRequest(input)
  3438. req.SetContext(ctx)
  3439. req.ApplyOptions(opts...)
  3440. return out, req.Send()
  3441. }
  3442. // ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
  3443. // calling the "fn" function with the response data for each page. To stop
  3444. // iterating, return false from the fn function.
  3445. //
  3446. // See ListMultipartUploads method for more information on how to use this operation.
  3447. //
  3448. // Note: This operation can generate multiple requests to a service.
  3449. //
  3450. // // Example iterating over at most 3 pages of a ListMultipartUploads operation.
  3451. // pageNum := 0
  3452. // err := client.ListMultipartUploadsPages(params,
  3453. // func(page *ListMultipartUploadsOutput, lastPage bool) bool {
  3454. // pageNum++
  3455. // fmt.Println(page)
  3456. // return pageNum <= 3
  3457. // })
  3458. //
  3459. func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
  3460. return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
  3461. }
  3462. // ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
  3463. // it takes a Context and allows setting request options on the pages.
  3464. //
  3465. // The context must be non-nil and will be used for request cancellation. If
  3466. // the context is nil a panic will occur. In the future the SDK may create
  3467. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3468. // for more information on using Contexts.
  3469. func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
  3470. p := request.Pagination{
  3471. NewRequest: func() (*request.Request, error) {
  3472. var inCpy *ListMultipartUploadsInput
  3473. if input != nil {
  3474. tmp := *input
  3475. inCpy = &tmp
  3476. }
  3477. req, _ := c.ListMultipartUploadsRequest(inCpy)
  3478. req.SetContext(ctx)
  3479. req.ApplyOptions(opts...)
  3480. return req, nil
  3481. },
  3482. }
  3483. cont := true
  3484. for p.Next() && cont {
  3485. cont = fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage())
  3486. }
  3487. return p.Err()
  3488. }
  3489. const opListObjectVersions = "ListObjectVersions"
  3490. // ListObjectVersionsRequest generates a "aws/request.Request" representing the
  3491. // client's request for the ListObjectVersions operation. The "output" return
  3492. // value will be populated with the request's response once the request completes
  3493. // successfuly.
  3494. //
  3495. // Use "Send" method on the returned Request to send the API call to the service.
  3496. // the "output" return value is not valid until after Send returns without error.
  3497. //
  3498. // See ListObjectVersions for more information on using the ListObjectVersions
  3499. // API call, and error handling.
  3500. //
  3501. // This method is useful when you want to inject custom logic or configuration
  3502. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3503. //
  3504. //
  3505. // // Example sending a request using the ListObjectVersionsRequest method.
  3506. // req, resp := client.ListObjectVersionsRequest(params)
  3507. //
  3508. // err := req.Send()
  3509. // if err == nil { // resp is now filled
  3510. // fmt.Println(resp)
  3511. // }
  3512. //
  3513. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3514. func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
  3515. op := &request.Operation{
  3516. Name: opListObjectVersions,
  3517. HTTPMethod: "GET",
  3518. HTTPPath: "/{Bucket}?versions",
  3519. Paginator: &request.Paginator{
  3520. InputTokens: []string{"KeyMarker", "VersionIdMarker"},
  3521. OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
  3522. LimitToken: "MaxKeys",
  3523. TruncationToken: "IsTruncated",
  3524. },
  3525. }
  3526. if input == nil {
  3527. input = &ListObjectVersionsInput{}
  3528. }
  3529. output = &ListObjectVersionsOutput{}
  3530. req = c.newRequest(op, input, output)
  3531. return
  3532. }
  3533. // ListObjectVersions API operation for Amazon Simple Storage Service.
  3534. //
  3535. // Returns metadata about all of the versions of objects in a bucket.
  3536. //
  3537. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3538. // with awserr.Error's Code and Message methods to get detailed information about
  3539. // the error.
  3540. //
  3541. // See the AWS API reference guide for Amazon Simple Storage Service's
  3542. // API operation ListObjectVersions for usage and error information.
  3543. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
  3544. func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
  3545. req, out := c.ListObjectVersionsRequest(input)
  3546. return out, req.Send()
  3547. }
  3548. // ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
  3549. // the ability to pass a context and additional request options.
  3550. //
  3551. // See ListObjectVersions for details on how to use this API operation.
  3552. //
  3553. // The context must be non-nil and will be used for request cancellation. If
  3554. // the context is nil a panic will occur. In the future the SDK may create
  3555. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3556. // for more information on using Contexts.
  3557. func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
  3558. req, out := c.ListObjectVersionsRequest(input)
  3559. req.SetContext(ctx)
  3560. req.ApplyOptions(opts...)
  3561. return out, req.Send()
  3562. }
  3563. // ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
  3564. // calling the "fn" function with the response data for each page. To stop
  3565. // iterating, return false from the fn function.
  3566. //
  3567. // See ListObjectVersions method for more information on how to use this operation.
  3568. //
  3569. // Note: This operation can generate multiple requests to a service.
  3570. //
  3571. // // Example iterating over at most 3 pages of a ListObjectVersions operation.
  3572. // pageNum := 0
  3573. // err := client.ListObjectVersionsPages(params,
  3574. // func(page *ListObjectVersionsOutput, lastPage bool) bool {
  3575. // pageNum++
  3576. // fmt.Println(page)
  3577. // return pageNum <= 3
  3578. // })
  3579. //
  3580. func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
  3581. return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
  3582. }
  3583. // ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
  3584. // it takes a Context and allows setting request options on the pages.
  3585. //
  3586. // The context must be non-nil and will be used for request cancellation. If
  3587. // the context is nil a panic will occur. In the future the SDK may create
  3588. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3589. // for more information on using Contexts.
  3590. func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
  3591. p := request.Pagination{
  3592. NewRequest: func() (*request.Request, error) {
  3593. var inCpy *ListObjectVersionsInput
  3594. if input != nil {
  3595. tmp := *input
  3596. inCpy = &tmp
  3597. }
  3598. req, _ := c.ListObjectVersionsRequest(inCpy)
  3599. req.SetContext(ctx)
  3600. req.ApplyOptions(opts...)
  3601. return req, nil
  3602. },
  3603. }
  3604. cont := true
  3605. for p.Next() && cont {
  3606. cont = fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage())
  3607. }
  3608. return p.Err()
  3609. }
  3610. const opListObjects = "ListObjects"
  3611. // ListObjectsRequest generates a "aws/request.Request" representing the
  3612. // client's request for the ListObjects operation. The "output" return
  3613. // value will be populated with the request's response once the request completes
  3614. // successfuly.
  3615. //
  3616. // Use "Send" method on the returned Request to send the API call to the service.
  3617. // the "output" return value is not valid until after Send returns without error.
  3618. //
  3619. // See ListObjects for more information on using the ListObjects
  3620. // API call, and error handling.
  3621. //
  3622. // This method is useful when you want to inject custom logic or configuration
  3623. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3624. //
  3625. //
  3626. // // Example sending a request using the ListObjectsRequest method.
  3627. // req, resp := client.ListObjectsRequest(params)
  3628. //
  3629. // err := req.Send()
  3630. // if err == nil { // resp is now filled
  3631. // fmt.Println(resp)
  3632. // }
  3633. //
  3634. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3635. func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
  3636. op := &request.Operation{
  3637. Name: opListObjects,
  3638. HTTPMethod: "GET",
  3639. HTTPPath: "/{Bucket}",
  3640. Paginator: &request.Paginator{
  3641. InputTokens: []string{"Marker"},
  3642. OutputTokens: []string{"NextMarker || Contents[-1].Key"},
  3643. LimitToken: "MaxKeys",
  3644. TruncationToken: "IsTruncated",
  3645. },
  3646. }
  3647. if input == nil {
  3648. input = &ListObjectsInput{}
  3649. }
  3650. output = &ListObjectsOutput{}
  3651. req = c.newRequest(op, input, output)
  3652. return
  3653. }
  3654. // ListObjects API operation for Amazon Simple Storage Service.
  3655. //
  3656. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3657. // the request parameters as selection criteria to return a subset of the objects
  3658. // in a bucket.
  3659. //
  3660. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3661. // with awserr.Error's Code and Message methods to get detailed information about
  3662. // the error.
  3663. //
  3664. // See the AWS API reference guide for Amazon Simple Storage Service's
  3665. // API operation ListObjects for usage and error information.
  3666. //
  3667. // Returned Error Codes:
  3668. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3669. // The specified bucket does not exist.
  3670. //
  3671. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
  3672. func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
  3673. req, out := c.ListObjectsRequest(input)
  3674. return out, req.Send()
  3675. }
  3676. // ListObjectsWithContext is the same as ListObjects with the addition of
  3677. // the ability to pass a context and additional request options.
  3678. //
  3679. // See ListObjects for details on how to use this API operation.
  3680. //
  3681. // The context must be non-nil and will be used for request cancellation. If
  3682. // the context is nil a panic will occur. In the future the SDK may create
  3683. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3684. // for more information on using Contexts.
  3685. func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
  3686. req, out := c.ListObjectsRequest(input)
  3687. req.SetContext(ctx)
  3688. req.ApplyOptions(opts...)
  3689. return out, req.Send()
  3690. }
  3691. // ListObjectsPages iterates over the pages of a ListObjects operation,
  3692. // calling the "fn" function with the response data for each page. To stop
  3693. // iterating, return false from the fn function.
  3694. //
  3695. // See ListObjects method for more information on how to use this operation.
  3696. //
  3697. // Note: This operation can generate multiple requests to a service.
  3698. //
  3699. // // Example iterating over at most 3 pages of a ListObjects operation.
  3700. // pageNum := 0
  3701. // err := client.ListObjectsPages(params,
  3702. // func(page *ListObjectsOutput, lastPage bool) bool {
  3703. // pageNum++
  3704. // fmt.Println(page)
  3705. // return pageNum <= 3
  3706. // })
  3707. //
  3708. func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
  3709. return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
  3710. }
  3711. // ListObjectsPagesWithContext same as ListObjectsPages except
  3712. // it takes a Context and allows setting request options on the pages.
  3713. //
  3714. // The context must be non-nil and will be used for request cancellation. If
  3715. // the context is nil a panic will occur. In the future the SDK may create
  3716. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3717. // for more information on using Contexts.
  3718. func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
  3719. p := request.Pagination{
  3720. NewRequest: func() (*request.Request, error) {
  3721. var inCpy *ListObjectsInput
  3722. if input != nil {
  3723. tmp := *input
  3724. inCpy = &tmp
  3725. }
  3726. req, _ := c.ListObjectsRequest(inCpy)
  3727. req.SetContext(ctx)
  3728. req.ApplyOptions(opts...)
  3729. return req, nil
  3730. },
  3731. }
  3732. cont := true
  3733. for p.Next() && cont {
  3734. cont = fn(p.Page().(*ListObjectsOutput), !p.HasNextPage())
  3735. }
  3736. return p.Err()
  3737. }
  3738. const opListObjectsV2 = "ListObjectsV2"
  3739. // ListObjectsV2Request generates a "aws/request.Request" representing the
  3740. // client's request for the ListObjectsV2 operation. The "output" return
  3741. // value will be populated with the request's response once the request completes
  3742. // successfuly.
  3743. //
  3744. // Use "Send" method on the returned Request to send the API call to the service.
  3745. // the "output" return value is not valid until after Send returns without error.
  3746. //
  3747. // See ListObjectsV2 for more information on using the ListObjectsV2
  3748. // API call, and error handling.
  3749. //
  3750. // This method is useful when you want to inject custom logic or configuration
  3751. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3752. //
  3753. //
  3754. // // Example sending a request using the ListObjectsV2Request method.
  3755. // req, resp := client.ListObjectsV2Request(params)
  3756. //
  3757. // err := req.Send()
  3758. // if err == nil { // resp is now filled
  3759. // fmt.Println(resp)
  3760. // }
  3761. //
  3762. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3763. func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
  3764. op := &request.Operation{
  3765. Name: opListObjectsV2,
  3766. HTTPMethod: "GET",
  3767. HTTPPath: "/{Bucket}?list-type=2",
  3768. Paginator: &request.Paginator{
  3769. InputTokens: []string{"ContinuationToken"},
  3770. OutputTokens: []string{"NextContinuationToken"},
  3771. LimitToken: "MaxKeys",
  3772. TruncationToken: "",
  3773. },
  3774. }
  3775. if input == nil {
  3776. input = &ListObjectsV2Input{}
  3777. }
  3778. output = &ListObjectsV2Output{}
  3779. req = c.newRequest(op, input, output)
  3780. return
  3781. }
  3782. // ListObjectsV2 API operation for Amazon Simple Storage Service.
  3783. //
  3784. // Returns some or all (up to 1000) of the objects in a bucket. You can use
  3785. // the request parameters as selection criteria to return a subset of the objects
  3786. // in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend
  3787. // you use this revised API for new application development.
  3788. //
  3789. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3790. // with awserr.Error's Code and Message methods to get detailed information about
  3791. // the error.
  3792. //
  3793. // See the AWS API reference guide for Amazon Simple Storage Service's
  3794. // API operation ListObjectsV2 for usage and error information.
  3795. //
  3796. // Returned Error Codes:
  3797. // * ErrCodeNoSuchBucket "NoSuchBucket"
  3798. // The specified bucket does not exist.
  3799. //
  3800. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
  3801. func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
  3802. req, out := c.ListObjectsV2Request(input)
  3803. return out, req.Send()
  3804. }
  3805. // ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
  3806. // the ability to pass a context and additional request options.
  3807. //
  3808. // See ListObjectsV2 for details on how to use this API operation.
  3809. //
  3810. // The context must be non-nil and will be used for request cancellation. If
  3811. // the context is nil a panic will occur. In the future the SDK may create
  3812. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3813. // for more information on using Contexts.
  3814. func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
  3815. req, out := c.ListObjectsV2Request(input)
  3816. req.SetContext(ctx)
  3817. req.ApplyOptions(opts...)
  3818. return out, req.Send()
  3819. }
  3820. // ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
  3821. // calling the "fn" function with the response data for each page. To stop
  3822. // iterating, return false from the fn function.
  3823. //
  3824. // See ListObjectsV2 method for more information on how to use this operation.
  3825. //
  3826. // Note: This operation can generate multiple requests to a service.
  3827. //
  3828. // // Example iterating over at most 3 pages of a ListObjectsV2 operation.
  3829. // pageNum := 0
  3830. // err := client.ListObjectsV2Pages(params,
  3831. // func(page *ListObjectsV2Output, lastPage bool) bool {
  3832. // pageNum++
  3833. // fmt.Println(page)
  3834. // return pageNum <= 3
  3835. // })
  3836. //
  3837. func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
  3838. return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
  3839. }
  3840. // ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
  3841. // it takes a Context and allows setting request options on the pages.
  3842. //
  3843. // The context must be non-nil and will be used for request cancellation. If
  3844. // the context is nil a panic will occur. In the future the SDK may create
  3845. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3846. // for more information on using Contexts.
  3847. func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
  3848. p := request.Pagination{
  3849. NewRequest: func() (*request.Request, error) {
  3850. var inCpy *ListObjectsV2Input
  3851. if input != nil {
  3852. tmp := *input
  3853. inCpy = &tmp
  3854. }
  3855. req, _ := c.ListObjectsV2Request(inCpy)
  3856. req.SetContext(ctx)
  3857. req.ApplyOptions(opts...)
  3858. return req, nil
  3859. },
  3860. }
  3861. cont := true
  3862. for p.Next() && cont {
  3863. cont = fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage())
  3864. }
  3865. return p.Err()
  3866. }
  3867. const opListParts = "ListParts"
  3868. // ListPartsRequest generates a "aws/request.Request" representing the
  3869. // client's request for the ListParts operation. The "output" return
  3870. // value will be populated with the request's response once the request completes
  3871. // successfuly.
  3872. //
  3873. // Use "Send" method on the returned Request to send the API call to the service.
  3874. // the "output" return value is not valid until after Send returns without error.
  3875. //
  3876. // See ListParts for more information on using the ListParts
  3877. // API call, and error handling.
  3878. //
  3879. // This method is useful when you want to inject custom logic or configuration
  3880. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  3881. //
  3882. //
  3883. // // Example sending a request using the ListPartsRequest method.
  3884. // req, resp := client.ListPartsRequest(params)
  3885. //
  3886. // err := req.Send()
  3887. // if err == nil { // resp is now filled
  3888. // fmt.Println(resp)
  3889. // }
  3890. //
  3891. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3892. func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
  3893. op := &request.Operation{
  3894. Name: opListParts,
  3895. HTTPMethod: "GET",
  3896. HTTPPath: "/{Bucket}/{Key+}",
  3897. Paginator: &request.Paginator{
  3898. InputTokens: []string{"PartNumberMarker"},
  3899. OutputTokens: []string{"NextPartNumberMarker"},
  3900. LimitToken: "MaxParts",
  3901. TruncationToken: "IsTruncated",
  3902. },
  3903. }
  3904. if input == nil {
  3905. input = &ListPartsInput{}
  3906. }
  3907. output = &ListPartsOutput{}
  3908. req = c.newRequest(op, input, output)
  3909. return
  3910. }
  3911. // ListParts API operation for Amazon Simple Storage Service.
  3912. //
  3913. // Lists the parts that have been uploaded for a specific multipart upload.
  3914. //
  3915. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  3916. // with awserr.Error's Code and Message methods to get detailed information about
  3917. // the error.
  3918. //
  3919. // See the AWS API reference guide for Amazon Simple Storage Service's
  3920. // API operation ListParts for usage and error information.
  3921. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
  3922. func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
  3923. req, out := c.ListPartsRequest(input)
  3924. return out, req.Send()
  3925. }
  3926. // ListPartsWithContext is the same as ListParts with the addition of
  3927. // the ability to pass a context and additional request options.
  3928. //
  3929. // See ListParts for details on how to use this API operation.
  3930. //
  3931. // The context must be non-nil and will be used for request cancellation. If
  3932. // the context is nil a panic will occur. In the future the SDK may create
  3933. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3934. // for more information on using Contexts.
  3935. func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
  3936. req, out := c.ListPartsRequest(input)
  3937. req.SetContext(ctx)
  3938. req.ApplyOptions(opts...)
  3939. return out, req.Send()
  3940. }
  3941. // ListPartsPages iterates over the pages of a ListParts operation,
  3942. // calling the "fn" function with the response data for each page. To stop
  3943. // iterating, return false from the fn function.
  3944. //
  3945. // See ListParts method for more information on how to use this operation.
  3946. //
  3947. // Note: This operation can generate multiple requests to a service.
  3948. //
  3949. // // Example iterating over at most 3 pages of a ListParts operation.
  3950. // pageNum := 0
  3951. // err := client.ListPartsPages(params,
  3952. // func(page *ListPartsOutput, lastPage bool) bool {
  3953. // pageNum++
  3954. // fmt.Println(page)
  3955. // return pageNum <= 3
  3956. // })
  3957. //
  3958. func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
  3959. return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
  3960. }
  3961. // ListPartsPagesWithContext same as ListPartsPages except
  3962. // it takes a Context and allows setting request options on the pages.
  3963. //
  3964. // The context must be non-nil and will be used for request cancellation. If
  3965. // the context is nil a panic will occur. In the future the SDK may create
  3966. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  3967. // for more information on using Contexts.
  3968. func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
  3969. p := request.Pagination{
  3970. NewRequest: func() (*request.Request, error) {
  3971. var inCpy *ListPartsInput
  3972. if input != nil {
  3973. tmp := *input
  3974. inCpy = &tmp
  3975. }
  3976. req, _ := c.ListPartsRequest(inCpy)
  3977. req.SetContext(ctx)
  3978. req.ApplyOptions(opts...)
  3979. return req, nil
  3980. },
  3981. }
  3982. cont := true
  3983. for p.Next() && cont {
  3984. cont = fn(p.Page().(*ListPartsOutput), !p.HasNextPage())
  3985. }
  3986. return p.Err()
  3987. }
  3988. const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
  3989. // PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
  3990. // client's request for the PutBucketAccelerateConfiguration operation. The "output" return
  3991. // value will be populated with the request's response once the request completes
  3992. // successfuly.
  3993. //
  3994. // Use "Send" method on the returned Request to send the API call to the service.
  3995. // the "output" return value is not valid until after Send returns without error.
  3996. //
  3997. // See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
  3998. // API call, and error handling.
  3999. //
  4000. // This method is useful when you want to inject custom logic or configuration
  4001. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4002. //
  4003. //
  4004. // // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
  4005. // req, resp := client.PutBucketAccelerateConfigurationRequest(params)
  4006. //
  4007. // err := req.Send()
  4008. // if err == nil { // resp is now filled
  4009. // fmt.Println(resp)
  4010. // }
  4011. //
  4012. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4013. func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
  4014. op := &request.Operation{
  4015. Name: opPutBucketAccelerateConfiguration,
  4016. HTTPMethod: "PUT",
  4017. HTTPPath: "/{Bucket}?accelerate",
  4018. }
  4019. if input == nil {
  4020. input = &PutBucketAccelerateConfigurationInput{}
  4021. }
  4022. output = &PutBucketAccelerateConfigurationOutput{}
  4023. req = c.newRequest(op, input, output)
  4024. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4025. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4026. return
  4027. }
  4028. // PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
  4029. //
  4030. // Sets the accelerate configuration of an existing bucket.
  4031. //
  4032. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4033. // with awserr.Error's Code and Message methods to get detailed information about
  4034. // the error.
  4035. //
  4036. // See the AWS API reference guide for Amazon Simple Storage Service's
  4037. // API operation PutBucketAccelerateConfiguration for usage and error information.
  4038. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
  4039. func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
  4040. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4041. return out, req.Send()
  4042. }
  4043. // PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
  4044. // the ability to pass a context and additional request options.
  4045. //
  4046. // See PutBucketAccelerateConfiguration for details on how to use this API operation.
  4047. //
  4048. // The context must be non-nil and will be used for request cancellation. If
  4049. // the context is nil a panic will occur. In the future the SDK may create
  4050. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4051. // for more information on using Contexts.
  4052. func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
  4053. req, out := c.PutBucketAccelerateConfigurationRequest(input)
  4054. req.SetContext(ctx)
  4055. req.ApplyOptions(opts...)
  4056. return out, req.Send()
  4057. }
  4058. const opPutBucketAcl = "PutBucketAcl"
  4059. // PutBucketAclRequest generates a "aws/request.Request" representing the
  4060. // client's request for the PutBucketAcl operation. The "output" return
  4061. // value will be populated with the request's response once the request completes
  4062. // successfuly.
  4063. //
  4064. // Use "Send" method on the returned Request to send the API call to the service.
  4065. // the "output" return value is not valid until after Send returns without error.
  4066. //
  4067. // See PutBucketAcl for more information on using the PutBucketAcl
  4068. // API call, and error handling.
  4069. //
  4070. // This method is useful when you want to inject custom logic or configuration
  4071. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4072. //
  4073. //
  4074. // // Example sending a request using the PutBucketAclRequest method.
  4075. // req, resp := client.PutBucketAclRequest(params)
  4076. //
  4077. // err := req.Send()
  4078. // if err == nil { // resp is now filled
  4079. // fmt.Println(resp)
  4080. // }
  4081. //
  4082. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4083. func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
  4084. op := &request.Operation{
  4085. Name: opPutBucketAcl,
  4086. HTTPMethod: "PUT",
  4087. HTTPPath: "/{Bucket}?acl",
  4088. }
  4089. if input == nil {
  4090. input = &PutBucketAclInput{}
  4091. }
  4092. output = &PutBucketAclOutput{}
  4093. req = c.newRequest(op, input, output)
  4094. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4095. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4096. return
  4097. }
  4098. // PutBucketAcl API operation for Amazon Simple Storage Service.
  4099. //
  4100. // Sets the permissions on a bucket using access control lists (ACL).
  4101. //
  4102. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4103. // with awserr.Error's Code and Message methods to get detailed information about
  4104. // the error.
  4105. //
  4106. // See the AWS API reference guide for Amazon Simple Storage Service's
  4107. // API operation PutBucketAcl for usage and error information.
  4108. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
  4109. func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
  4110. req, out := c.PutBucketAclRequest(input)
  4111. return out, req.Send()
  4112. }
  4113. // PutBucketAclWithContext is the same as PutBucketAcl with the addition of
  4114. // the ability to pass a context and additional request options.
  4115. //
  4116. // See PutBucketAcl for details on how to use this API operation.
  4117. //
  4118. // The context must be non-nil and will be used for request cancellation. If
  4119. // the context is nil a panic will occur. In the future the SDK may create
  4120. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4121. // for more information on using Contexts.
  4122. func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
  4123. req, out := c.PutBucketAclRequest(input)
  4124. req.SetContext(ctx)
  4125. req.ApplyOptions(opts...)
  4126. return out, req.Send()
  4127. }
  4128. const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
  4129. // PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
  4130. // client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
  4131. // value will be populated with the request's response once the request completes
  4132. // successfuly.
  4133. //
  4134. // Use "Send" method on the returned Request to send the API call to the service.
  4135. // the "output" return value is not valid until after Send returns without error.
  4136. //
  4137. // See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
  4138. // API call, and error handling.
  4139. //
  4140. // This method is useful when you want to inject custom logic or configuration
  4141. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4142. //
  4143. //
  4144. // // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
  4145. // req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
  4146. //
  4147. // err := req.Send()
  4148. // if err == nil { // resp is now filled
  4149. // fmt.Println(resp)
  4150. // }
  4151. //
  4152. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4153. func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
  4154. op := &request.Operation{
  4155. Name: opPutBucketAnalyticsConfiguration,
  4156. HTTPMethod: "PUT",
  4157. HTTPPath: "/{Bucket}?analytics",
  4158. }
  4159. if input == nil {
  4160. input = &PutBucketAnalyticsConfigurationInput{}
  4161. }
  4162. output = &PutBucketAnalyticsConfigurationOutput{}
  4163. req = c.newRequest(op, input, output)
  4164. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4165. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4166. return
  4167. }
  4168. // PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
  4169. //
  4170. // Sets an analytics configuration for the bucket (specified by the analytics
  4171. // configuration ID).
  4172. //
  4173. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4174. // with awserr.Error's Code and Message methods to get detailed information about
  4175. // the error.
  4176. //
  4177. // See the AWS API reference guide for Amazon Simple Storage Service's
  4178. // API operation PutBucketAnalyticsConfiguration for usage and error information.
  4179. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
  4180. func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
  4181. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4182. return out, req.Send()
  4183. }
  4184. // PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
  4185. // the ability to pass a context and additional request options.
  4186. //
  4187. // See PutBucketAnalyticsConfiguration for details on how to use this API operation.
  4188. //
  4189. // The context must be non-nil and will be used for request cancellation. If
  4190. // the context is nil a panic will occur. In the future the SDK may create
  4191. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4192. // for more information on using Contexts.
  4193. func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
  4194. req, out := c.PutBucketAnalyticsConfigurationRequest(input)
  4195. req.SetContext(ctx)
  4196. req.ApplyOptions(opts...)
  4197. return out, req.Send()
  4198. }
  4199. const opPutBucketCors = "PutBucketCors"
  4200. // PutBucketCorsRequest generates a "aws/request.Request" representing the
  4201. // client's request for the PutBucketCors operation. The "output" return
  4202. // value will be populated with the request's response once the request completes
  4203. // successfuly.
  4204. //
  4205. // Use "Send" method on the returned Request to send the API call to the service.
  4206. // the "output" return value is not valid until after Send returns without error.
  4207. //
  4208. // See PutBucketCors for more information on using the PutBucketCors
  4209. // API call, and error handling.
  4210. //
  4211. // This method is useful when you want to inject custom logic or configuration
  4212. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4213. //
  4214. //
  4215. // // Example sending a request using the PutBucketCorsRequest method.
  4216. // req, resp := client.PutBucketCorsRequest(params)
  4217. //
  4218. // err := req.Send()
  4219. // if err == nil { // resp is now filled
  4220. // fmt.Println(resp)
  4221. // }
  4222. //
  4223. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4224. func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
  4225. op := &request.Operation{
  4226. Name: opPutBucketCors,
  4227. HTTPMethod: "PUT",
  4228. HTTPPath: "/{Bucket}?cors",
  4229. }
  4230. if input == nil {
  4231. input = &PutBucketCorsInput{}
  4232. }
  4233. output = &PutBucketCorsOutput{}
  4234. req = c.newRequest(op, input, output)
  4235. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4236. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4237. return
  4238. }
  4239. // PutBucketCors API operation for Amazon Simple Storage Service.
  4240. //
  4241. // Sets the cors configuration for a bucket.
  4242. //
  4243. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4244. // with awserr.Error's Code and Message methods to get detailed information about
  4245. // the error.
  4246. //
  4247. // See the AWS API reference guide for Amazon Simple Storage Service's
  4248. // API operation PutBucketCors for usage and error information.
  4249. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
  4250. func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
  4251. req, out := c.PutBucketCorsRequest(input)
  4252. return out, req.Send()
  4253. }
  4254. // PutBucketCorsWithContext is the same as PutBucketCors with the addition of
  4255. // the ability to pass a context and additional request options.
  4256. //
  4257. // See PutBucketCors for details on how to use this API operation.
  4258. //
  4259. // The context must be non-nil and will be used for request cancellation. If
  4260. // the context is nil a panic will occur. In the future the SDK may create
  4261. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4262. // for more information on using Contexts.
  4263. func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
  4264. req, out := c.PutBucketCorsRequest(input)
  4265. req.SetContext(ctx)
  4266. req.ApplyOptions(opts...)
  4267. return out, req.Send()
  4268. }
  4269. const opPutBucketEncryption = "PutBucketEncryption"
  4270. // PutBucketEncryptionRequest generates a "aws/request.Request" representing the
  4271. // client's request for the PutBucketEncryption operation. The "output" return
  4272. // value will be populated with the request's response once the request completes
  4273. // successfuly.
  4274. //
  4275. // Use "Send" method on the returned Request to send the API call to the service.
  4276. // the "output" return value is not valid until after Send returns without error.
  4277. //
  4278. // See PutBucketEncryption for more information on using the PutBucketEncryption
  4279. // API call, and error handling.
  4280. //
  4281. // This method is useful when you want to inject custom logic or configuration
  4282. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4283. //
  4284. //
  4285. // // Example sending a request using the PutBucketEncryptionRequest method.
  4286. // req, resp := client.PutBucketEncryptionRequest(params)
  4287. //
  4288. // err := req.Send()
  4289. // if err == nil { // resp is now filled
  4290. // fmt.Println(resp)
  4291. // }
  4292. //
  4293. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4294. func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
  4295. op := &request.Operation{
  4296. Name: opPutBucketEncryption,
  4297. HTTPMethod: "PUT",
  4298. HTTPPath: "/{Bucket}?encryption",
  4299. }
  4300. if input == nil {
  4301. input = &PutBucketEncryptionInput{}
  4302. }
  4303. output = &PutBucketEncryptionOutput{}
  4304. req = c.newRequest(op, input, output)
  4305. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4306. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4307. return
  4308. }
  4309. // PutBucketEncryption API operation for Amazon Simple Storage Service.
  4310. //
  4311. // Creates a new server-side encryption configuration (or replaces an existing
  4312. // one, if present).
  4313. //
  4314. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4315. // with awserr.Error's Code and Message methods to get detailed information about
  4316. // the error.
  4317. //
  4318. // See the AWS API reference guide for Amazon Simple Storage Service's
  4319. // API operation PutBucketEncryption for usage and error information.
  4320. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
  4321. func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
  4322. req, out := c.PutBucketEncryptionRequest(input)
  4323. return out, req.Send()
  4324. }
  4325. // PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
  4326. // the ability to pass a context and additional request options.
  4327. //
  4328. // See PutBucketEncryption for details on how to use this API operation.
  4329. //
  4330. // The context must be non-nil and will be used for request cancellation. If
  4331. // the context is nil a panic will occur. In the future the SDK may create
  4332. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4333. // for more information on using Contexts.
  4334. func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
  4335. req, out := c.PutBucketEncryptionRequest(input)
  4336. req.SetContext(ctx)
  4337. req.ApplyOptions(opts...)
  4338. return out, req.Send()
  4339. }
  4340. const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
  4341. // PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
  4342. // client's request for the PutBucketInventoryConfiguration operation. The "output" return
  4343. // value will be populated with the request's response once the request completes
  4344. // successfuly.
  4345. //
  4346. // Use "Send" method on the returned Request to send the API call to the service.
  4347. // the "output" return value is not valid until after Send returns without error.
  4348. //
  4349. // See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
  4350. // API call, and error handling.
  4351. //
  4352. // This method is useful when you want to inject custom logic or configuration
  4353. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4354. //
  4355. //
  4356. // // Example sending a request using the PutBucketInventoryConfigurationRequest method.
  4357. // req, resp := client.PutBucketInventoryConfigurationRequest(params)
  4358. //
  4359. // err := req.Send()
  4360. // if err == nil { // resp is now filled
  4361. // fmt.Println(resp)
  4362. // }
  4363. //
  4364. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4365. func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
  4366. op := &request.Operation{
  4367. Name: opPutBucketInventoryConfiguration,
  4368. HTTPMethod: "PUT",
  4369. HTTPPath: "/{Bucket}?inventory",
  4370. }
  4371. if input == nil {
  4372. input = &PutBucketInventoryConfigurationInput{}
  4373. }
  4374. output = &PutBucketInventoryConfigurationOutput{}
  4375. req = c.newRequest(op, input, output)
  4376. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4377. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4378. return
  4379. }
  4380. // PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
  4381. //
  4382. // Adds an inventory configuration (identified by the inventory ID) from the
  4383. // bucket.
  4384. //
  4385. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4386. // with awserr.Error's Code and Message methods to get detailed information about
  4387. // the error.
  4388. //
  4389. // See the AWS API reference guide for Amazon Simple Storage Service's
  4390. // API operation PutBucketInventoryConfiguration for usage and error information.
  4391. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
  4392. func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
  4393. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4394. return out, req.Send()
  4395. }
  4396. // PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
  4397. // the ability to pass a context and additional request options.
  4398. //
  4399. // See PutBucketInventoryConfiguration for details on how to use this API operation.
  4400. //
  4401. // The context must be non-nil and will be used for request cancellation. If
  4402. // the context is nil a panic will occur. In the future the SDK may create
  4403. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4404. // for more information on using Contexts.
  4405. func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
  4406. req, out := c.PutBucketInventoryConfigurationRequest(input)
  4407. req.SetContext(ctx)
  4408. req.ApplyOptions(opts...)
  4409. return out, req.Send()
  4410. }
  4411. const opPutBucketLifecycle = "PutBucketLifecycle"
  4412. // PutBucketLifecycleRequest generates a "aws/request.Request" representing the
  4413. // client's request for the PutBucketLifecycle operation. The "output" return
  4414. // value will be populated with the request's response once the request completes
  4415. // successfuly.
  4416. //
  4417. // Use "Send" method on the returned Request to send the API call to the service.
  4418. // the "output" return value is not valid until after Send returns without error.
  4419. //
  4420. // See PutBucketLifecycle for more information on using the PutBucketLifecycle
  4421. // API call, and error handling.
  4422. //
  4423. // This method is useful when you want to inject custom logic or configuration
  4424. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4425. //
  4426. //
  4427. // // Example sending a request using the PutBucketLifecycleRequest method.
  4428. // req, resp := client.PutBucketLifecycleRequest(params)
  4429. //
  4430. // err := req.Send()
  4431. // if err == nil { // resp is now filled
  4432. // fmt.Println(resp)
  4433. // }
  4434. //
  4435. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4436. func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
  4437. if c.Client.Config.Logger != nil {
  4438. c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
  4439. }
  4440. op := &request.Operation{
  4441. Name: opPutBucketLifecycle,
  4442. HTTPMethod: "PUT",
  4443. HTTPPath: "/{Bucket}?lifecycle",
  4444. }
  4445. if input == nil {
  4446. input = &PutBucketLifecycleInput{}
  4447. }
  4448. output = &PutBucketLifecycleOutput{}
  4449. req = c.newRequest(op, input, output)
  4450. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4451. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4452. return
  4453. }
  4454. // PutBucketLifecycle API operation for Amazon Simple Storage Service.
  4455. //
  4456. // Deprecated, see the PutBucketLifecycleConfiguration operation.
  4457. //
  4458. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4459. // with awserr.Error's Code and Message methods to get detailed information about
  4460. // the error.
  4461. //
  4462. // See the AWS API reference guide for Amazon Simple Storage Service's
  4463. // API operation PutBucketLifecycle for usage and error information.
  4464. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
  4465. func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
  4466. req, out := c.PutBucketLifecycleRequest(input)
  4467. return out, req.Send()
  4468. }
  4469. // PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
  4470. // the ability to pass a context and additional request options.
  4471. //
  4472. // See PutBucketLifecycle for details on how to use this API operation.
  4473. //
  4474. // The context must be non-nil and will be used for request cancellation. If
  4475. // the context is nil a panic will occur. In the future the SDK may create
  4476. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4477. // for more information on using Contexts.
  4478. func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
  4479. req, out := c.PutBucketLifecycleRequest(input)
  4480. req.SetContext(ctx)
  4481. req.ApplyOptions(opts...)
  4482. return out, req.Send()
  4483. }
  4484. const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
  4485. // PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
  4486. // client's request for the PutBucketLifecycleConfiguration operation. The "output" return
  4487. // value will be populated with the request's response once the request completes
  4488. // successfuly.
  4489. //
  4490. // Use "Send" method on the returned Request to send the API call to the service.
  4491. // the "output" return value is not valid until after Send returns without error.
  4492. //
  4493. // See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
  4494. // API call, and error handling.
  4495. //
  4496. // This method is useful when you want to inject custom logic or configuration
  4497. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4498. //
  4499. //
  4500. // // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
  4501. // req, resp := client.PutBucketLifecycleConfigurationRequest(params)
  4502. //
  4503. // err := req.Send()
  4504. // if err == nil { // resp is now filled
  4505. // fmt.Println(resp)
  4506. // }
  4507. //
  4508. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4509. func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
  4510. op := &request.Operation{
  4511. Name: opPutBucketLifecycleConfiguration,
  4512. HTTPMethod: "PUT",
  4513. HTTPPath: "/{Bucket}?lifecycle",
  4514. }
  4515. if input == nil {
  4516. input = &PutBucketLifecycleConfigurationInput{}
  4517. }
  4518. output = &PutBucketLifecycleConfigurationOutput{}
  4519. req = c.newRequest(op, input, output)
  4520. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4521. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4522. return
  4523. }
  4524. // PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
  4525. //
  4526. // Sets lifecycle configuration for your bucket. If a lifecycle configuration
  4527. // exists, it replaces it.
  4528. //
  4529. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4530. // with awserr.Error's Code and Message methods to get detailed information about
  4531. // the error.
  4532. //
  4533. // See the AWS API reference guide for Amazon Simple Storage Service's
  4534. // API operation PutBucketLifecycleConfiguration for usage and error information.
  4535. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
  4536. func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
  4537. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4538. return out, req.Send()
  4539. }
  4540. // PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
  4541. // the ability to pass a context and additional request options.
  4542. //
  4543. // See PutBucketLifecycleConfiguration for details on how to use this API operation.
  4544. //
  4545. // The context must be non-nil and will be used for request cancellation. If
  4546. // the context is nil a panic will occur. In the future the SDK may create
  4547. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4548. // for more information on using Contexts.
  4549. func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
  4550. req, out := c.PutBucketLifecycleConfigurationRequest(input)
  4551. req.SetContext(ctx)
  4552. req.ApplyOptions(opts...)
  4553. return out, req.Send()
  4554. }
  4555. const opPutBucketLogging = "PutBucketLogging"
  4556. // PutBucketLoggingRequest generates a "aws/request.Request" representing the
  4557. // client's request for the PutBucketLogging operation. The "output" return
  4558. // value will be populated with the request's response once the request completes
  4559. // successfuly.
  4560. //
  4561. // Use "Send" method on the returned Request to send the API call to the service.
  4562. // the "output" return value is not valid until after Send returns without error.
  4563. //
  4564. // See PutBucketLogging for more information on using the PutBucketLogging
  4565. // API call, and error handling.
  4566. //
  4567. // This method is useful when you want to inject custom logic or configuration
  4568. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4569. //
  4570. //
  4571. // // Example sending a request using the PutBucketLoggingRequest method.
  4572. // req, resp := client.PutBucketLoggingRequest(params)
  4573. //
  4574. // err := req.Send()
  4575. // if err == nil { // resp is now filled
  4576. // fmt.Println(resp)
  4577. // }
  4578. //
  4579. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4580. func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
  4581. op := &request.Operation{
  4582. Name: opPutBucketLogging,
  4583. HTTPMethod: "PUT",
  4584. HTTPPath: "/{Bucket}?logging",
  4585. }
  4586. if input == nil {
  4587. input = &PutBucketLoggingInput{}
  4588. }
  4589. output = &PutBucketLoggingOutput{}
  4590. req = c.newRequest(op, input, output)
  4591. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4592. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4593. return
  4594. }
  4595. // PutBucketLogging API operation for Amazon Simple Storage Service.
  4596. //
  4597. // Set the logging parameters for a bucket and to specify permissions for who
  4598. // can view and modify the logging parameters. To set the logging status of
  4599. // a bucket, you must be the bucket owner.
  4600. //
  4601. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4602. // with awserr.Error's Code and Message methods to get detailed information about
  4603. // the error.
  4604. //
  4605. // See the AWS API reference guide for Amazon Simple Storage Service's
  4606. // API operation PutBucketLogging for usage and error information.
  4607. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
  4608. func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
  4609. req, out := c.PutBucketLoggingRequest(input)
  4610. return out, req.Send()
  4611. }
  4612. // PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
  4613. // the ability to pass a context and additional request options.
  4614. //
  4615. // See PutBucketLogging for details on how to use this API operation.
  4616. //
  4617. // The context must be non-nil and will be used for request cancellation. If
  4618. // the context is nil a panic will occur. In the future the SDK may create
  4619. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4620. // for more information on using Contexts.
  4621. func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
  4622. req, out := c.PutBucketLoggingRequest(input)
  4623. req.SetContext(ctx)
  4624. req.ApplyOptions(opts...)
  4625. return out, req.Send()
  4626. }
  4627. const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
  4628. // PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
  4629. // client's request for the PutBucketMetricsConfiguration operation. The "output" return
  4630. // value will be populated with the request's response once the request completes
  4631. // successfuly.
  4632. //
  4633. // Use "Send" method on the returned Request to send the API call to the service.
  4634. // the "output" return value is not valid until after Send returns without error.
  4635. //
  4636. // See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
  4637. // API call, and error handling.
  4638. //
  4639. // This method is useful when you want to inject custom logic or configuration
  4640. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4641. //
  4642. //
  4643. // // Example sending a request using the PutBucketMetricsConfigurationRequest method.
  4644. // req, resp := client.PutBucketMetricsConfigurationRequest(params)
  4645. //
  4646. // err := req.Send()
  4647. // if err == nil { // resp is now filled
  4648. // fmt.Println(resp)
  4649. // }
  4650. //
  4651. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4652. func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
  4653. op := &request.Operation{
  4654. Name: opPutBucketMetricsConfiguration,
  4655. HTTPMethod: "PUT",
  4656. HTTPPath: "/{Bucket}?metrics",
  4657. }
  4658. if input == nil {
  4659. input = &PutBucketMetricsConfigurationInput{}
  4660. }
  4661. output = &PutBucketMetricsConfigurationOutput{}
  4662. req = c.newRequest(op, input, output)
  4663. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4664. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4665. return
  4666. }
  4667. // PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
  4668. //
  4669. // Sets a metrics configuration (specified by the metrics configuration ID)
  4670. // for the bucket.
  4671. //
  4672. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4673. // with awserr.Error's Code and Message methods to get detailed information about
  4674. // the error.
  4675. //
  4676. // See the AWS API reference guide for Amazon Simple Storage Service's
  4677. // API operation PutBucketMetricsConfiguration for usage and error information.
  4678. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
  4679. func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
  4680. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4681. return out, req.Send()
  4682. }
  4683. // PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
  4684. // the ability to pass a context and additional request options.
  4685. //
  4686. // See PutBucketMetricsConfiguration for details on how to use this API operation.
  4687. //
  4688. // The context must be non-nil and will be used for request cancellation. If
  4689. // the context is nil a panic will occur. In the future the SDK may create
  4690. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4691. // for more information on using Contexts.
  4692. func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
  4693. req, out := c.PutBucketMetricsConfigurationRequest(input)
  4694. req.SetContext(ctx)
  4695. req.ApplyOptions(opts...)
  4696. return out, req.Send()
  4697. }
  4698. const opPutBucketNotification = "PutBucketNotification"
  4699. // PutBucketNotificationRequest generates a "aws/request.Request" representing the
  4700. // client's request for the PutBucketNotification operation. The "output" return
  4701. // value will be populated with the request's response once the request completes
  4702. // successfuly.
  4703. //
  4704. // Use "Send" method on the returned Request to send the API call to the service.
  4705. // the "output" return value is not valid until after Send returns without error.
  4706. //
  4707. // See PutBucketNotification for more information on using the PutBucketNotification
  4708. // API call, and error handling.
  4709. //
  4710. // This method is useful when you want to inject custom logic or configuration
  4711. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4712. //
  4713. //
  4714. // // Example sending a request using the PutBucketNotificationRequest method.
  4715. // req, resp := client.PutBucketNotificationRequest(params)
  4716. //
  4717. // err := req.Send()
  4718. // if err == nil { // resp is now filled
  4719. // fmt.Println(resp)
  4720. // }
  4721. //
  4722. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4723. func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
  4724. if c.Client.Config.Logger != nil {
  4725. c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
  4726. }
  4727. op := &request.Operation{
  4728. Name: opPutBucketNotification,
  4729. HTTPMethod: "PUT",
  4730. HTTPPath: "/{Bucket}?notification",
  4731. }
  4732. if input == nil {
  4733. input = &PutBucketNotificationInput{}
  4734. }
  4735. output = &PutBucketNotificationOutput{}
  4736. req = c.newRequest(op, input, output)
  4737. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4738. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4739. return
  4740. }
  4741. // PutBucketNotification API operation for Amazon Simple Storage Service.
  4742. //
  4743. // Deprecated, see the PutBucketNotificationConfiguraiton operation.
  4744. //
  4745. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4746. // with awserr.Error's Code and Message methods to get detailed information about
  4747. // the error.
  4748. //
  4749. // See the AWS API reference guide for Amazon Simple Storage Service's
  4750. // API operation PutBucketNotification for usage and error information.
  4751. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
  4752. func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
  4753. req, out := c.PutBucketNotificationRequest(input)
  4754. return out, req.Send()
  4755. }
  4756. // PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
  4757. // the ability to pass a context and additional request options.
  4758. //
  4759. // See PutBucketNotification for details on how to use this API operation.
  4760. //
  4761. // The context must be non-nil and will be used for request cancellation. If
  4762. // the context is nil a panic will occur. In the future the SDK may create
  4763. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4764. // for more information on using Contexts.
  4765. func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
  4766. req, out := c.PutBucketNotificationRequest(input)
  4767. req.SetContext(ctx)
  4768. req.ApplyOptions(opts...)
  4769. return out, req.Send()
  4770. }
  4771. const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
  4772. // PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
  4773. // client's request for the PutBucketNotificationConfiguration operation. The "output" return
  4774. // value will be populated with the request's response once the request completes
  4775. // successfuly.
  4776. //
  4777. // Use "Send" method on the returned Request to send the API call to the service.
  4778. // the "output" return value is not valid until after Send returns without error.
  4779. //
  4780. // See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
  4781. // API call, and error handling.
  4782. //
  4783. // This method is useful when you want to inject custom logic or configuration
  4784. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4785. //
  4786. //
  4787. // // Example sending a request using the PutBucketNotificationConfigurationRequest method.
  4788. // req, resp := client.PutBucketNotificationConfigurationRequest(params)
  4789. //
  4790. // err := req.Send()
  4791. // if err == nil { // resp is now filled
  4792. // fmt.Println(resp)
  4793. // }
  4794. //
  4795. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4796. func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
  4797. op := &request.Operation{
  4798. Name: opPutBucketNotificationConfiguration,
  4799. HTTPMethod: "PUT",
  4800. HTTPPath: "/{Bucket}?notification",
  4801. }
  4802. if input == nil {
  4803. input = &PutBucketNotificationConfigurationInput{}
  4804. }
  4805. output = &PutBucketNotificationConfigurationOutput{}
  4806. req = c.newRequest(op, input, output)
  4807. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4808. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4809. return
  4810. }
  4811. // PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
  4812. //
  4813. // Enables notifications of specified events for a bucket.
  4814. //
  4815. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4816. // with awserr.Error's Code and Message methods to get detailed information about
  4817. // the error.
  4818. //
  4819. // See the AWS API reference guide for Amazon Simple Storage Service's
  4820. // API operation PutBucketNotificationConfiguration for usage and error information.
  4821. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
  4822. func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
  4823. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4824. return out, req.Send()
  4825. }
  4826. // PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
  4827. // the ability to pass a context and additional request options.
  4828. //
  4829. // See PutBucketNotificationConfiguration for details on how to use this API operation.
  4830. //
  4831. // The context must be non-nil and will be used for request cancellation. If
  4832. // the context is nil a panic will occur. In the future the SDK may create
  4833. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4834. // for more information on using Contexts.
  4835. func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
  4836. req, out := c.PutBucketNotificationConfigurationRequest(input)
  4837. req.SetContext(ctx)
  4838. req.ApplyOptions(opts...)
  4839. return out, req.Send()
  4840. }
  4841. const opPutBucketPolicy = "PutBucketPolicy"
  4842. // PutBucketPolicyRequest generates a "aws/request.Request" representing the
  4843. // client's request for the PutBucketPolicy operation. The "output" return
  4844. // value will be populated with the request's response once the request completes
  4845. // successfuly.
  4846. //
  4847. // Use "Send" method on the returned Request to send the API call to the service.
  4848. // the "output" return value is not valid until after Send returns without error.
  4849. //
  4850. // See PutBucketPolicy for more information on using the PutBucketPolicy
  4851. // API call, and error handling.
  4852. //
  4853. // This method is useful when you want to inject custom logic or configuration
  4854. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4855. //
  4856. //
  4857. // // Example sending a request using the PutBucketPolicyRequest method.
  4858. // req, resp := client.PutBucketPolicyRequest(params)
  4859. //
  4860. // err := req.Send()
  4861. // if err == nil { // resp is now filled
  4862. // fmt.Println(resp)
  4863. // }
  4864. //
  4865. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4866. func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
  4867. op := &request.Operation{
  4868. Name: opPutBucketPolicy,
  4869. HTTPMethod: "PUT",
  4870. HTTPPath: "/{Bucket}?policy",
  4871. }
  4872. if input == nil {
  4873. input = &PutBucketPolicyInput{}
  4874. }
  4875. output = &PutBucketPolicyOutput{}
  4876. req = c.newRequest(op, input, output)
  4877. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4878. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4879. return
  4880. }
  4881. // PutBucketPolicy API operation for Amazon Simple Storage Service.
  4882. //
  4883. // Replaces a policy on a bucket. If the bucket already has a policy, the one
  4884. // in this request completely replaces it.
  4885. //
  4886. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4887. // with awserr.Error's Code and Message methods to get detailed information about
  4888. // the error.
  4889. //
  4890. // See the AWS API reference guide for Amazon Simple Storage Service's
  4891. // API operation PutBucketPolicy for usage and error information.
  4892. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
  4893. func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
  4894. req, out := c.PutBucketPolicyRequest(input)
  4895. return out, req.Send()
  4896. }
  4897. // PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
  4898. // the ability to pass a context and additional request options.
  4899. //
  4900. // See PutBucketPolicy for details on how to use this API operation.
  4901. //
  4902. // The context must be non-nil and will be used for request cancellation. If
  4903. // the context is nil a panic will occur. In the future the SDK may create
  4904. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4905. // for more information on using Contexts.
  4906. func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
  4907. req, out := c.PutBucketPolicyRequest(input)
  4908. req.SetContext(ctx)
  4909. req.ApplyOptions(opts...)
  4910. return out, req.Send()
  4911. }
  4912. const opPutBucketReplication = "PutBucketReplication"
  4913. // PutBucketReplicationRequest generates a "aws/request.Request" representing the
  4914. // client's request for the PutBucketReplication operation. The "output" return
  4915. // value will be populated with the request's response once the request completes
  4916. // successfuly.
  4917. //
  4918. // Use "Send" method on the returned Request to send the API call to the service.
  4919. // the "output" return value is not valid until after Send returns without error.
  4920. //
  4921. // See PutBucketReplication for more information on using the PutBucketReplication
  4922. // API call, and error handling.
  4923. //
  4924. // This method is useful when you want to inject custom logic or configuration
  4925. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4926. //
  4927. //
  4928. // // Example sending a request using the PutBucketReplicationRequest method.
  4929. // req, resp := client.PutBucketReplicationRequest(params)
  4930. //
  4931. // err := req.Send()
  4932. // if err == nil { // resp is now filled
  4933. // fmt.Println(resp)
  4934. // }
  4935. //
  4936. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4937. func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
  4938. op := &request.Operation{
  4939. Name: opPutBucketReplication,
  4940. HTTPMethod: "PUT",
  4941. HTTPPath: "/{Bucket}?replication",
  4942. }
  4943. if input == nil {
  4944. input = &PutBucketReplicationInput{}
  4945. }
  4946. output = &PutBucketReplicationOutput{}
  4947. req = c.newRequest(op, input, output)
  4948. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  4949. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  4950. return
  4951. }
  4952. // PutBucketReplication API operation for Amazon Simple Storage Service.
  4953. //
  4954. // Creates a new replication configuration (or replaces an existing one, if
  4955. // present).
  4956. //
  4957. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  4958. // with awserr.Error's Code and Message methods to get detailed information about
  4959. // the error.
  4960. //
  4961. // See the AWS API reference guide for Amazon Simple Storage Service's
  4962. // API operation PutBucketReplication for usage and error information.
  4963. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
  4964. func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
  4965. req, out := c.PutBucketReplicationRequest(input)
  4966. return out, req.Send()
  4967. }
  4968. // PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
  4969. // the ability to pass a context and additional request options.
  4970. //
  4971. // See PutBucketReplication for details on how to use this API operation.
  4972. //
  4973. // The context must be non-nil and will be used for request cancellation. If
  4974. // the context is nil a panic will occur. In the future the SDK may create
  4975. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  4976. // for more information on using Contexts.
  4977. func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
  4978. req, out := c.PutBucketReplicationRequest(input)
  4979. req.SetContext(ctx)
  4980. req.ApplyOptions(opts...)
  4981. return out, req.Send()
  4982. }
  4983. const opPutBucketRequestPayment = "PutBucketRequestPayment"
  4984. // PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
  4985. // client's request for the PutBucketRequestPayment operation. The "output" return
  4986. // value will be populated with the request's response once the request completes
  4987. // successfuly.
  4988. //
  4989. // Use "Send" method on the returned Request to send the API call to the service.
  4990. // the "output" return value is not valid until after Send returns without error.
  4991. //
  4992. // See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
  4993. // API call, and error handling.
  4994. //
  4995. // This method is useful when you want to inject custom logic or configuration
  4996. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  4997. //
  4998. //
  4999. // // Example sending a request using the PutBucketRequestPaymentRequest method.
  5000. // req, resp := client.PutBucketRequestPaymentRequest(params)
  5001. //
  5002. // err := req.Send()
  5003. // if err == nil { // resp is now filled
  5004. // fmt.Println(resp)
  5005. // }
  5006. //
  5007. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5008. func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
  5009. op := &request.Operation{
  5010. Name: opPutBucketRequestPayment,
  5011. HTTPMethod: "PUT",
  5012. HTTPPath: "/{Bucket}?requestPayment",
  5013. }
  5014. if input == nil {
  5015. input = &PutBucketRequestPaymentInput{}
  5016. }
  5017. output = &PutBucketRequestPaymentOutput{}
  5018. req = c.newRequest(op, input, output)
  5019. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5020. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5021. return
  5022. }
  5023. // PutBucketRequestPayment API operation for Amazon Simple Storage Service.
  5024. //
  5025. // Sets the request payment configuration for a bucket. By default, the bucket
  5026. // owner pays for downloads from the bucket. This configuration parameter enables
  5027. // the bucket owner (only) to specify that the person requesting the download
  5028. // will be charged for the download. Documentation on requester pays buckets
  5029. // can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
  5030. //
  5031. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5032. // with awserr.Error's Code and Message methods to get detailed information about
  5033. // the error.
  5034. //
  5035. // See the AWS API reference guide for Amazon Simple Storage Service's
  5036. // API operation PutBucketRequestPayment for usage and error information.
  5037. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
  5038. func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
  5039. req, out := c.PutBucketRequestPaymentRequest(input)
  5040. return out, req.Send()
  5041. }
  5042. // PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
  5043. // the ability to pass a context and additional request options.
  5044. //
  5045. // See PutBucketRequestPayment for details on how to use this API operation.
  5046. //
  5047. // The context must be non-nil and will be used for request cancellation. If
  5048. // the context is nil a panic will occur. In the future the SDK may create
  5049. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5050. // for more information on using Contexts.
  5051. func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
  5052. req, out := c.PutBucketRequestPaymentRequest(input)
  5053. req.SetContext(ctx)
  5054. req.ApplyOptions(opts...)
  5055. return out, req.Send()
  5056. }
  5057. const opPutBucketTagging = "PutBucketTagging"
  5058. // PutBucketTaggingRequest generates a "aws/request.Request" representing the
  5059. // client's request for the PutBucketTagging operation. The "output" return
  5060. // value will be populated with the request's response once the request completes
  5061. // successfuly.
  5062. //
  5063. // Use "Send" method on the returned Request to send the API call to the service.
  5064. // the "output" return value is not valid until after Send returns without error.
  5065. //
  5066. // See PutBucketTagging for more information on using the PutBucketTagging
  5067. // API call, and error handling.
  5068. //
  5069. // This method is useful when you want to inject custom logic or configuration
  5070. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5071. //
  5072. //
  5073. // // Example sending a request using the PutBucketTaggingRequest method.
  5074. // req, resp := client.PutBucketTaggingRequest(params)
  5075. //
  5076. // err := req.Send()
  5077. // if err == nil { // resp is now filled
  5078. // fmt.Println(resp)
  5079. // }
  5080. //
  5081. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5082. func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
  5083. op := &request.Operation{
  5084. Name: opPutBucketTagging,
  5085. HTTPMethod: "PUT",
  5086. HTTPPath: "/{Bucket}?tagging",
  5087. }
  5088. if input == nil {
  5089. input = &PutBucketTaggingInput{}
  5090. }
  5091. output = &PutBucketTaggingOutput{}
  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. // PutBucketTagging API operation for Amazon Simple Storage Service.
  5098. //
  5099. // Sets the tags 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 PutBucketTagging for usage and error information.
  5107. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
  5108. func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
  5109. req, out := c.PutBucketTaggingRequest(input)
  5110. return out, req.Send()
  5111. }
  5112. // PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
  5113. // the ability to pass a context and additional request options.
  5114. //
  5115. // See PutBucketTagging 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) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
  5122. req, out := c.PutBucketTaggingRequest(input)
  5123. req.SetContext(ctx)
  5124. req.ApplyOptions(opts...)
  5125. return out, req.Send()
  5126. }
  5127. const opPutBucketVersioning = "PutBucketVersioning"
  5128. // PutBucketVersioningRequest generates a "aws/request.Request" representing the
  5129. // client's request for the PutBucketVersioning operation. The "output" return
  5130. // value will be populated with the request's response once the request completes
  5131. // successfuly.
  5132. //
  5133. // Use "Send" method on the returned Request to send the API call to the service.
  5134. // the "output" return value is not valid until after Send returns without error.
  5135. //
  5136. // See PutBucketVersioning for more information on using the PutBucketVersioning
  5137. // API call, and error handling.
  5138. //
  5139. // This method is useful when you want to inject custom logic or configuration
  5140. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5141. //
  5142. //
  5143. // // Example sending a request using the PutBucketVersioningRequest method.
  5144. // req, resp := client.PutBucketVersioningRequest(params)
  5145. //
  5146. // err := req.Send()
  5147. // if err == nil { // resp is now filled
  5148. // fmt.Println(resp)
  5149. // }
  5150. //
  5151. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5152. func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
  5153. op := &request.Operation{
  5154. Name: opPutBucketVersioning,
  5155. HTTPMethod: "PUT",
  5156. HTTPPath: "/{Bucket}?versioning",
  5157. }
  5158. if input == nil {
  5159. input = &PutBucketVersioningInput{}
  5160. }
  5161. output = &PutBucketVersioningOutput{}
  5162. req = c.newRequest(op, input, output)
  5163. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5164. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5165. return
  5166. }
  5167. // PutBucketVersioning API operation for Amazon Simple Storage Service.
  5168. //
  5169. // Sets the versioning state of an existing bucket. To set the versioning state,
  5170. // you must be the bucket owner.
  5171. //
  5172. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5173. // with awserr.Error's Code and Message methods to get detailed information about
  5174. // the error.
  5175. //
  5176. // See the AWS API reference guide for Amazon Simple Storage Service's
  5177. // API operation PutBucketVersioning for usage and error information.
  5178. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
  5179. func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
  5180. req, out := c.PutBucketVersioningRequest(input)
  5181. return out, req.Send()
  5182. }
  5183. // PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
  5184. // the ability to pass a context and additional request options.
  5185. //
  5186. // See PutBucketVersioning for details on how to use this API operation.
  5187. //
  5188. // The context must be non-nil and will be used for request cancellation. If
  5189. // the context is nil a panic will occur. In the future the SDK may create
  5190. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5191. // for more information on using Contexts.
  5192. func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
  5193. req, out := c.PutBucketVersioningRequest(input)
  5194. req.SetContext(ctx)
  5195. req.ApplyOptions(opts...)
  5196. return out, req.Send()
  5197. }
  5198. const opPutBucketWebsite = "PutBucketWebsite"
  5199. // PutBucketWebsiteRequest generates a "aws/request.Request" representing the
  5200. // client's request for the PutBucketWebsite operation. The "output" return
  5201. // value will be populated with the request's response once the request completes
  5202. // successfuly.
  5203. //
  5204. // Use "Send" method on the returned Request to send the API call to the service.
  5205. // the "output" return value is not valid until after Send returns without error.
  5206. //
  5207. // See PutBucketWebsite for more information on using the PutBucketWebsite
  5208. // API call, and error handling.
  5209. //
  5210. // This method is useful when you want to inject custom logic or configuration
  5211. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5212. //
  5213. //
  5214. // // Example sending a request using the PutBucketWebsiteRequest method.
  5215. // req, resp := client.PutBucketWebsiteRequest(params)
  5216. //
  5217. // err := req.Send()
  5218. // if err == nil { // resp is now filled
  5219. // fmt.Println(resp)
  5220. // }
  5221. //
  5222. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5223. func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
  5224. op := &request.Operation{
  5225. Name: opPutBucketWebsite,
  5226. HTTPMethod: "PUT",
  5227. HTTPPath: "/{Bucket}?website",
  5228. }
  5229. if input == nil {
  5230. input = &PutBucketWebsiteInput{}
  5231. }
  5232. output = &PutBucketWebsiteOutput{}
  5233. req = c.newRequest(op, input, output)
  5234. req.Handlers.Unmarshal.Remove(restxml.UnmarshalHandler)
  5235. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  5236. return
  5237. }
  5238. // PutBucketWebsite API operation for Amazon Simple Storage Service.
  5239. //
  5240. // Set the website configuration for a bucket.
  5241. //
  5242. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5243. // with awserr.Error's Code and Message methods to get detailed information about
  5244. // the error.
  5245. //
  5246. // See the AWS API reference guide for Amazon Simple Storage Service's
  5247. // API operation PutBucketWebsite for usage and error information.
  5248. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
  5249. func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
  5250. req, out := c.PutBucketWebsiteRequest(input)
  5251. return out, req.Send()
  5252. }
  5253. // PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
  5254. // the ability to pass a context and additional request options.
  5255. //
  5256. // See PutBucketWebsite for details on how to use this API operation.
  5257. //
  5258. // The context must be non-nil and will be used for request cancellation. If
  5259. // the context is nil a panic will occur. In the future the SDK may create
  5260. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5261. // for more information on using Contexts.
  5262. func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
  5263. req, out := c.PutBucketWebsiteRequest(input)
  5264. req.SetContext(ctx)
  5265. req.ApplyOptions(opts...)
  5266. return out, req.Send()
  5267. }
  5268. const opPutObject = "PutObject"
  5269. // PutObjectRequest generates a "aws/request.Request" representing the
  5270. // client's request for the PutObject operation. The "output" return
  5271. // value will be populated with the request's response once the request completes
  5272. // successfuly.
  5273. //
  5274. // Use "Send" method on the returned Request to send the API call to the service.
  5275. // the "output" return value is not valid until after Send returns without error.
  5276. //
  5277. // See PutObject for more information on using the PutObject
  5278. // API call, and error handling.
  5279. //
  5280. // This method is useful when you want to inject custom logic or configuration
  5281. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5282. //
  5283. //
  5284. // // Example sending a request using the PutObjectRequest method.
  5285. // req, resp := client.PutObjectRequest(params)
  5286. //
  5287. // err := req.Send()
  5288. // if err == nil { // resp is now filled
  5289. // fmt.Println(resp)
  5290. // }
  5291. //
  5292. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5293. func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
  5294. op := &request.Operation{
  5295. Name: opPutObject,
  5296. HTTPMethod: "PUT",
  5297. HTTPPath: "/{Bucket}/{Key+}",
  5298. }
  5299. if input == nil {
  5300. input = &PutObjectInput{}
  5301. }
  5302. output = &PutObjectOutput{}
  5303. req = c.newRequest(op, input, output)
  5304. return
  5305. }
  5306. // PutObject API operation for Amazon Simple Storage Service.
  5307. //
  5308. // Adds an object to a bucket.
  5309. //
  5310. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5311. // with awserr.Error's Code and Message methods to get detailed information about
  5312. // the error.
  5313. //
  5314. // See the AWS API reference guide for Amazon Simple Storage Service's
  5315. // API operation PutObject for usage and error information.
  5316. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
  5317. func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
  5318. req, out := c.PutObjectRequest(input)
  5319. return out, req.Send()
  5320. }
  5321. // PutObjectWithContext is the same as PutObject with the addition of
  5322. // the ability to pass a context and additional request options.
  5323. //
  5324. // See PutObject for details on how to use this API operation.
  5325. //
  5326. // The context must be non-nil and will be used for request cancellation. If
  5327. // the context is nil a panic will occur. In the future the SDK may create
  5328. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5329. // for more information on using Contexts.
  5330. func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
  5331. req, out := c.PutObjectRequest(input)
  5332. req.SetContext(ctx)
  5333. req.ApplyOptions(opts...)
  5334. return out, req.Send()
  5335. }
  5336. const opPutObjectAcl = "PutObjectAcl"
  5337. // PutObjectAclRequest generates a "aws/request.Request" representing the
  5338. // client's request for the PutObjectAcl operation. The "output" return
  5339. // value will be populated with the request's response once the request completes
  5340. // successfuly.
  5341. //
  5342. // Use "Send" method on the returned Request to send the API call to the service.
  5343. // the "output" return value is not valid until after Send returns without error.
  5344. //
  5345. // See PutObjectAcl for more information on using the PutObjectAcl
  5346. // API call, and error handling.
  5347. //
  5348. // This method is useful when you want to inject custom logic or configuration
  5349. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5350. //
  5351. //
  5352. // // Example sending a request using the PutObjectAclRequest method.
  5353. // req, resp := client.PutObjectAclRequest(params)
  5354. //
  5355. // err := req.Send()
  5356. // if err == nil { // resp is now filled
  5357. // fmt.Println(resp)
  5358. // }
  5359. //
  5360. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5361. func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
  5362. op := &request.Operation{
  5363. Name: opPutObjectAcl,
  5364. HTTPMethod: "PUT",
  5365. HTTPPath: "/{Bucket}/{Key+}?acl",
  5366. }
  5367. if input == nil {
  5368. input = &PutObjectAclInput{}
  5369. }
  5370. output = &PutObjectAclOutput{}
  5371. req = c.newRequest(op, input, output)
  5372. return
  5373. }
  5374. // PutObjectAcl API operation for Amazon Simple Storage Service.
  5375. //
  5376. // uses the acl subresource to set the access control list (ACL) permissions
  5377. // for an object that already exists in a bucket
  5378. //
  5379. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5380. // with awserr.Error's Code and Message methods to get detailed information about
  5381. // the error.
  5382. //
  5383. // See the AWS API reference guide for Amazon Simple Storage Service's
  5384. // API operation PutObjectAcl for usage and error information.
  5385. //
  5386. // Returned Error Codes:
  5387. // * ErrCodeNoSuchKey "NoSuchKey"
  5388. // The specified key does not exist.
  5389. //
  5390. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
  5391. func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
  5392. req, out := c.PutObjectAclRequest(input)
  5393. return out, req.Send()
  5394. }
  5395. // PutObjectAclWithContext is the same as PutObjectAcl with the addition of
  5396. // the ability to pass a context and additional request options.
  5397. //
  5398. // See PutObjectAcl for details on how to use this API operation.
  5399. //
  5400. // The context must be non-nil and will be used for request cancellation. If
  5401. // the context is nil a panic will occur. In the future the SDK may create
  5402. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5403. // for more information on using Contexts.
  5404. func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
  5405. req, out := c.PutObjectAclRequest(input)
  5406. req.SetContext(ctx)
  5407. req.ApplyOptions(opts...)
  5408. return out, req.Send()
  5409. }
  5410. const opPutObjectTagging = "PutObjectTagging"
  5411. // PutObjectTaggingRequest generates a "aws/request.Request" representing the
  5412. // client's request for the PutObjectTagging operation. The "output" return
  5413. // value will be populated with the request's response once the request completes
  5414. // successfuly.
  5415. //
  5416. // Use "Send" method on the returned Request to send the API call to the service.
  5417. // the "output" return value is not valid until after Send returns without error.
  5418. //
  5419. // See PutObjectTagging for more information on using the PutObjectTagging
  5420. // API call, and error handling.
  5421. //
  5422. // This method is useful when you want to inject custom logic or configuration
  5423. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5424. //
  5425. //
  5426. // // Example sending a request using the PutObjectTaggingRequest method.
  5427. // req, resp := client.PutObjectTaggingRequest(params)
  5428. //
  5429. // err := req.Send()
  5430. // if err == nil { // resp is now filled
  5431. // fmt.Println(resp)
  5432. // }
  5433. //
  5434. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5435. func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
  5436. op := &request.Operation{
  5437. Name: opPutObjectTagging,
  5438. HTTPMethod: "PUT",
  5439. HTTPPath: "/{Bucket}/{Key+}?tagging",
  5440. }
  5441. if input == nil {
  5442. input = &PutObjectTaggingInput{}
  5443. }
  5444. output = &PutObjectTaggingOutput{}
  5445. req = c.newRequest(op, input, output)
  5446. return
  5447. }
  5448. // PutObjectTagging API operation for Amazon Simple Storage Service.
  5449. //
  5450. // Sets the supplied tag-set to an object that already exists in a bucket
  5451. //
  5452. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5453. // with awserr.Error's Code and Message methods to get detailed information about
  5454. // the error.
  5455. //
  5456. // See the AWS API reference guide for Amazon Simple Storage Service's
  5457. // API operation PutObjectTagging for usage and error information.
  5458. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
  5459. func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
  5460. req, out := c.PutObjectTaggingRequest(input)
  5461. return out, req.Send()
  5462. }
  5463. // PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
  5464. // the ability to pass a context and additional request options.
  5465. //
  5466. // See PutObjectTagging for details on how to use this API operation.
  5467. //
  5468. // The context must be non-nil and will be used for request cancellation. If
  5469. // the context is nil a panic will occur. In the future the SDK may create
  5470. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5471. // for more information on using Contexts.
  5472. func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
  5473. req, out := c.PutObjectTaggingRequest(input)
  5474. req.SetContext(ctx)
  5475. req.ApplyOptions(opts...)
  5476. return out, req.Send()
  5477. }
  5478. const opRestoreObject = "RestoreObject"
  5479. // RestoreObjectRequest generates a "aws/request.Request" representing the
  5480. // client's request for the RestoreObject operation. The "output" return
  5481. // value will be populated with the request's response once the request completes
  5482. // successfuly.
  5483. //
  5484. // Use "Send" method on the returned Request to send the API call to the service.
  5485. // the "output" return value is not valid until after Send returns without error.
  5486. //
  5487. // See RestoreObject for more information on using the RestoreObject
  5488. // API call, and error handling.
  5489. //
  5490. // This method is useful when you want to inject custom logic or configuration
  5491. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5492. //
  5493. //
  5494. // // Example sending a request using the RestoreObjectRequest method.
  5495. // req, resp := client.RestoreObjectRequest(params)
  5496. //
  5497. // err := req.Send()
  5498. // if err == nil { // resp is now filled
  5499. // fmt.Println(resp)
  5500. // }
  5501. //
  5502. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5503. func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
  5504. op := &request.Operation{
  5505. Name: opRestoreObject,
  5506. HTTPMethod: "POST",
  5507. HTTPPath: "/{Bucket}/{Key+}?restore",
  5508. }
  5509. if input == nil {
  5510. input = &RestoreObjectInput{}
  5511. }
  5512. output = &RestoreObjectOutput{}
  5513. req = c.newRequest(op, input, output)
  5514. return
  5515. }
  5516. // RestoreObject API operation for Amazon Simple Storage Service.
  5517. //
  5518. // Restores an archived copy of an object back into Amazon S3
  5519. //
  5520. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5521. // with awserr.Error's Code and Message methods to get detailed information about
  5522. // the error.
  5523. //
  5524. // See the AWS API reference guide for Amazon Simple Storage Service's
  5525. // API operation RestoreObject for usage and error information.
  5526. //
  5527. // Returned Error Codes:
  5528. // * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
  5529. // This operation is not allowed against this storage tier
  5530. //
  5531. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
  5532. func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
  5533. req, out := c.RestoreObjectRequest(input)
  5534. return out, req.Send()
  5535. }
  5536. // RestoreObjectWithContext is the same as RestoreObject with the addition of
  5537. // the ability to pass a context and additional request options.
  5538. //
  5539. // See RestoreObject for details on how to use this API operation.
  5540. //
  5541. // The context must be non-nil and will be used for request cancellation. If
  5542. // the context is nil a panic will occur. In the future the SDK may create
  5543. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5544. // for more information on using Contexts.
  5545. func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
  5546. req, out := c.RestoreObjectRequest(input)
  5547. req.SetContext(ctx)
  5548. req.ApplyOptions(opts...)
  5549. return out, req.Send()
  5550. }
  5551. const opUploadPart = "UploadPart"
  5552. // UploadPartRequest generates a "aws/request.Request" representing the
  5553. // client's request for the UploadPart operation. The "output" return
  5554. // value will be populated with the request's response once the request completes
  5555. // successfuly.
  5556. //
  5557. // Use "Send" method on the returned Request to send the API call to the service.
  5558. // the "output" return value is not valid until after Send returns without error.
  5559. //
  5560. // See UploadPart for more information on using the UploadPart
  5561. // API call, and error handling.
  5562. //
  5563. // This method is useful when you want to inject custom logic or configuration
  5564. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5565. //
  5566. //
  5567. // // Example sending a request using the UploadPartRequest method.
  5568. // req, resp := client.UploadPartRequest(params)
  5569. //
  5570. // err := req.Send()
  5571. // if err == nil { // resp is now filled
  5572. // fmt.Println(resp)
  5573. // }
  5574. //
  5575. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5576. func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
  5577. op := &request.Operation{
  5578. Name: opUploadPart,
  5579. HTTPMethod: "PUT",
  5580. HTTPPath: "/{Bucket}/{Key+}",
  5581. }
  5582. if input == nil {
  5583. input = &UploadPartInput{}
  5584. }
  5585. output = &UploadPartOutput{}
  5586. req = c.newRequest(op, input, output)
  5587. return
  5588. }
  5589. // UploadPart API operation for Amazon Simple Storage Service.
  5590. //
  5591. // Uploads a part in a multipart upload.
  5592. //
  5593. // Note: After you initiate multipart upload and upload one or more parts, you
  5594. // must either complete or abort multipart upload in order to stop getting charged
  5595. // for storage of the uploaded parts. Only after you either complete or abort
  5596. // multipart upload, Amazon S3 frees up the parts storage and stops charging
  5597. // you for the parts storage.
  5598. //
  5599. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5600. // with awserr.Error's Code and Message methods to get detailed information about
  5601. // the error.
  5602. //
  5603. // See the AWS API reference guide for Amazon Simple Storage Service's
  5604. // API operation UploadPart for usage and error information.
  5605. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
  5606. func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
  5607. req, out := c.UploadPartRequest(input)
  5608. return out, req.Send()
  5609. }
  5610. // UploadPartWithContext is the same as UploadPart with the addition of
  5611. // the ability to pass a context and additional request options.
  5612. //
  5613. // See UploadPart for details on how to use this API operation.
  5614. //
  5615. // The context must be non-nil and will be used for request cancellation. If
  5616. // the context is nil a panic will occur. In the future the SDK may create
  5617. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5618. // for more information on using Contexts.
  5619. func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
  5620. req, out := c.UploadPartRequest(input)
  5621. req.SetContext(ctx)
  5622. req.ApplyOptions(opts...)
  5623. return out, req.Send()
  5624. }
  5625. const opUploadPartCopy = "UploadPartCopy"
  5626. // UploadPartCopyRequest generates a "aws/request.Request" representing the
  5627. // client's request for the UploadPartCopy operation. The "output" return
  5628. // value will be populated with the request's response once the request completes
  5629. // successfuly.
  5630. //
  5631. // Use "Send" method on the returned Request to send the API call to the service.
  5632. // the "output" return value is not valid until after Send returns without error.
  5633. //
  5634. // See UploadPartCopy for more information on using the UploadPartCopy
  5635. // API call, and error handling.
  5636. //
  5637. // This method is useful when you want to inject custom logic or configuration
  5638. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  5639. //
  5640. //
  5641. // // Example sending a request using the UploadPartCopyRequest method.
  5642. // req, resp := client.UploadPartCopyRequest(params)
  5643. //
  5644. // err := req.Send()
  5645. // if err == nil { // resp is now filled
  5646. // fmt.Println(resp)
  5647. // }
  5648. //
  5649. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5650. func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
  5651. op := &request.Operation{
  5652. Name: opUploadPartCopy,
  5653. HTTPMethod: "PUT",
  5654. HTTPPath: "/{Bucket}/{Key+}",
  5655. }
  5656. if input == nil {
  5657. input = &UploadPartCopyInput{}
  5658. }
  5659. output = &UploadPartCopyOutput{}
  5660. req = c.newRequest(op, input, output)
  5661. return
  5662. }
  5663. // UploadPartCopy API operation for Amazon Simple Storage Service.
  5664. //
  5665. // Uploads a part by copying data from an existing object as data source.
  5666. //
  5667. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  5668. // with awserr.Error's Code and Message methods to get detailed information about
  5669. // the error.
  5670. //
  5671. // See the AWS API reference guide for Amazon Simple Storage Service's
  5672. // API operation UploadPartCopy for usage and error information.
  5673. // See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
  5674. func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
  5675. req, out := c.UploadPartCopyRequest(input)
  5676. return out, req.Send()
  5677. }
  5678. // UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
  5679. // the ability to pass a context and additional request options.
  5680. //
  5681. // See UploadPartCopy for details on how to use this API operation.
  5682. //
  5683. // The context must be non-nil and will be used for request cancellation. If
  5684. // the context is nil a panic will occur. In the future the SDK may create
  5685. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  5686. // for more information on using Contexts.
  5687. func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
  5688. req, out := c.UploadPartCopyRequest(input)
  5689. req.SetContext(ctx)
  5690. req.ApplyOptions(opts...)
  5691. return out, req.Send()
  5692. }
  5693. // Specifies the days since the initiation of an Incomplete Multipart Upload
  5694. // that Lifecycle will wait before permanently removing all parts of the upload.
  5695. type AbortIncompleteMultipartUpload struct {
  5696. _ struct{} `type:"structure"`
  5697. // Indicates the number of days that must pass since initiation for Lifecycle
  5698. // to abort an Incomplete Multipart Upload.
  5699. DaysAfterInitiation *int64 `type:"integer"`
  5700. }
  5701. // String returns the string representation
  5702. func (s AbortIncompleteMultipartUpload) String() string {
  5703. return awsutil.Prettify(s)
  5704. }
  5705. // GoString returns the string representation
  5706. func (s AbortIncompleteMultipartUpload) GoString() string {
  5707. return s.String()
  5708. }
  5709. // SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
  5710. func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
  5711. s.DaysAfterInitiation = &v
  5712. return s
  5713. }
  5714. type AbortMultipartUploadInput struct {
  5715. _ struct{} `type:"structure"`
  5716. // Bucket is a required field
  5717. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  5718. // Key is a required field
  5719. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  5720. // Confirms that the requester knows that she or he will be charged for the
  5721. // request. Bucket owners need not specify this parameter in their requests.
  5722. // Documentation on downloading objects from requester pays buckets can be found
  5723. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  5724. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  5725. // UploadId is a required field
  5726. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  5727. }
  5728. // String returns the string representation
  5729. func (s AbortMultipartUploadInput) String() string {
  5730. return awsutil.Prettify(s)
  5731. }
  5732. // GoString returns the string representation
  5733. func (s AbortMultipartUploadInput) GoString() string {
  5734. return s.String()
  5735. }
  5736. // Validate inspects the fields of the type to determine if they are valid.
  5737. func (s *AbortMultipartUploadInput) Validate() error {
  5738. invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
  5739. if s.Bucket == nil {
  5740. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  5741. }
  5742. if s.Key == nil {
  5743. invalidParams.Add(request.NewErrParamRequired("Key"))
  5744. }
  5745. if s.Key != nil && len(*s.Key) < 1 {
  5746. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  5747. }
  5748. if s.UploadId == nil {
  5749. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  5750. }
  5751. if invalidParams.Len() > 0 {
  5752. return invalidParams
  5753. }
  5754. return nil
  5755. }
  5756. // SetBucket sets the Bucket field's value.
  5757. func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
  5758. s.Bucket = &v
  5759. return s
  5760. }
  5761. func (s *AbortMultipartUploadInput) getBucket() (v string) {
  5762. if s.Bucket == nil {
  5763. return v
  5764. }
  5765. return *s.Bucket
  5766. }
  5767. // SetKey sets the Key field's value.
  5768. func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
  5769. s.Key = &v
  5770. return s
  5771. }
  5772. // SetRequestPayer sets the RequestPayer field's value.
  5773. func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
  5774. s.RequestPayer = &v
  5775. return s
  5776. }
  5777. // SetUploadId sets the UploadId field's value.
  5778. func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
  5779. s.UploadId = &v
  5780. return s
  5781. }
  5782. type AbortMultipartUploadOutput struct {
  5783. _ struct{} `type:"structure"`
  5784. // If present, indicates that the requester was successfully charged for the
  5785. // request.
  5786. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  5787. }
  5788. // String returns the string representation
  5789. func (s AbortMultipartUploadOutput) String() string {
  5790. return awsutil.Prettify(s)
  5791. }
  5792. // GoString returns the string representation
  5793. func (s AbortMultipartUploadOutput) GoString() string {
  5794. return s.String()
  5795. }
  5796. // SetRequestCharged sets the RequestCharged field's value.
  5797. func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
  5798. s.RequestCharged = &v
  5799. return s
  5800. }
  5801. type AccelerateConfiguration struct {
  5802. _ struct{} `type:"structure"`
  5803. // The accelerate configuration of the bucket.
  5804. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  5805. }
  5806. // String returns the string representation
  5807. func (s AccelerateConfiguration) String() string {
  5808. return awsutil.Prettify(s)
  5809. }
  5810. // GoString returns the string representation
  5811. func (s AccelerateConfiguration) GoString() string {
  5812. return s.String()
  5813. }
  5814. // SetStatus sets the Status field's value.
  5815. func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
  5816. s.Status = &v
  5817. return s
  5818. }
  5819. type AccessControlPolicy struct {
  5820. _ struct{} `type:"structure"`
  5821. // A list of grants.
  5822. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  5823. Owner *Owner `type:"structure"`
  5824. }
  5825. // String returns the string representation
  5826. func (s AccessControlPolicy) String() string {
  5827. return awsutil.Prettify(s)
  5828. }
  5829. // GoString returns the string representation
  5830. func (s AccessControlPolicy) GoString() string {
  5831. return s.String()
  5832. }
  5833. // Validate inspects the fields of the type to determine if they are valid.
  5834. func (s *AccessControlPolicy) Validate() error {
  5835. invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
  5836. if s.Grants != nil {
  5837. for i, v := range s.Grants {
  5838. if v == nil {
  5839. continue
  5840. }
  5841. if err := v.Validate(); err != nil {
  5842. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
  5843. }
  5844. }
  5845. }
  5846. if invalidParams.Len() > 0 {
  5847. return invalidParams
  5848. }
  5849. return nil
  5850. }
  5851. // SetGrants sets the Grants field's value.
  5852. func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
  5853. s.Grants = v
  5854. return s
  5855. }
  5856. // SetOwner sets the Owner field's value.
  5857. func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
  5858. s.Owner = v
  5859. return s
  5860. }
  5861. // Container for information regarding the access control for replicas.
  5862. type AccessControlTranslation struct {
  5863. _ struct{} `type:"structure"`
  5864. // The override value for the owner of the replica object.
  5865. //
  5866. // Owner is a required field
  5867. Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
  5868. }
  5869. // String returns the string representation
  5870. func (s AccessControlTranslation) String() string {
  5871. return awsutil.Prettify(s)
  5872. }
  5873. // GoString returns the string representation
  5874. func (s AccessControlTranslation) GoString() string {
  5875. return s.String()
  5876. }
  5877. // Validate inspects the fields of the type to determine if they are valid.
  5878. func (s *AccessControlTranslation) Validate() error {
  5879. invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
  5880. if s.Owner == nil {
  5881. invalidParams.Add(request.NewErrParamRequired("Owner"))
  5882. }
  5883. if invalidParams.Len() > 0 {
  5884. return invalidParams
  5885. }
  5886. return nil
  5887. }
  5888. // SetOwner sets the Owner field's value.
  5889. func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
  5890. s.Owner = &v
  5891. return s
  5892. }
  5893. type AnalyticsAndOperator struct {
  5894. _ struct{} `type:"structure"`
  5895. // The prefix to use when evaluating an AND predicate.
  5896. Prefix *string `type:"string"`
  5897. // The list of tags to use when evaluating an AND predicate.
  5898. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  5899. }
  5900. // String returns the string representation
  5901. func (s AnalyticsAndOperator) String() string {
  5902. return awsutil.Prettify(s)
  5903. }
  5904. // GoString returns the string representation
  5905. func (s AnalyticsAndOperator) GoString() string {
  5906. return s.String()
  5907. }
  5908. // Validate inspects the fields of the type to determine if they are valid.
  5909. func (s *AnalyticsAndOperator) Validate() error {
  5910. invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
  5911. if s.Tags != nil {
  5912. for i, v := range s.Tags {
  5913. if v == nil {
  5914. continue
  5915. }
  5916. if err := v.Validate(); err != nil {
  5917. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  5918. }
  5919. }
  5920. }
  5921. if invalidParams.Len() > 0 {
  5922. return invalidParams
  5923. }
  5924. return nil
  5925. }
  5926. // SetPrefix sets the Prefix field's value.
  5927. func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
  5928. s.Prefix = &v
  5929. return s
  5930. }
  5931. // SetTags sets the Tags field's value.
  5932. func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
  5933. s.Tags = v
  5934. return s
  5935. }
  5936. type AnalyticsConfiguration struct {
  5937. _ struct{} `type:"structure"`
  5938. // The filter used to describe a set of objects for analyses. A filter must
  5939. // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
  5940. // If no filter is provided, all objects will be considered in any analysis.
  5941. Filter *AnalyticsFilter `type:"structure"`
  5942. // The identifier used to represent an analytics configuration.
  5943. //
  5944. // Id is a required field
  5945. Id *string `type:"string" required:"true"`
  5946. // If present, it indicates that data related to access patterns will be collected
  5947. // and made available to analyze the tradeoffs between different storage classes.
  5948. //
  5949. // StorageClassAnalysis is a required field
  5950. StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
  5951. }
  5952. // String returns the string representation
  5953. func (s AnalyticsConfiguration) String() string {
  5954. return awsutil.Prettify(s)
  5955. }
  5956. // GoString returns the string representation
  5957. func (s AnalyticsConfiguration) GoString() string {
  5958. return s.String()
  5959. }
  5960. // Validate inspects the fields of the type to determine if they are valid.
  5961. func (s *AnalyticsConfiguration) Validate() error {
  5962. invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
  5963. if s.Id == nil {
  5964. invalidParams.Add(request.NewErrParamRequired("Id"))
  5965. }
  5966. if s.StorageClassAnalysis == nil {
  5967. invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
  5968. }
  5969. if s.Filter != nil {
  5970. if err := s.Filter.Validate(); err != nil {
  5971. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  5972. }
  5973. }
  5974. if s.StorageClassAnalysis != nil {
  5975. if err := s.StorageClassAnalysis.Validate(); err != nil {
  5976. invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
  5977. }
  5978. }
  5979. if invalidParams.Len() > 0 {
  5980. return invalidParams
  5981. }
  5982. return nil
  5983. }
  5984. // SetFilter sets the Filter field's value.
  5985. func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
  5986. s.Filter = v
  5987. return s
  5988. }
  5989. // SetId sets the Id field's value.
  5990. func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
  5991. s.Id = &v
  5992. return s
  5993. }
  5994. // SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
  5995. func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
  5996. s.StorageClassAnalysis = v
  5997. return s
  5998. }
  5999. type AnalyticsExportDestination struct {
  6000. _ struct{} `type:"structure"`
  6001. // A destination signifying output to an S3 bucket.
  6002. //
  6003. // S3BucketDestination is a required field
  6004. S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
  6005. }
  6006. // String returns the string representation
  6007. func (s AnalyticsExportDestination) String() string {
  6008. return awsutil.Prettify(s)
  6009. }
  6010. // GoString returns the string representation
  6011. func (s AnalyticsExportDestination) GoString() string {
  6012. return s.String()
  6013. }
  6014. // Validate inspects the fields of the type to determine if they are valid.
  6015. func (s *AnalyticsExportDestination) Validate() error {
  6016. invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
  6017. if s.S3BucketDestination == nil {
  6018. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  6019. }
  6020. if s.S3BucketDestination != nil {
  6021. if err := s.S3BucketDestination.Validate(); err != nil {
  6022. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  6023. }
  6024. }
  6025. if invalidParams.Len() > 0 {
  6026. return invalidParams
  6027. }
  6028. return nil
  6029. }
  6030. // SetS3BucketDestination sets the S3BucketDestination field's value.
  6031. func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
  6032. s.S3BucketDestination = v
  6033. return s
  6034. }
  6035. type AnalyticsFilter struct {
  6036. _ struct{} `type:"structure"`
  6037. // A conjunction (logical AND) of predicates, which is used in evaluating an
  6038. // analytics filter. The operator must have at least two predicates.
  6039. And *AnalyticsAndOperator `type:"structure"`
  6040. // The prefix to use when evaluating an analytics filter.
  6041. Prefix *string `type:"string"`
  6042. // The tag to use when evaluating an analytics filter.
  6043. Tag *Tag `type:"structure"`
  6044. }
  6045. // String returns the string representation
  6046. func (s AnalyticsFilter) String() string {
  6047. return awsutil.Prettify(s)
  6048. }
  6049. // GoString returns the string representation
  6050. func (s AnalyticsFilter) GoString() string {
  6051. return s.String()
  6052. }
  6053. // Validate inspects the fields of the type to determine if they are valid.
  6054. func (s *AnalyticsFilter) Validate() error {
  6055. invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
  6056. if s.And != nil {
  6057. if err := s.And.Validate(); err != nil {
  6058. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  6059. }
  6060. }
  6061. if s.Tag != nil {
  6062. if err := s.Tag.Validate(); err != nil {
  6063. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  6064. }
  6065. }
  6066. if invalidParams.Len() > 0 {
  6067. return invalidParams
  6068. }
  6069. return nil
  6070. }
  6071. // SetAnd sets the And field's value.
  6072. func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
  6073. s.And = v
  6074. return s
  6075. }
  6076. // SetPrefix sets the Prefix field's value.
  6077. func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
  6078. s.Prefix = &v
  6079. return s
  6080. }
  6081. // SetTag sets the Tag field's value.
  6082. func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
  6083. s.Tag = v
  6084. return s
  6085. }
  6086. type AnalyticsS3BucketDestination struct {
  6087. _ struct{} `type:"structure"`
  6088. // The Amazon resource name (ARN) of the bucket to which data is exported.
  6089. //
  6090. // Bucket is a required field
  6091. Bucket *string `type:"string" required:"true"`
  6092. // The account ID that owns the destination bucket. If no account ID is provided,
  6093. // the owner will not be validated prior to exporting data.
  6094. BucketAccountId *string `type:"string"`
  6095. // The file format used when exporting data to Amazon S3.
  6096. //
  6097. // Format is a required field
  6098. Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
  6099. // The prefix to use when exporting data. The exported data begins with this
  6100. // prefix.
  6101. Prefix *string `type:"string"`
  6102. }
  6103. // String returns the string representation
  6104. func (s AnalyticsS3BucketDestination) String() string {
  6105. return awsutil.Prettify(s)
  6106. }
  6107. // GoString returns the string representation
  6108. func (s AnalyticsS3BucketDestination) GoString() string {
  6109. return s.String()
  6110. }
  6111. // Validate inspects the fields of the type to determine if they are valid.
  6112. func (s *AnalyticsS3BucketDestination) Validate() error {
  6113. invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
  6114. if s.Bucket == nil {
  6115. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6116. }
  6117. if s.Format == nil {
  6118. invalidParams.Add(request.NewErrParamRequired("Format"))
  6119. }
  6120. if invalidParams.Len() > 0 {
  6121. return invalidParams
  6122. }
  6123. return nil
  6124. }
  6125. // SetBucket sets the Bucket field's value.
  6126. func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
  6127. s.Bucket = &v
  6128. return s
  6129. }
  6130. func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
  6131. if s.Bucket == nil {
  6132. return v
  6133. }
  6134. return *s.Bucket
  6135. }
  6136. // SetBucketAccountId sets the BucketAccountId field's value.
  6137. func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
  6138. s.BucketAccountId = &v
  6139. return s
  6140. }
  6141. // SetFormat sets the Format field's value.
  6142. func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
  6143. s.Format = &v
  6144. return s
  6145. }
  6146. // SetPrefix sets the Prefix field's value.
  6147. func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
  6148. s.Prefix = &v
  6149. return s
  6150. }
  6151. type Bucket struct {
  6152. _ struct{} `type:"structure"`
  6153. // Date the bucket was created.
  6154. CreationDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  6155. // The name of the bucket.
  6156. Name *string `type:"string"`
  6157. }
  6158. // String returns the string representation
  6159. func (s Bucket) String() string {
  6160. return awsutil.Prettify(s)
  6161. }
  6162. // GoString returns the string representation
  6163. func (s Bucket) GoString() string {
  6164. return s.String()
  6165. }
  6166. // SetCreationDate sets the CreationDate field's value.
  6167. func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
  6168. s.CreationDate = &v
  6169. return s
  6170. }
  6171. // SetName sets the Name field's value.
  6172. func (s *Bucket) SetName(v string) *Bucket {
  6173. s.Name = &v
  6174. return s
  6175. }
  6176. type BucketLifecycleConfiguration struct {
  6177. _ struct{} `type:"structure"`
  6178. // Rules is a required field
  6179. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  6180. }
  6181. // String returns the string representation
  6182. func (s BucketLifecycleConfiguration) String() string {
  6183. return awsutil.Prettify(s)
  6184. }
  6185. // GoString returns the string representation
  6186. func (s BucketLifecycleConfiguration) GoString() string {
  6187. return s.String()
  6188. }
  6189. // Validate inspects the fields of the type to determine if they are valid.
  6190. func (s *BucketLifecycleConfiguration) Validate() error {
  6191. invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
  6192. if s.Rules == nil {
  6193. invalidParams.Add(request.NewErrParamRequired("Rules"))
  6194. }
  6195. if s.Rules != nil {
  6196. for i, v := range s.Rules {
  6197. if v == nil {
  6198. continue
  6199. }
  6200. if err := v.Validate(); err != nil {
  6201. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  6202. }
  6203. }
  6204. }
  6205. if invalidParams.Len() > 0 {
  6206. return invalidParams
  6207. }
  6208. return nil
  6209. }
  6210. // SetRules sets the Rules field's value.
  6211. func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
  6212. s.Rules = v
  6213. return s
  6214. }
  6215. type BucketLoggingStatus struct {
  6216. _ struct{} `type:"structure"`
  6217. // Container for logging information. Presence of this element indicates that
  6218. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  6219. // in this case.
  6220. LoggingEnabled *LoggingEnabled `type:"structure"`
  6221. }
  6222. // String returns the string representation
  6223. func (s BucketLoggingStatus) String() string {
  6224. return awsutil.Prettify(s)
  6225. }
  6226. // GoString returns the string representation
  6227. func (s BucketLoggingStatus) GoString() string {
  6228. return s.String()
  6229. }
  6230. // Validate inspects the fields of the type to determine if they are valid.
  6231. func (s *BucketLoggingStatus) Validate() error {
  6232. invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
  6233. if s.LoggingEnabled != nil {
  6234. if err := s.LoggingEnabled.Validate(); err != nil {
  6235. invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
  6236. }
  6237. }
  6238. if invalidParams.Len() > 0 {
  6239. return invalidParams
  6240. }
  6241. return nil
  6242. }
  6243. // SetLoggingEnabled sets the LoggingEnabled field's value.
  6244. func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
  6245. s.LoggingEnabled = v
  6246. return s
  6247. }
  6248. type CORSConfiguration struct {
  6249. _ struct{} `type:"structure"`
  6250. // CORSRules is a required field
  6251. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
  6252. }
  6253. // String returns the string representation
  6254. func (s CORSConfiguration) String() string {
  6255. return awsutil.Prettify(s)
  6256. }
  6257. // GoString returns the string representation
  6258. func (s CORSConfiguration) GoString() string {
  6259. return s.String()
  6260. }
  6261. // Validate inspects the fields of the type to determine if they are valid.
  6262. func (s *CORSConfiguration) Validate() error {
  6263. invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
  6264. if s.CORSRules == nil {
  6265. invalidParams.Add(request.NewErrParamRequired("CORSRules"))
  6266. }
  6267. if s.CORSRules != nil {
  6268. for i, v := range s.CORSRules {
  6269. if v == nil {
  6270. continue
  6271. }
  6272. if err := v.Validate(); err != nil {
  6273. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
  6274. }
  6275. }
  6276. }
  6277. if invalidParams.Len() > 0 {
  6278. return invalidParams
  6279. }
  6280. return nil
  6281. }
  6282. // SetCORSRules sets the CORSRules field's value.
  6283. func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
  6284. s.CORSRules = v
  6285. return s
  6286. }
  6287. type CORSRule struct {
  6288. _ struct{} `type:"structure"`
  6289. // Specifies which headers are allowed in a pre-flight OPTIONS request.
  6290. AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
  6291. // Identifies HTTP methods that the domain/origin specified in the rule is allowed
  6292. // to execute.
  6293. //
  6294. // AllowedMethods is a required field
  6295. AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
  6296. // One or more origins you want customers to be able to access the bucket from.
  6297. //
  6298. // AllowedOrigins is a required field
  6299. AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
  6300. // One or more headers in the response that you want customers to be able to
  6301. // access from their applications (for example, from a JavaScript XMLHttpRequest
  6302. // object).
  6303. ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
  6304. // The time in seconds that your browser is to cache the preflight response
  6305. // for the specified resource.
  6306. MaxAgeSeconds *int64 `type:"integer"`
  6307. }
  6308. // String returns the string representation
  6309. func (s CORSRule) String() string {
  6310. return awsutil.Prettify(s)
  6311. }
  6312. // GoString returns the string representation
  6313. func (s CORSRule) GoString() string {
  6314. return s.String()
  6315. }
  6316. // Validate inspects the fields of the type to determine if they are valid.
  6317. func (s *CORSRule) Validate() error {
  6318. invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
  6319. if s.AllowedMethods == nil {
  6320. invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
  6321. }
  6322. if s.AllowedOrigins == nil {
  6323. invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
  6324. }
  6325. if invalidParams.Len() > 0 {
  6326. return invalidParams
  6327. }
  6328. return nil
  6329. }
  6330. // SetAllowedHeaders sets the AllowedHeaders field's value.
  6331. func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
  6332. s.AllowedHeaders = v
  6333. return s
  6334. }
  6335. // SetAllowedMethods sets the AllowedMethods field's value.
  6336. func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
  6337. s.AllowedMethods = v
  6338. return s
  6339. }
  6340. // SetAllowedOrigins sets the AllowedOrigins field's value.
  6341. func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
  6342. s.AllowedOrigins = v
  6343. return s
  6344. }
  6345. // SetExposeHeaders sets the ExposeHeaders field's value.
  6346. func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
  6347. s.ExposeHeaders = v
  6348. return s
  6349. }
  6350. // SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
  6351. func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
  6352. s.MaxAgeSeconds = &v
  6353. return s
  6354. }
  6355. // Describes how a CSV-formatted input object is formatted.
  6356. type CSVInput struct {
  6357. _ struct{} `type:"structure"`
  6358. // Single character used to indicate a row should be ignored when present at
  6359. // the start of a row.
  6360. Comments *string `type:"string"`
  6361. // Value used to separate individual fields in a record.
  6362. FieldDelimiter *string `type:"string"`
  6363. // Describes the first line of input. Valid values: None, Ignore, Use.
  6364. FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
  6365. // Value used for escaping where the field delimiter is part of the value.
  6366. QuoteCharacter *string `type:"string"`
  6367. // Single character used for escaping the quote character inside an already
  6368. // escaped value.
  6369. QuoteEscapeCharacter *string `type:"string"`
  6370. // Value used to separate individual records.
  6371. RecordDelimiter *string `type:"string"`
  6372. }
  6373. // String returns the string representation
  6374. func (s CSVInput) String() string {
  6375. return awsutil.Prettify(s)
  6376. }
  6377. // GoString returns the string representation
  6378. func (s CSVInput) GoString() string {
  6379. return s.String()
  6380. }
  6381. // SetComments sets the Comments field's value.
  6382. func (s *CSVInput) SetComments(v string) *CSVInput {
  6383. s.Comments = &v
  6384. return s
  6385. }
  6386. // SetFieldDelimiter sets the FieldDelimiter field's value.
  6387. func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
  6388. s.FieldDelimiter = &v
  6389. return s
  6390. }
  6391. // SetFileHeaderInfo sets the FileHeaderInfo field's value.
  6392. func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
  6393. s.FileHeaderInfo = &v
  6394. return s
  6395. }
  6396. // SetQuoteCharacter sets the QuoteCharacter field's value.
  6397. func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
  6398. s.QuoteCharacter = &v
  6399. return s
  6400. }
  6401. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  6402. func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
  6403. s.QuoteEscapeCharacter = &v
  6404. return s
  6405. }
  6406. // SetRecordDelimiter sets the RecordDelimiter field's value.
  6407. func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
  6408. s.RecordDelimiter = &v
  6409. return s
  6410. }
  6411. // Describes how CSV-formatted results are formatted.
  6412. type CSVOutput struct {
  6413. _ struct{} `type:"structure"`
  6414. // Value used to separate individual fields in a record.
  6415. FieldDelimiter *string `type:"string"`
  6416. // Value used for escaping where the field delimiter is part of the value.
  6417. QuoteCharacter *string `type:"string"`
  6418. // Single character used for escaping the quote character inside an already
  6419. // escaped value.
  6420. QuoteEscapeCharacter *string `type:"string"`
  6421. // Indicates whether or not all output fields should be quoted.
  6422. QuoteFields *string `type:"string" enum:"QuoteFields"`
  6423. // Value used to separate individual records.
  6424. RecordDelimiter *string `type:"string"`
  6425. }
  6426. // String returns the string representation
  6427. func (s CSVOutput) String() string {
  6428. return awsutil.Prettify(s)
  6429. }
  6430. // GoString returns the string representation
  6431. func (s CSVOutput) GoString() string {
  6432. return s.String()
  6433. }
  6434. // SetFieldDelimiter sets the FieldDelimiter field's value.
  6435. func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
  6436. s.FieldDelimiter = &v
  6437. return s
  6438. }
  6439. // SetQuoteCharacter sets the QuoteCharacter field's value.
  6440. func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
  6441. s.QuoteCharacter = &v
  6442. return s
  6443. }
  6444. // SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
  6445. func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
  6446. s.QuoteEscapeCharacter = &v
  6447. return s
  6448. }
  6449. // SetQuoteFields sets the QuoteFields field's value.
  6450. func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
  6451. s.QuoteFields = &v
  6452. return s
  6453. }
  6454. // SetRecordDelimiter sets the RecordDelimiter field's value.
  6455. func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
  6456. s.RecordDelimiter = &v
  6457. return s
  6458. }
  6459. type CloudFunctionConfiguration struct {
  6460. _ struct{} `type:"structure"`
  6461. CloudFunction *string `type:"string"`
  6462. // Bucket event for which to send notifications.
  6463. Event *string `deprecated:"true" type:"string" enum:"Event"`
  6464. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  6465. // Optional unique identifier for configurations in a notification configuration.
  6466. // If you don't provide one, Amazon S3 will assign an ID.
  6467. Id *string `type:"string"`
  6468. InvocationRole *string `type:"string"`
  6469. }
  6470. // String returns the string representation
  6471. func (s CloudFunctionConfiguration) String() string {
  6472. return awsutil.Prettify(s)
  6473. }
  6474. // GoString returns the string representation
  6475. func (s CloudFunctionConfiguration) GoString() string {
  6476. return s.String()
  6477. }
  6478. // SetCloudFunction sets the CloudFunction field's value.
  6479. func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
  6480. s.CloudFunction = &v
  6481. return s
  6482. }
  6483. // SetEvent sets the Event field's value.
  6484. func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
  6485. s.Event = &v
  6486. return s
  6487. }
  6488. // SetEvents sets the Events field's value.
  6489. func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
  6490. s.Events = v
  6491. return s
  6492. }
  6493. // SetId sets the Id field's value.
  6494. func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
  6495. s.Id = &v
  6496. return s
  6497. }
  6498. // SetInvocationRole sets the InvocationRole field's value.
  6499. func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
  6500. s.InvocationRole = &v
  6501. return s
  6502. }
  6503. type CommonPrefix struct {
  6504. _ struct{} `type:"structure"`
  6505. Prefix *string `type:"string"`
  6506. }
  6507. // String returns the string representation
  6508. func (s CommonPrefix) String() string {
  6509. return awsutil.Prettify(s)
  6510. }
  6511. // GoString returns the string representation
  6512. func (s CommonPrefix) GoString() string {
  6513. return s.String()
  6514. }
  6515. // SetPrefix sets the Prefix field's value.
  6516. func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
  6517. s.Prefix = &v
  6518. return s
  6519. }
  6520. type CompleteMultipartUploadInput struct {
  6521. _ struct{} `type:"structure" payload:"MultipartUpload"`
  6522. // Bucket is a required field
  6523. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6524. // Key is a required field
  6525. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6526. MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  6527. // Confirms that the requester knows that she or he will be charged for the
  6528. // request. Bucket owners need not specify this parameter in their requests.
  6529. // Documentation on downloading objects from requester pays buckets can be found
  6530. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6531. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6532. // UploadId is a required field
  6533. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  6534. }
  6535. // String returns the string representation
  6536. func (s CompleteMultipartUploadInput) String() string {
  6537. return awsutil.Prettify(s)
  6538. }
  6539. // GoString returns the string representation
  6540. func (s CompleteMultipartUploadInput) GoString() string {
  6541. return s.String()
  6542. }
  6543. // Validate inspects the fields of the type to determine if they are valid.
  6544. func (s *CompleteMultipartUploadInput) Validate() error {
  6545. invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
  6546. if s.Bucket == nil {
  6547. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6548. }
  6549. if s.Key == nil {
  6550. invalidParams.Add(request.NewErrParamRequired("Key"))
  6551. }
  6552. if s.Key != nil && len(*s.Key) < 1 {
  6553. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6554. }
  6555. if s.UploadId == nil {
  6556. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  6557. }
  6558. if invalidParams.Len() > 0 {
  6559. return invalidParams
  6560. }
  6561. return nil
  6562. }
  6563. // SetBucket sets the Bucket field's value.
  6564. func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
  6565. s.Bucket = &v
  6566. return s
  6567. }
  6568. func (s *CompleteMultipartUploadInput) getBucket() (v string) {
  6569. if s.Bucket == nil {
  6570. return v
  6571. }
  6572. return *s.Bucket
  6573. }
  6574. // SetKey sets the Key field's value.
  6575. func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
  6576. s.Key = &v
  6577. return s
  6578. }
  6579. // SetMultipartUpload sets the MultipartUpload field's value.
  6580. func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
  6581. s.MultipartUpload = v
  6582. return s
  6583. }
  6584. // SetRequestPayer sets the RequestPayer field's value.
  6585. func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
  6586. s.RequestPayer = &v
  6587. return s
  6588. }
  6589. // SetUploadId sets the UploadId field's value.
  6590. func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
  6591. s.UploadId = &v
  6592. return s
  6593. }
  6594. type CompleteMultipartUploadOutput struct {
  6595. _ struct{} `type:"structure"`
  6596. Bucket *string `type:"string"`
  6597. // Entity tag of the object.
  6598. ETag *string `type:"string"`
  6599. // If the object expiration is configured, this will contain the expiration
  6600. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  6601. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  6602. Key *string `min:"1" type:"string"`
  6603. Location *string `type:"string"`
  6604. // If present, indicates that the requester was successfully charged for the
  6605. // request.
  6606. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  6607. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  6608. // encryption key that was used for the object.
  6609. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6610. // The Server-side encryption algorithm used when storing this object in S3
  6611. // (e.g., AES256, aws:kms).
  6612. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6613. // Version of the object.
  6614. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  6615. }
  6616. // String returns the string representation
  6617. func (s CompleteMultipartUploadOutput) String() string {
  6618. return awsutil.Prettify(s)
  6619. }
  6620. // GoString returns the string representation
  6621. func (s CompleteMultipartUploadOutput) GoString() string {
  6622. return s.String()
  6623. }
  6624. // SetBucket sets the Bucket field's value.
  6625. func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
  6626. s.Bucket = &v
  6627. return s
  6628. }
  6629. func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
  6630. if s.Bucket == nil {
  6631. return v
  6632. }
  6633. return *s.Bucket
  6634. }
  6635. // SetETag sets the ETag field's value.
  6636. func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
  6637. s.ETag = &v
  6638. return s
  6639. }
  6640. // SetExpiration sets the Expiration field's value.
  6641. func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
  6642. s.Expiration = &v
  6643. return s
  6644. }
  6645. // SetKey sets the Key field's value.
  6646. func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
  6647. s.Key = &v
  6648. return s
  6649. }
  6650. // SetLocation sets the Location field's value.
  6651. func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
  6652. s.Location = &v
  6653. return s
  6654. }
  6655. // SetRequestCharged sets the RequestCharged field's value.
  6656. func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
  6657. s.RequestCharged = &v
  6658. return s
  6659. }
  6660. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  6661. func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
  6662. s.SSEKMSKeyId = &v
  6663. return s
  6664. }
  6665. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  6666. func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
  6667. s.ServerSideEncryption = &v
  6668. return s
  6669. }
  6670. // SetVersionId sets the VersionId field's value.
  6671. func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
  6672. s.VersionId = &v
  6673. return s
  6674. }
  6675. type CompletedMultipartUpload struct {
  6676. _ struct{} `type:"structure"`
  6677. Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
  6678. }
  6679. // String returns the string representation
  6680. func (s CompletedMultipartUpload) String() string {
  6681. return awsutil.Prettify(s)
  6682. }
  6683. // GoString returns the string representation
  6684. func (s CompletedMultipartUpload) GoString() string {
  6685. return s.String()
  6686. }
  6687. // SetParts sets the Parts field's value.
  6688. func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
  6689. s.Parts = v
  6690. return s
  6691. }
  6692. type CompletedPart struct {
  6693. _ struct{} `type:"structure"`
  6694. // Entity tag returned when the part was uploaded.
  6695. ETag *string `type:"string"`
  6696. // Part number that identifies the part. This is a positive integer between
  6697. // 1 and 10,000.
  6698. PartNumber *int64 `type:"integer"`
  6699. }
  6700. // String returns the string representation
  6701. func (s CompletedPart) String() string {
  6702. return awsutil.Prettify(s)
  6703. }
  6704. // GoString returns the string representation
  6705. func (s CompletedPart) GoString() string {
  6706. return s.String()
  6707. }
  6708. // SetETag sets the ETag field's value.
  6709. func (s *CompletedPart) SetETag(v string) *CompletedPart {
  6710. s.ETag = &v
  6711. return s
  6712. }
  6713. // SetPartNumber sets the PartNumber field's value.
  6714. func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
  6715. s.PartNumber = &v
  6716. return s
  6717. }
  6718. type Condition struct {
  6719. _ struct{} `type:"structure"`
  6720. // The HTTP error code when the redirect is applied. In the event of an error,
  6721. // if the error code equals this value, then the specified redirect is applied.
  6722. // Required when parent element Condition is specified and sibling KeyPrefixEquals
  6723. // is not specified. If both are specified, then both must be true for the redirect
  6724. // to be applied.
  6725. HttpErrorCodeReturnedEquals *string `type:"string"`
  6726. // The object key name prefix when the redirect is applied. For example, to
  6727. // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
  6728. // To redirect request for all pages with the prefix docs/, the key prefix will
  6729. // be /docs, which identifies all objects in the docs/ folder. Required when
  6730. // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
  6731. // is not specified. If both conditions are specified, both must be true for
  6732. // the redirect to be applied.
  6733. KeyPrefixEquals *string `type:"string"`
  6734. }
  6735. // String returns the string representation
  6736. func (s Condition) String() string {
  6737. return awsutil.Prettify(s)
  6738. }
  6739. // GoString returns the string representation
  6740. func (s Condition) GoString() string {
  6741. return s.String()
  6742. }
  6743. // SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
  6744. func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
  6745. s.HttpErrorCodeReturnedEquals = &v
  6746. return s
  6747. }
  6748. // SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
  6749. func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
  6750. s.KeyPrefixEquals = &v
  6751. return s
  6752. }
  6753. type CopyObjectInput struct {
  6754. _ struct{} `type:"structure"`
  6755. // The canned ACL to apply to the object.
  6756. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  6757. // Bucket is a required field
  6758. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  6759. // Specifies caching behavior along the request/reply chain.
  6760. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  6761. // Specifies presentational information for the object.
  6762. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  6763. // Specifies what content encodings have been applied to the object and thus
  6764. // what decoding mechanisms must be applied to obtain the media-type referenced
  6765. // by the Content-Type header field.
  6766. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  6767. // The language the content is in.
  6768. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  6769. // A standard MIME type describing the format of the object data.
  6770. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  6771. // The name of the source bucket and key name of the source object, separated
  6772. // by a slash (/). Must be URL-encoded.
  6773. //
  6774. // CopySource is a required field
  6775. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  6776. // Copies the object if its entity tag (ETag) matches the specified tag.
  6777. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  6778. // Copies the object if it has been modified since the specified time.
  6779. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  6780. // Copies the object if its entity tag (ETag) is different than the specified
  6781. // ETag.
  6782. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  6783. // Copies the object if it hasn't been modified since the specified time.
  6784. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  6785. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  6786. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  6787. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  6788. // the source object. The encryption key provided in this header must be one
  6789. // that was used when the source object was created.
  6790. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  6791. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6792. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6793. // key was transmitted without error.
  6794. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  6795. // The date and time at which the object is no longer cacheable.
  6796. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  6797. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  6798. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  6799. // Allows grantee to read the object data and its metadata.
  6800. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  6801. // Allows grantee to read the object ACL.
  6802. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  6803. // Allows grantee to write the ACL for the applicable object.
  6804. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  6805. // Key is a required field
  6806. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  6807. // A map of metadata to store with the object in S3.
  6808. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  6809. // Specifies whether the metadata is copied from the source object or replaced
  6810. // with metadata provided in the request.
  6811. MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
  6812. // Confirms that the requester knows that she or he will be charged for the
  6813. // request. Bucket owners need not specify this parameter in their requests.
  6814. // Documentation on downloading objects from requester pays buckets can be found
  6815. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  6816. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  6817. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  6818. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  6819. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  6820. // data. This value is used to store the object and then it is discarded; Amazon
  6821. // does not store the encryption key. The key must be appropriate for use with
  6822. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  6823. // header.
  6824. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  6825. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  6826. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  6827. // key was transmitted without error.
  6828. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  6829. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  6830. // requests for an object protected by AWS KMS will fail if not made via SSL
  6831. // or using SigV4. Documentation on configuring any of the officially supported
  6832. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  6833. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  6834. // The Server-side encryption algorithm used when storing this object in S3
  6835. // (e.g., AES256, aws:kms).
  6836. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  6837. // The type of storage to use for the object. Defaults to 'STANDARD'.
  6838. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  6839. // The tag-set for the object destination object this value must be used in
  6840. // conjunction with the TaggingDirective. The tag-set must be encoded as URL
  6841. // Query parameters
  6842. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  6843. // Specifies whether the object tag-set are copied from the source object or
  6844. // replaced with tag-set provided in the request.
  6845. TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
  6846. // If the bucket is configured as a website, redirects requests for this object
  6847. // to another object in the same bucket or to an external URL. Amazon S3 stores
  6848. // the value of this header in the object metadata.
  6849. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  6850. }
  6851. // String returns the string representation
  6852. func (s CopyObjectInput) String() string {
  6853. return awsutil.Prettify(s)
  6854. }
  6855. // GoString returns the string representation
  6856. func (s CopyObjectInput) GoString() string {
  6857. return s.String()
  6858. }
  6859. // Validate inspects the fields of the type to determine if they are valid.
  6860. func (s *CopyObjectInput) Validate() error {
  6861. invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
  6862. if s.Bucket == nil {
  6863. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  6864. }
  6865. if s.CopySource == nil {
  6866. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  6867. }
  6868. if s.Key == nil {
  6869. invalidParams.Add(request.NewErrParamRequired("Key"))
  6870. }
  6871. if s.Key != nil && len(*s.Key) < 1 {
  6872. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  6873. }
  6874. if invalidParams.Len() > 0 {
  6875. return invalidParams
  6876. }
  6877. return nil
  6878. }
  6879. // SetACL sets the ACL field's value.
  6880. func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
  6881. s.ACL = &v
  6882. return s
  6883. }
  6884. // SetBucket sets the Bucket field's value.
  6885. func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
  6886. s.Bucket = &v
  6887. return s
  6888. }
  6889. func (s *CopyObjectInput) getBucket() (v string) {
  6890. if s.Bucket == nil {
  6891. return v
  6892. }
  6893. return *s.Bucket
  6894. }
  6895. // SetCacheControl sets the CacheControl field's value.
  6896. func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
  6897. s.CacheControl = &v
  6898. return s
  6899. }
  6900. // SetContentDisposition sets the ContentDisposition field's value.
  6901. func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
  6902. s.ContentDisposition = &v
  6903. return s
  6904. }
  6905. // SetContentEncoding sets the ContentEncoding field's value.
  6906. func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
  6907. s.ContentEncoding = &v
  6908. return s
  6909. }
  6910. // SetContentLanguage sets the ContentLanguage field's value.
  6911. func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
  6912. s.ContentLanguage = &v
  6913. return s
  6914. }
  6915. // SetContentType sets the ContentType field's value.
  6916. func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
  6917. s.ContentType = &v
  6918. return s
  6919. }
  6920. // SetCopySource sets the CopySource field's value.
  6921. func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
  6922. s.CopySource = &v
  6923. return s
  6924. }
  6925. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  6926. func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
  6927. s.CopySourceIfMatch = &v
  6928. return s
  6929. }
  6930. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  6931. func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
  6932. s.CopySourceIfModifiedSince = &v
  6933. return s
  6934. }
  6935. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  6936. func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
  6937. s.CopySourceIfNoneMatch = &v
  6938. return s
  6939. }
  6940. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  6941. func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
  6942. s.CopySourceIfUnmodifiedSince = &v
  6943. return s
  6944. }
  6945. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  6946. func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
  6947. s.CopySourceSSECustomerAlgorithm = &v
  6948. return s
  6949. }
  6950. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  6951. func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
  6952. s.CopySourceSSECustomerKey = &v
  6953. return s
  6954. }
  6955. func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
  6956. if s.CopySourceSSECustomerKey == nil {
  6957. return v
  6958. }
  6959. return *s.CopySourceSSECustomerKey
  6960. }
  6961. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  6962. func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
  6963. s.CopySourceSSECustomerKeyMD5 = &v
  6964. return s
  6965. }
  6966. // SetExpires sets the Expires field's value.
  6967. func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
  6968. s.Expires = &v
  6969. return s
  6970. }
  6971. // SetGrantFullControl sets the GrantFullControl field's value.
  6972. func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
  6973. s.GrantFullControl = &v
  6974. return s
  6975. }
  6976. // SetGrantRead sets the GrantRead field's value.
  6977. func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
  6978. s.GrantRead = &v
  6979. return s
  6980. }
  6981. // SetGrantReadACP sets the GrantReadACP field's value.
  6982. func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
  6983. s.GrantReadACP = &v
  6984. return s
  6985. }
  6986. // SetGrantWriteACP sets the GrantWriteACP field's value.
  6987. func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
  6988. s.GrantWriteACP = &v
  6989. return s
  6990. }
  6991. // SetKey sets the Key field's value.
  6992. func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
  6993. s.Key = &v
  6994. return s
  6995. }
  6996. // SetMetadata sets the Metadata field's value.
  6997. func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
  6998. s.Metadata = v
  6999. return s
  7000. }
  7001. // SetMetadataDirective sets the MetadataDirective field's value.
  7002. func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
  7003. s.MetadataDirective = &v
  7004. return s
  7005. }
  7006. // SetRequestPayer sets the RequestPayer field's value.
  7007. func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
  7008. s.RequestPayer = &v
  7009. return s
  7010. }
  7011. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7012. func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
  7013. s.SSECustomerAlgorithm = &v
  7014. return s
  7015. }
  7016. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7017. func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
  7018. s.SSECustomerKey = &v
  7019. return s
  7020. }
  7021. func (s *CopyObjectInput) getSSECustomerKey() (v string) {
  7022. if s.SSECustomerKey == nil {
  7023. return v
  7024. }
  7025. return *s.SSECustomerKey
  7026. }
  7027. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7028. func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
  7029. s.SSECustomerKeyMD5 = &v
  7030. return s
  7031. }
  7032. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7033. func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
  7034. s.SSEKMSKeyId = &v
  7035. return s
  7036. }
  7037. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7038. func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
  7039. s.ServerSideEncryption = &v
  7040. return s
  7041. }
  7042. // SetStorageClass sets the StorageClass field's value.
  7043. func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
  7044. s.StorageClass = &v
  7045. return s
  7046. }
  7047. // SetTagging sets the Tagging field's value.
  7048. func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
  7049. s.Tagging = &v
  7050. return s
  7051. }
  7052. // SetTaggingDirective sets the TaggingDirective field's value.
  7053. func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
  7054. s.TaggingDirective = &v
  7055. return s
  7056. }
  7057. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7058. func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
  7059. s.WebsiteRedirectLocation = &v
  7060. return s
  7061. }
  7062. type CopyObjectOutput struct {
  7063. _ struct{} `type:"structure" payload:"CopyObjectResult"`
  7064. CopyObjectResult *CopyObjectResult `type:"structure"`
  7065. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  7066. // If the object expiration is configured, the response includes this header.
  7067. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  7068. // If present, indicates that the requester was successfully charged for the
  7069. // request.
  7070. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7071. // If server-side encryption with a customer-provided encryption key was requested,
  7072. // the response will include this header confirming the encryption algorithm
  7073. // used.
  7074. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7075. // If server-side encryption with a customer-provided encryption key was requested,
  7076. // the response will include this header to provide round trip message integrity
  7077. // verification of the customer-provided encryption key.
  7078. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7079. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7080. // encryption key that was used for the object.
  7081. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7082. // The Server-side encryption algorithm used when storing this object in S3
  7083. // (e.g., AES256, aws:kms).
  7084. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7085. // Version ID of the newly created copy.
  7086. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  7087. }
  7088. // String returns the string representation
  7089. func (s CopyObjectOutput) String() string {
  7090. return awsutil.Prettify(s)
  7091. }
  7092. // GoString returns the string representation
  7093. func (s CopyObjectOutput) GoString() string {
  7094. return s.String()
  7095. }
  7096. // SetCopyObjectResult sets the CopyObjectResult field's value.
  7097. func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
  7098. s.CopyObjectResult = v
  7099. return s
  7100. }
  7101. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  7102. func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
  7103. s.CopySourceVersionId = &v
  7104. return s
  7105. }
  7106. // SetExpiration sets the Expiration field's value.
  7107. func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
  7108. s.Expiration = &v
  7109. return s
  7110. }
  7111. // SetRequestCharged sets the RequestCharged field's value.
  7112. func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
  7113. s.RequestCharged = &v
  7114. return s
  7115. }
  7116. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7117. func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
  7118. s.SSECustomerAlgorithm = &v
  7119. return s
  7120. }
  7121. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7122. func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
  7123. s.SSECustomerKeyMD5 = &v
  7124. return s
  7125. }
  7126. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7127. func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
  7128. s.SSEKMSKeyId = &v
  7129. return s
  7130. }
  7131. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7132. func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
  7133. s.ServerSideEncryption = &v
  7134. return s
  7135. }
  7136. // SetVersionId sets the VersionId field's value.
  7137. func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
  7138. s.VersionId = &v
  7139. return s
  7140. }
  7141. type CopyObjectResult struct {
  7142. _ struct{} `type:"structure"`
  7143. ETag *string `type:"string"`
  7144. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7145. }
  7146. // String returns the string representation
  7147. func (s CopyObjectResult) String() string {
  7148. return awsutil.Prettify(s)
  7149. }
  7150. // GoString returns the string representation
  7151. func (s CopyObjectResult) GoString() string {
  7152. return s.String()
  7153. }
  7154. // SetETag sets the ETag field's value.
  7155. func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
  7156. s.ETag = &v
  7157. return s
  7158. }
  7159. // SetLastModified sets the LastModified field's value.
  7160. func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
  7161. s.LastModified = &v
  7162. return s
  7163. }
  7164. type CopyPartResult struct {
  7165. _ struct{} `type:"structure"`
  7166. // Entity tag of the object.
  7167. ETag *string `type:"string"`
  7168. // Date and time at which the object was uploaded.
  7169. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  7170. }
  7171. // String returns the string representation
  7172. func (s CopyPartResult) String() string {
  7173. return awsutil.Prettify(s)
  7174. }
  7175. // GoString returns the string representation
  7176. func (s CopyPartResult) GoString() string {
  7177. return s.String()
  7178. }
  7179. // SetETag sets the ETag field's value.
  7180. func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
  7181. s.ETag = &v
  7182. return s
  7183. }
  7184. // SetLastModified sets the LastModified field's value.
  7185. func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
  7186. s.LastModified = &v
  7187. return s
  7188. }
  7189. type CreateBucketConfiguration struct {
  7190. _ struct{} `type:"structure"`
  7191. // Specifies the region where the bucket will be created. If you don't specify
  7192. // a region, the bucket will be created in US Standard.
  7193. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  7194. }
  7195. // String returns the string representation
  7196. func (s CreateBucketConfiguration) String() string {
  7197. return awsutil.Prettify(s)
  7198. }
  7199. // GoString returns the string representation
  7200. func (s CreateBucketConfiguration) GoString() string {
  7201. return s.String()
  7202. }
  7203. // SetLocationConstraint sets the LocationConstraint field's value.
  7204. func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
  7205. s.LocationConstraint = &v
  7206. return s
  7207. }
  7208. type CreateBucketInput struct {
  7209. _ struct{} `type:"structure" payload:"CreateBucketConfiguration"`
  7210. // The canned ACL to apply to the bucket.
  7211. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  7212. // Bucket is a required field
  7213. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7214. CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  7215. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  7216. // bucket.
  7217. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7218. // Allows grantee to list the objects in the bucket.
  7219. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7220. // Allows grantee to read the bucket ACL.
  7221. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7222. // Allows grantee to create, overwrite, and delete any object in the bucket.
  7223. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  7224. // Allows grantee to write the ACL for the applicable bucket.
  7225. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7226. }
  7227. // String returns the string representation
  7228. func (s CreateBucketInput) String() string {
  7229. return awsutil.Prettify(s)
  7230. }
  7231. // GoString returns the string representation
  7232. func (s CreateBucketInput) GoString() string {
  7233. return s.String()
  7234. }
  7235. // Validate inspects the fields of the type to determine if they are valid.
  7236. func (s *CreateBucketInput) Validate() error {
  7237. invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
  7238. if s.Bucket == nil {
  7239. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7240. }
  7241. if invalidParams.Len() > 0 {
  7242. return invalidParams
  7243. }
  7244. return nil
  7245. }
  7246. // SetACL sets the ACL field's value.
  7247. func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
  7248. s.ACL = &v
  7249. return s
  7250. }
  7251. // SetBucket sets the Bucket field's value.
  7252. func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
  7253. s.Bucket = &v
  7254. return s
  7255. }
  7256. func (s *CreateBucketInput) getBucket() (v string) {
  7257. if s.Bucket == nil {
  7258. return v
  7259. }
  7260. return *s.Bucket
  7261. }
  7262. // SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
  7263. func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
  7264. s.CreateBucketConfiguration = v
  7265. return s
  7266. }
  7267. // SetGrantFullControl sets the GrantFullControl field's value.
  7268. func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
  7269. s.GrantFullControl = &v
  7270. return s
  7271. }
  7272. // SetGrantRead sets the GrantRead field's value.
  7273. func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
  7274. s.GrantRead = &v
  7275. return s
  7276. }
  7277. // SetGrantReadACP sets the GrantReadACP field's value.
  7278. func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
  7279. s.GrantReadACP = &v
  7280. return s
  7281. }
  7282. // SetGrantWrite sets the GrantWrite field's value.
  7283. func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
  7284. s.GrantWrite = &v
  7285. return s
  7286. }
  7287. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7288. func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
  7289. s.GrantWriteACP = &v
  7290. return s
  7291. }
  7292. type CreateBucketOutput struct {
  7293. _ struct{} `type:"structure"`
  7294. Location *string `location:"header" locationName:"Location" type:"string"`
  7295. }
  7296. // String returns the string representation
  7297. func (s CreateBucketOutput) String() string {
  7298. return awsutil.Prettify(s)
  7299. }
  7300. // GoString returns the string representation
  7301. func (s CreateBucketOutput) GoString() string {
  7302. return s.String()
  7303. }
  7304. // SetLocation sets the Location field's value.
  7305. func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
  7306. s.Location = &v
  7307. return s
  7308. }
  7309. type CreateMultipartUploadInput struct {
  7310. _ struct{} `type:"structure"`
  7311. // The canned ACL to apply to the object.
  7312. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  7313. // Bucket is a required field
  7314. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7315. // Specifies caching behavior along the request/reply chain.
  7316. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  7317. // Specifies presentational information for the object.
  7318. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  7319. // Specifies what content encodings have been applied to the object and thus
  7320. // what decoding mechanisms must be applied to obtain the media-type referenced
  7321. // by the Content-Type header field.
  7322. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  7323. // The language the content is in.
  7324. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  7325. // A standard MIME type describing the format of the object data.
  7326. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  7327. // The date and time at which the object is no longer cacheable.
  7328. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  7329. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  7330. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  7331. // Allows grantee to read the object data and its metadata.
  7332. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  7333. // Allows grantee to read the object ACL.
  7334. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  7335. // Allows grantee to write the ACL for the applicable object.
  7336. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  7337. // Key is a required field
  7338. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  7339. // A map of metadata to store with the object in S3.
  7340. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  7341. // Confirms that the requester knows that she or he will be charged for the
  7342. // request. Bucket owners need not specify this parameter in their requests.
  7343. // Documentation on downloading objects from requester pays buckets can be found
  7344. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  7345. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  7346. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  7347. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7348. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  7349. // data. This value is used to store the object and then it is discarded; Amazon
  7350. // does not store the encryption key. The key must be appropriate for use with
  7351. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  7352. // header.
  7353. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  7354. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  7355. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  7356. // key was transmitted without error.
  7357. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7358. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  7359. // requests for an object protected by AWS KMS will fail if not made via SSL
  7360. // or using SigV4. Documentation on configuring any of the officially supported
  7361. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  7362. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7363. // The Server-side encryption algorithm used when storing this object in S3
  7364. // (e.g., AES256, aws:kms).
  7365. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7366. // The type of storage to use for the object. Defaults to 'STANDARD'.
  7367. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  7368. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  7369. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  7370. // If the bucket is configured as a website, redirects requests for this object
  7371. // to another object in the same bucket or to an external URL. Amazon S3 stores
  7372. // the value of this header in the object metadata.
  7373. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  7374. }
  7375. // String returns the string representation
  7376. func (s CreateMultipartUploadInput) String() string {
  7377. return awsutil.Prettify(s)
  7378. }
  7379. // GoString returns the string representation
  7380. func (s CreateMultipartUploadInput) GoString() string {
  7381. return s.String()
  7382. }
  7383. // Validate inspects the fields of the type to determine if they are valid.
  7384. func (s *CreateMultipartUploadInput) Validate() error {
  7385. invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
  7386. if s.Bucket == nil {
  7387. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7388. }
  7389. if s.Key == nil {
  7390. invalidParams.Add(request.NewErrParamRequired("Key"))
  7391. }
  7392. if s.Key != nil && len(*s.Key) < 1 {
  7393. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  7394. }
  7395. if invalidParams.Len() > 0 {
  7396. return invalidParams
  7397. }
  7398. return nil
  7399. }
  7400. // SetACL sets the ACL field's value.
  7401. func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
  7402. s.ACL = &v
  7403. return s
  7404. }
  7405. // SetBucket sets the Bucket field's value.
  7406. func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
  7407. s.Bucket = &v
  7408. return s
  7409. }
  7410. func (s *CreateMultipartUploadInput) getBucket() (v string) {
  7411. if s.Bucket == nil {
  7412. return v
  7413. }
  7414. return *s.Bucket
  7415. }
  7416. // SetCacheControl sets the CacheControl field's value.
  7417. func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
  7418. s.CacheControl = &v
  7419. return s
  7420. }
  7421. // SetContentDisposition sets the ContentDisposition field's value.
  7422. func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
  7423. s.ContentDisposition = &v
  7424. return s
  7425. }
  7426. // SetContentEncoding sets the ContentEncoding field's value.
  7427. func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
  7428. s.ContentEncoding = &v
  7429. return s
  7430. }
  7431. // SetContentLanguage sets the ContentLanguage field's value.
  7432. func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
  7433. s.ContentLanguage = &v
  7434. return s
  7435. }
  7436. // SetContentType sets the ContentType field's value.
  7437. func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
  7438. s.ContentType = &v
  7439. return s
  7440. }
  7441. // SetExpires sets the Expires field's value.
  7442. func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
  7443. s.Expires = &v
  7444. return s
  7445. }
  7446. // SetGrantFullControl sets the GrantFullControl field's value.
  7447. func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
  7448. s.GrantFullControl = &v
  7449. return s
  7450. }
  7451. // SetGrantRead sets the GrantRead field's value.
  7452. func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
  7453. s.GrantRead = &v
  7454. return s
  7455. }
  7456. // SetGrantReadACP sets the GrantReadACP field's value.
  7457. func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
  7458. s.GrantReadACP = &v
  7459. return s
  7460. }
  7461. // SetGrantWriteACP sets the GrantWriteACP field's value.
  7462. func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
  7463. s.GrantWriteACP = &v
  7464. return s
  7465. }
  7466. // SetKey sets the Key field's value.
  7467. func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
  7468. s.Key = &v
  7469. return s
  7470. }
  7471. // SetMetadata sets the Metadata field's value.
  7472. func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
  7473. s.Metadata = v
  7474. return s
  7475. }
  7476. // SetRequestPayer sets the RequestPayer field's value.
  7477. func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
  7478. s.RequestPayer = &v
  7479. return s
  7480. }
  7481. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7482. func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
  7483. s.SSECustomerAlgorithm = &v
  7484. return s
  7485. }
  7486. // SetSSECustomerKey sets the SSECustomerKey field's value.
  7487. func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
  7488. s.SSECustomerKey = &v
  7489. return s
  7490. }
  7491. func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
  7492. if s.SSECustomerKey == nil {
  7493. return v
  7494. }
  7495. return *s.SSECustomerKey
  7496. }
  7497. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7498. func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
  7499. s.SSECustomerKeyMD5 = &v
  7500. return s
  7501. }
  7502. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7503. func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
  7504. s.SSEKMSKeyId = &v
  7505. return s
  7506. }
  7507. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7508. func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
  7509. s.ServerSideEncryption = &v
  7510. return s
  7511. }
  7512. // SetStorageClass sets the StorageClass field's value.
  7513. func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
  7514. s.StorageClass = &v
  7515. return s
  7516. }
  7517. // SetTagging sets the Tagging field's value.
  7518. func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
  7519. s.Tagging = &v
  7520. return s
  7521. }
  7522. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  7523. func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
  7524. s.WebsiteRedirectLocation = &v
  7525. return s
  7526. }
  7527. type CreateMultipartUploadOutput struct {
  7528. _ struct{} `type:"structure"`
  7529. // Date when multipart upload will become eligible for abort operation by lifecycle.
  7530. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  7531. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  7532. // operation.
  7533. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  7534. // Name of the bucket to which the multipart upload was initiated.
  7535. Bucket *string `locationName:"Bucket" type:"string"`
  7536. // Object key for which the multipart upload was initiated.
  7537. Key *string `min:"1" type:"string"`
  7538. // If present, indicates that the requester was successfully charged for the
  7539. // request.
  7540. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  7541. // If server-side encryption with a customer-provided encryption key was requested,
  7542. // the response will include this header confirming the encryption algorithm
  7543. // used.
  7544. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  7545. // If server-side encryption with a customer-provided encryption key was requested,
  7546. // the response will include this header to provide round trip message integrity
  7547. // verification of the customer-provided encryption key.
  7548. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  7549. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  7550. // encryption key that was used for the object.
  7551. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  7552. // The Server-side encryption algorithm used when storing this object in S3
  7553. // (e.g., AES256, aws:kms).
  7554. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  7555. // ID for the initiated multipart upload.
  7556. UploadId *string `type:"string"`
  7557. }
  7558. // String returns the string representation
  7559. func (s CreateMultipartUploadOutput) String() string {
  7560. return awsutil.Prettify(s)
  7561. }
  7562. // GoString returns the string representation
  7563. func (s CreateMultipartUploadOutput) GoString() string {
  7564. return s.String()
  7565. }
  7566. // SetAbortDate sets the AbortDate field's value.
  7567. func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
  7568. s.AbortDate = &v
  7569. return s
  7570. }
  7571. // SetAbortRuleId sets the AbortRuleId field's value.
  7572. func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
  7573. s.AbortRuleId = &v
  7574. return s
  7575. }
  7576. // SetBucket sets the Bucket field's value.
  7577. func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
  7578. s.Bucket = &v
  7579. return s
  7580. }
  7581. func (s *CreateMultipartUploadOutput) getBucket() (v string) {
  7582. if s.Bucket == nil {
  7583. return v
  7584. }
  7585. return *s.Bucket
  7586. }
  7587. // SetKey sets the Key field's value.
  7588. func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
  7589. s.Key = &v
  7590. return s
  7591. }
  7592. // SetRequestCharged sets the RequestCharged field's value.
  7593. func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
  7594. s.RequestCharged = &v
  7595. return s
  7596. }
  7597. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  7598. func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
  7599. s.SSECustomerAlgorithm = &v
  7600. return s
  7601. }
  7602. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  7603. func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
  7604. s.SSECustomerKeyMD5 = &v
  7605. return s
  7606. }
  7607. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  7608. func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
  7609. s.SSEKMSKeyId = &v
  7610. return s
  7611. }
  7612. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  7613. func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
  7614. s.ServerSideEncryption = &v
  7615. return s
  7616. }
  7617. // SetUploadId sets the UploadId field's value.
  7618. func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
  7619. s.UploadId = &v
  7620. return s
  7621. }
  7622. type Delete struct {
  7623. _ struct{} `type:"structure"`
  7624. // Objects is a required field
  7625. Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
  7626. // Element to enable quiet mode for the request. When you add this element,
  7627. // you must set its value to true.
  7628. Quiet *bool `type:"boolean"`
  7629. }
  7630. // String returns the string representation
  7631. func (s Delete) String() string {
  7632. return awsutil.Prettify(s)
  7633. }
  7634. // GoString returns the string representation
  7635. func (s Delete) GoString() string {
  7636. return s.String()
  7637. }
  7638. // Validate inspects the fields of the type to determine if they are valid.
  7639. func (s *Delete) Validate() error {
  7640. invalidParams := request.ErrInvalidParams{Context: "Delete"}
  7641. if s.Objects == nil {
  7642. invalidParams.Add(request.NewErrParamRequired("Objects"))
  7643. }
  7644. if s.Objects != nil {
  7645. for i, v := range s.Objects {
  7646. if v == nil {
  7647. continue
  7648. }
  7649. if err := v.Validate(); err != nil {
  7650. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
  7651. }
  7652. }
  7653. }
  7654. if invalidParams.Len() > 0 {
  7655. return invalidParams
  7656. }
  7657. return nil
  7658. }
  7659. // SetObjects sets the Objects field's value.
  7660. func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
  7661. s.Objects = v
  7662. return s
  7663. }
  7664. // SetQuiet sets the Quiet field's value.
  7665. func (s *Delete) SetQuiet(v bool) *Delete {
  7666. s.Quiet = &v
  7667. return s
  7668. }
  7669. type DeleteBucketAnalyticsConfigurationInput struct {
  7670. _ struct{} `type:"structure"`
  7671. // The name of the bucket from which an analytics configuration is deleted.
  7672. //
  7673. // Bucket is a required field
  7674. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7675. // The identifier used to represent an analytics configuration.
  7676. //
  7677. // Id is a required field
  7678. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7679. }
  7680. // String returns the string representation
  7681. func (s DeleteBucketAnalyticsConfigurationInput) String() string {
  7682. return awsutil.Prettify(s)
  7683. }
  7684. // GoString returns the string representation
  7685. func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
  7686. return s.String()
  7687. }
  7688. // Validate inspects the fields of the type to determine if they are valid.
  7689. func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
  7690. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
  7691. if s.Bucket == nil {
  7692. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7693. }
  7694. if s.Id == nil {
  7695. invalidParams.Add(request.NewErrParamRequired("Id"))
  7696. }
  7697. if invalidParams.Len() > 0 {
  7698. return invalidParams
  7699. }
  7700. return nil
  7701. }
  7702. // SetBucket sets the Bucket field's value.
  7703. func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
  7704. s.Bucket = &v
  7705. return s
  7706. }
  7707. func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
  7708. if s.Bucket == nil {
  7709. return v
  7710. }
  7711. return *s.Bucket
  7712. }
  7713. // SetId sets the Id field's value.
  7714. func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
  7715. s.Id = &v
  7716. return s
  7717. }
  7718. type DeleteBucketAnalyticsConfigurationOutput struct {
  7719. _ struct{} `type:"structure"`
  7720. }
  7721. // String returns the string representation
  7722. func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
  7723. return awsutil.Prettify(s)
  7724. }
  7725. // GoString returns the string representation
  7726. func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
  7727. return s.String()
  7728. }
  7729. type DeleteBucketCorsInput struct {
  7730. _ struct{} `type:"structure"`
  7731. // Bucket is a required field
  7732. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7733. }
  7734. // String returns the string representation
  7735. func (s DeleteBucketCorsInput) String() string {
  7736. return awsutil.Prettify(s)
  7737. }
  7738. // GoString returns the string representation
  7739. func (s DeleteBucketCorsInput) GoString() string {
  7740. return s.String()
  7741. }
  7742. // Validate inspects the fields of the type to determine if they are valid.
  7743. func (s *DeleteBucketCorsInput) Validate() error {
  7744. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
  7745. if s.Bucket == nil {
  7746. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7747. }
  7748. if invalidParams.Len() > 0 {
  7749. return invalidParams
  7750. }
  7751. return nil
  7752. }
  7753. // SetBucket sets the Bucket field's value.
  7754. func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
  7755. s.Bucket = &v
  7756. return s
  7757. }
  7758. func (s *DeleteBucketCorsInput) getBucket() (v string) {
  7759. if s.Bucket == nil {
  7760. return v
  7761. }
  7762. return *s.Bucket
  7763. }
  7764. type DeleteBucketCorsOutput struct {
  7765. _ struct{} `type:"structure"`
  7766. }
  7767. // String returns the string representation
  7768. func (s DeleteBucketCorsOutput) String() string {
  7769. return awsutil.Prettify(s)
  7770. }
  7771. // GoString returns the string representation
  7772. func (s DeleteBucketCorsOutput) GoString() string {
  7773. return s.String()
  7774. }
  7775. type DeleteBucketEncryptionInput struct {
  7776. _ struct{} `type:"structure"`
  7777. // The name of the bucket containing the server-side encryption configuration
  7778. // to delete.
  7779. //
  7780. // Bucket is a required field
  7781. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7782. }
  7783. // String returns the string representation
  7784. func (s DeleteBucketEncryptionInput) String() string {
  7785. return awsutil.Prettify(s)
  7786. }
  7787. // GoString returns the string representation
  7788. func (s DeleteBucketEncryptionInput) GoString() string {
  7789. return s.String()
  7790. }
  7791. // Validate inspects the fields of the type to determine if they are valid.
  7792. func (s *DeleteBucketEncryptionInput) Validate() error {
  7793. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
  7794. if s.Bucket == nil {
  7795. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7796. }
  7797. if invalidParams.Len() > 0 {
  7798. return invalidParams
  7799. }
  7800. return nil
  7801. }
  7802. // SetBucket sets the Bucket field's value.
  7803. func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
  7804. s.Bucket = &v
  7805. return s
  7806. }
  7807. func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
  7808. if s.Bucket == nil {
  7809. return v
  7810. }
  7811. return *s.Bucket
  7812. }
  7813. type DeleteBucketEncryptionOutput struct {
  7814. _ struct{} `type:"structure"`
  7815. }
  7816. // String returns the string representation
  7817. func (s DeleteBucketEncryptionOutput) String() string {
  7818. return awsutil.Prettify(s)
  7819. }
  7820. // GoString returns the string representation
  7821. func (s DeleteBucketEncryptionOutput) GoString() string {
  7822. return s.String()
  7823. }
  7824. type DeleteBucketInput struct {
  7825. _ struct{} `type:"structure"`
  7826. // Bucket is a required field
  7827. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7828. }
  7829. // String returns the string representation
  7830. func (s DeleteBucketInput) String() string {
  7831. return awsutil.Prettify(s)
  7832. }
  7833. // GoString returns the string representation
  7834. func (s DeleteBucketInput) GoString() string {
  7835. return s.String()
  7836. }
  7837. // Validate inspects the fields of the type to determine if they are valid.
  7838. func (s *DeleteBucketInput) Validate() error {
  7839. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
  7840. if s.Bucket == nil {
  7841. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7842. }
  7843. if invalidParams.Len() > 0 {
  7844. return invalidParams
  7845. }
  7846. return nil
  7847. }
  7848. // SetBucket sets the Bucket field's value.
  7849. func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
  7850. s.Bucket = &v
  7851. return s
  7852. }
  7853. func (s *DeleteBucketInput) getBucket() (v string) {
  7854. if s.Bucket == nil {
  7855. return v
  7856. }
  7857. return *s.Bucket
  7858. }
  7859. type DeleteBucketInventoryConfigurationInput struct {
  7860. _ struct{} `type:"structure"`
  7861. // The name of the bucket containing the inventory configuration to delete.
  7862. //
  7863. // Bucket is a required field
  7864. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7865. // The ID used to identify the inventory configuration.
  7866. //
  7867. // Id is a required field
  7868. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7869. }
  7870. // String returns the string representation
  7871. func (s DeleteBucketInventoryConfigurationInput) String() string {
  7872. return awsutil.Prettify(s)
  7873. }
  7874. // GoString returns the string representation
  7875. func (s DeleteBucketInventoryConfigurationInput) GoString() string {
  7876. return s.String()
  7877. }
  7878. // Validate inspects the fields of the type to determine if they are valid.
  7879. func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
  7880. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
  7881. if s.Bucket == nil {
  7882. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7883. }
  7884. if s.Id == nil {
  7885. invalidParams.Add(request.NewErrParamRequired("Id"))
  7886. }
  7887. if invalidParams.Len() > 0 {
  7888. return invalidParams
  7889. }
  7890. return nil
  7891. }
  7892. // SetBucket sets the Bucket field's value.
  7893. func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
  7894. s.Bucket = &v
  7895. return s
  7896. }
  7897. func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
  7898. if s.Bucket == nil {
  7899. return v
  7900. }
  7901. return *s.Bucket
  7902. }
  7903. // SetId sets the Id field's value.
  7904. func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
  7905. s.Id = &v
  7906. return s
  7907. }
  7908. type DeleteBucketInventoryConfigurationOutput struct {
  7909. _ struct{} `type:"structure"`
  7910. }
  7911. // String returns the string representation
  7912. func (s DeleteBucketInventoryConfigurationOutput) String() string {
  7913. return awsutil.Prettify(s)
  7914. }
  7915. // GoString returns the string representation
  7916. func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
  7917. return s.String()
  7918. }
  7919. type DeleteBucketLifecycleInput struct {
  7920. _ struct{} `type:"structure"`
  7921. // Bucket is a required field
  7922. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7923. }
  7924. // String returns the string representation
  7925. func (s DeleteBucketLifecycleInput) String() string {
  7926. return awsutil.Prettify(s)
  7927. }
  7928. // GoString returns the string representation
  7929. func (s DeleteBucketLifecycleInput) GoString() string {
  7930. return s.String()
  7931. }
  7932. // Validate inspects the fields of the type to determine if they are valid.
  7933. func (s *DeleteBucketLifecycleInput) Validate() error {
  7934. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
  7935. if s.Bucket == nil {
  7936. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7937. }
  7938. if invalidParams.Len() > 0 {
  7939. return invalidParams
  7940. }
  7941. return nil
  7942. }
  7943. // SetBucket sets the Bucket field's value.
  7944. func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
  7945. s.Bucket = &v
  7946. return s
  7947. }
  7948. func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
  7949. if s.Bucket == nil {
  7950. return v
  7951. }
  7952. return *s.Bucket
  7953. }
  7954. type DeleteBucketLifecycleOutput struct {
  7955. _ struct{} `type:"structure"`
  7956. }
  7957. // String returns the string representation
  7958. func (s DeleteBucketLifecycleOutput) String() string {
  7959. return awsutil.Prettify(s)
  7960. }
  7961. // GoString returns the string representation
  7962. func (s DeleteBucketLifecycleOutput) GoString() string {
  7963. return s.String()
  7964. }
  7965. type DeleteBucketMetricsConfigurationInput struct {
  7966. _ struct{} `type:"structure"`
  7967. // The name of the bucket containing the metrics configuration to delete.
  7968. //
  7969. // Bucket is a required field
  7970. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  7971. // The ID used to identify the metrics configuration.
  7972. //
  7973. // Id is a required field
  7974. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  7975. }
  7976. // String returns the string representation
  7977. func (s DeleteBucketMetricsConfigurationInput) String() string {
  7978. return awsutil.Prettify(s)
  7979. }
  7980. // GoString returns the string representation
  7981. func (s DeleteBucketMetricsConfigurationInput) GoString() string {
  7982. return s.String()
  7983. }
  7984. // Validate inspects the fields of the type to determine if they are valid.
  7985. func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
  7986. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
  7987. if s.Bucket == nil {
  7988. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  7989. }
  7990. if s.Id == nil {
  7991. invalidParams.Add(request.NewErrParamRequired("Id"))
  7992. }
  7993. if invalidParams.Len() > 0 {
  7994. return invalidParams
  7995. }
  7996. return nil
  7997. }
  7998. // SetBucket sets the Bucket field's value.
  7999. func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
  8000. s.Bucket = &v
  8001. return s
  8002. }
  8003. func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
  8004. if s.Bucket == nil {
  8005. return v
  8006. }
  8007. return *s.Bucket
  8008. }
  8009. // SetId sets the Id field's value.
  8010. func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
  8011. s.Id = &v
  8012. return s
  8013. }
  8014. type DeleteBucketMetricsConfigurationOutput struct {
  8015. _ struct{} `type:"structure"`
  8016. }
  8017. // String returns the string representation
  8018. func (s DeleteBucketMetricsConfigurationOutput) String() string {
  8019. return awsutil.Prettify(s)
  8020. }
  8021. // GoString returns the string representation
  8022. func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
  8023. return s.String()
  8024. }
  8025. type DeleteBucketOutput struct {
  8026. _ struct{} `type:"structure"`
  8027. }
  8028. // String returns the string representation
  8029. func (s DeleteBucketOutput) String() string {
  8030. return awsutil.Prettify(s)
  8031. }
  8032. // GoString returns the string representation
  8033. func (s DeleteBucketOutput) GoString() string {
  8034. return s.String()
  8035. }
  8036. type DeleteBucketPolicyInput struct {
  8037. _ struct{} `type:"structure"`
  8038. // Bucket is a required field
  8039. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8040. }
  8041. // String returns the string representation
  8042. func (s DeleteBucketPolicyInput) String() string {
  8043. return awsutil.Prettify(s)
  8044. }
  8045. // GoString returns the string representation
  8046. func (s DeleteBucketPolicyInput) GoString() string {
  8047. return s.String()
  8048. }
  8049. // Validate inspects the fields of the type to determine if they are valid.
  8050. func (s *DeleteBucketPolicyInput) Validate() error {
  8051. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
  8052. if s.Bucket == nil {
  8053. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8054. }
  8055. if invalidParams.Len() > 0 {
  8056. return invalidParams
  8057. }
  8058. return nil
  8059. }
  8060. // SetBucket sets the Bucket field's value.
  8061. func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
  8062. s.Bucket = &v
  8063. return s
  8064. }
  8065. func (s *DeleteBucketPolicyInput) getBucket() (v string) {
  8066. if s.Bucket == nil {
  8067. return v
  8068. }
  8069. return *s.Bucket
  8070. }
  8071. type DeleteBucketPolicyOutput struct {
  8072. _ struct{} `type:"structure"`
  8073. }
  8074. // String returns the string representation
  8075. func (s DeleteBucketPolicyOutput) String() string {
  8076. return awsutil.Prettify(s)
  8077. }
  8078. // GoString returns the string representation
  8079. func (s DeleteBucketPolicyOutput) GoString() string {
  8080. return s.String()
  8081. }
  8082. type DeleteBucketReplicationInput struct {
  8083. _ struct{} `type:"structure"`
  8084. // Bucket is a required field
  8085. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8086. }
  8087. // String returns the string representation
  8088. func (s DeleteBucketReplicationInput) String() string {
  8089. return awsutil.Prettify(s)
  8090. }
  8091. // GoString returns the string representation
  8092. func (s DeleteBucketReplicationInput) GoString() string {
  8093. return s.String()
  8094. }
  8095. // Validate inspects the fields of the type to determine if they are valid.
  8096. func (s *DeleteBucketReplicationInput) Validate() error {
  8097. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
  8098. if s.Bucket == nil {
  8099. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8100. }
  8101. if invalidParams.Len() > 0 {
  8102. return invalidParams
  8103. }
  8104. return nil
  8105. }
  8106. // SetBucket sets the Bucket field's value.
  8107. func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
  8108. s.Bucket = &v
  8109. return s
  8110. }
  8111. func (s *DeleteBucketReplicationInput) getBucket() (v string) {
  8112. if s.Bucket == nil {
  8113. return v
  8114. }
  8115. return *s.Bucket
  8116. }
  8117. type DeleteBucketReplicationOutput struct {
  8118. _ struct{} `type:"structure"`
  8119. }
  8120. // String returns the string representation
  8121. func (s DeleteBucketReplicationOutput) String() string {
  8122. return awsutil.Prettify(s)
  8123. }
  8124. // GoString returns the string representation
  8125. func (s DeleteBucketReplicationOutput) GoString() string {
  8126. return s.String()
  8127. }
  8128. type DeleteBucketTaggingInput struct {
  8129. _ struct{} `type:"structure"`
  8130. // Bucket is a required field
  8131. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8132. }
  8133. // String returns the string representation
  8134. func (s DeleteBucketTaggingInput) String() string {
  8135. return awsutil.Prettify(s)
  8136. }
  8137. // GoString returns the string representation
  8138. func (s DeleteBucketTaggingInput) GoString() string {
  8139. return s.String()
  8140. }
  8141. // Validate inspects the fields of the type to determine if they are valid.
  8142. func (s *DeleteBucketTaggingInput) Validate() error {
  8143. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
  8144. if s.Bucket == nil {
  8145. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8146. }
  8147. if invalidParams.Len() > 0 {
  8148. return invalidParams
  8149. }
  8150. return nil
  8151. }
  8152. // SetBucket sets the Bucket field's value.
  8153. func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
  8154. s.Bucket = &v
  8155. return s
  8156. }
  8157. func (s *DeleteBucketTaggingInput) getBucket() (v string) {
  8158. if s.Bucket == nil {
  8159. return v
  8160. }
  8161. return *s.Bucket
  8162. }
  8163. type DeleteBucketTaggingOutput struct {
  8164. _ struct{} `type:"structure"`
  8165. }
  8166. // String returns the string representation
  8167. func (s DeleteBucketTaggingOutput) String() string {
  8168. return awsutil.Prettify(s)
  8169. }
  8170. // GoString returns the string representation
  8171. func (s DeleteBucketTaggingOutput) GoString() string {
  8172. return s.String()
  8173. }
  8174. type DeleteBucketWebsiteInput struct {
  8175. _ struct{} `type:"structure"`
  8176. // Bucket is a required field
  8177. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8178. }
  8179. // String returns the string representation
  8180. func (s DeleteBucketWebsiteInput) String() string {
  8181. return awsutil.Prettify(s)
  8182. }
  8183. // GoString returns the string representation
  8184. func (s DeleteBucketWebsiteInput) GoString() string {
  8185. return s.String()
  8186. }
  8187. // Validate inspects the fields of the type to determine if they are valid.
  8188. func (s *DeleteBucketWebsiteInput) Validate() error {
  8189. invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
  8190. if s.Bucket == nil {
  8191. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8192. }
  8193. if invalidParams.Len() > 0 {
  8194. return invalidParams
  8195. }
  8196. return nil
  8197. }
  8198. // SetBucket sets the Bucket field's value.
  8199. func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
  8200. s.Bucket = &v
  8201. return s
  8202. }
  8203. func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
  8204. if s.Bucket == nil {
  8205. return v
  8206. }
  8207. return *s.Bucket
  8208. }
  8209. type DeleteBucketWebsiteOutput struct {
  8210. _ struct{} `type:"structure"`
  8211. }
  8212. // String returns the string representation
  8213. func (s DeleteBucketWebsiteOutput) String() string {
  8214. return awsutil.Prettify(s)
  8215. }
  8216. // GoString returns the string representation
  8217. func (s DeleteBucketWebsiteOutput) GoString() string {
  8218. return s.String()
  8219. }
  8220. type DeleteMarkerEntry struct {
  8221. _ struct{} `type:"structure"`
  8222. // Specifies whether the object is (true) or is not (false) the latest version
  8223. // of an object.
  8224. IsLatest *bool `type:"boolean"`
  8225. // The object key.
  8226. Key *string `min:"1" type:"string"`
  8227. // Date and time the object was last modified.
  8228. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  8229. Owner *Owner `type:"structure"`
  8230. // Version ID of an object.
  8231. VersionId *string `type:"string"`
  8232. }
  8233. // String returns the string representation
  8234. func (s DeleteMarkerEntry) String() string {
  8235. return awsutil.Prettify(s)
  8236. }
  8237. // GoString returns the string representation
  8238. func (s DeleteMarkerEntry) GoString() string {
  8239. return s.String()
  8240. }
  8241. // SetIsLatest sets the IsLatest field's value.
  8242. func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
  8243. s.IsLatest = &v
  8244. return s
  8245. }
  8246. // SetKey sets the Key field's value.
  8247. func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
  8248. s.Key = &v
  8249. return s
  8250. }
  8251. // SetLastModified sets the LastModified field's value.
  8252. func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
  8253. s.LastModified = &v
  8254. return s
  8255. }
  8256. // SetOwner sets the Owner field's value.
  8257. func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
  8258. s.Owner = v
  8259. return s
  8260. }
  8261. // SetVersionId sets the VersionId field's value.
  8262. func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
  8263. s.VersionId = &v
  8264. return s
  8265. }
  8266. type DeleteObjectInput struct {
  8267. _ struct{} `type:"structure"`
  8268. // Bucket is a required field
  8269. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8270. // Key is a required field
  8271. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8272. // The concatenation of the authentication device's serial number, a space,
  8273. // and the value that is displayed on your authentication device.
  8274. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8275. // Confirms that the requester knows that she or he will be charged for the
  8276. // request. Bucket owners need not specify this parameter in their requests.
  8277. // Documentation on downloading objects from requester pays buckets can be found
  8278. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8279. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8280. // VersionId used to reference a specific version of the object.
  8281. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8282. }
  8283. // String returns the string representation
  8284. func (s DeleteObjectInput) String() string {
  8285. return awsutil.Prettify(s)
  8286. }
  8287. // GoString returns the string representation
  8288. func (s DeleteObjectInput) GoString() string {
  8289. return s.String()
  8290. }
  8291. // Validate inspects the fields of the type to determine if they are valid.
  8292. func (s *DeleteObjectInput) Validate() error {
  8293. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
  8294. if s.Bucket == nil {
  8295. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8296. }
  8297. if s.Key == nil {
  8298. invalidParams.Add(request.NewErrParamRequired("Key"))
  8299. }
  8300. if s.Key != nil && len(*s.Key) < 1 {
  8301. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8302. }
  8303. if invalidParams.Len() > 0 {
  8304. return invalidParams
  8305. }
  8306. return nil
  8307. }
  8308. // SetBucket sets the Bucket field's value.
  8309. func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
  8310. s.Bucket = &v
  8311. return s
  8312. }
  8313. func (s *DeleteObjectInput) getBucket() (v string) {
  8314. if s.Bucket == nil {
  8315. return v
  8316. }
  8317. return *s.Bucket
  8318. }
  8319. // SetKey sets the Key field's value.
  8320. func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
  8321. s.Key = &v
  8322. return s
  8323. }
  8324. // SetMFA sets the MFA field's value.
  8325. func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
  8326. s.MFA = &v
  8327. return s
  8328. }
  8329. // SetRequestPayer sets the RequestPayer field's value.
  8330. func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
  8331. s.RequestPayer = &v
  8332. return s
  8333. }
  8334. // SetVersionId sets the VersionId field's value.
  8335. func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
  8336. s.VersionId = &v
  8337. return s
  8338. }
  8339. type DeleteObjectOutput struct {
  8340. _ struct{} `type:"structure"`
  8341. // Specifies whether the versioned object that was permanently deleted was (true)
  8342. // or was not (false) a delete marker.
  8343. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  8344. // If present, indicates that the requester was successfully charged for the
  8345. // request.
  8346. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8347. // Returns the version ID of the delete marker created as a result of the DELETE
  8348. // operation.
  8349. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8350. }
  8351. // String returns the string representation
  8352. func (s DeleteObjectOutput) String() string {
  8353. return awsutil.Prettify(s)
  8354. }
  8355. // GoString returns the string representation
  8356. func (s DeleteObjectOutput) GoString() string {
  8357. return s.String()
  8358. }
  8359. // SetDeleteMarker sets the DeleteMarker field's value.
  8360. func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
  8361. s.DeleteMarker = &v
  8362. return s
  8363. }
  8364. // SetRequestCharged sets the RequestCharged field's value.
  8365. func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
  8366. s.RequestCharged = &v
  8367. return s
  8368. }
  8369. // SetVersionId sets the VersionId field's value.
  8370. func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
  8371. s.VersionId = &v
  8372. return s
  8373. }
  8374. type DeleteObjectTaggingInput struct {
  8375. _ struct{} `type:"structure"`
  8376. // Bucket is a required field
  8377. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8378. // Key is a required field
  8379. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  8380. // The versionId of the object that the tag-set will be removed from.
  8381. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  8382. }
  8383. // String returns the string representation
  8384. func (s DeleteObjectTaggingInput) String() string {
  8385. return awsutil.Prettify(s)
  8386. }
  8387. // GoString returns the string representation
  8388. func (s DeleteObjectTaggingInput) GoString() string {
  8389. return s.String()
  8390. }
  8391. // Validate inspects the fields of the type to determine if they are valid.
  8392. func (s *DeleteObjectTaggingInput) Validate() error {
  8393. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
  8394. if s.Bucket == nil {
  8395. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8396. }
  8397. if s.Key == nil {
  8398. invalidParams.Add(request.NewErrParamRequired("Key"))
  8399. }
  8400. if s.Key != nil && len(*s.Key) < 1 {
  8401. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8402. }
  8403. if invalidParams.Len() > 0 {
  8404. return invalidParams
  8405. }
  8406. return nil
  8407. }
  8408. // SetBucket sets the Bucket field's value.
  8409. func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
  8410. s.Bucket = &v
  8411. return s
  8412. }
  8413. func (s *DeleteObjectTaggingInput) getBucket() (v string) {
  8414. if s.Bucket == nil {
  8415. return v
  8416. }
  8417. return *s.Bucket
  8418. }
  8419. // SetKey sets the Key field's value.
  8420. func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
  8421. s.Key = &v
  8422. return s
  8423. }
  8424. // SetVersionId sets the VersionId field's value.
  8425. func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
  8426. s.VersionId = &v
  8427. return s
  8428. }
  8429. type DeleteObjectTaggingOutput struct {
  8430. _ struct{} `type:"structure"`
  8431. // The versionId of the object the tag-set was removed from.
  8432. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  8433. }
  8434. // String returns the string representation
  8435. func (s DeleteObjectTaggingOutput) String() string {
  8436. return awsutil.Prettify(s)
  8437. }
  8438. // GoString returns the string representation
  8439. func (s DeleteObjectTaggingOutput) GoString() string {
  8440. return s.String()
  8441. }
  8442. // SetVersionId sets the VersionId field's value.
  8443. func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
  8444. s.VersionId = &v
  8445. return s
  8446. }
  8447. type DeleteObjectsInput struct {
  8448. _ struct{} `type:"structure" payload:"Delete"`
  8449. // Bucket is a required field
  8450. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8451. // Delete is a required field
  8452. Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  8453. // The concatenation of the authentication device's serial number, a space,
  8454. // and the value that is displayed on your authentication device.
  8455. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  8456. // Confirms that the requester knows that she or he will be charged for the
  8457. // request. Bucket owners need not specify this parameter in their requests.
  8458. // Documentation on downloading objects from requester pays buckets can be found
  8459. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  8460. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  8461. }
  8462. // String returns the string representation
  8463. func (s DeleteObjectsInput) String() string {
  8464. return awsutil.Prettify(s)
  8465. }
  8466. // GoString returns the string representation
  8467. func (s DeleteObjectsInput) GoString() string {
  8468. return s.String()
  8469. }
  8470. // Validate inspects the fields of the type to determine if they are valid.
  8471. func (s *DeleteObjectsInput) Validate() error {
  8472. invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
  8473. if s.Bucket == nil {
  8474. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8475. }
  8476. if s.Delete == nil {
  8477. invalidParams.Add(request.NewErrParamRequired("Delete"))
  8478. }
  8479. if s.Delete != nil {
  8480. if err := s.Delete.Validate(); err != nil {
  8481. invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
  8482. }
  8483. }
  8484. if invalidParams.Len() > 0 {
  8485. return invalidParams
  8486. }
  8487. return nil
  8488. }
  8489. // SetBucket sets the Bucket field's value.
  8490. func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
  8491. s.Bucket = &v
  8492. return s
  8493. }
  8494. func (s *DeleteObjectsInput) getBucket() (v string) {
  8495. if s.Bucket == nil {
  8496. return v
  8497. }
  8498. return *s.Bucket
  8499. }
  8500. // SetDelete sets the Delete field's value.
  8501. func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
  8502. s.Delete = v
  8503. return s
  8504. }
  8505. // SetMFA sets the MFA field's value.
  8506. func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
  8507. s.MFA = &v
  8508. return s
  8509. }
  8510. // SetRequestPayer sets the RequestPayer field's value.
  8511. func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
  8512. s.RequestPayer = &v
  8513. return s
  8514. }
  8515. type DeleteObjectsOutput struct {
  8516. _ struct{} `type:"structure"`
  8517. Deleted []*DeletedObject `type:"list" flattened:"true"`
  8518. Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
  8519. // If present, indicates that the requester was successfully charged for the
  8520. // request.
  8521. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  8522. }
  8523. // String returns the string representation
  8524. func (s DeleteObjectsOutput) String() string {
  8525. return awsutil.Prettify(s)
  8526. }
  8527. // GoString returns the string representation
  8528. func (s DeleteObjectsOutput) GoString() string {
  8529. return s.String()
  8530. }
  8531. // SetDeleted sets the Deleted field's value.
  8532. func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
  8533. s.Deleted = v
  8534. return s
  8535. }
  8536. // SetErrors sets the Errors field's value.
  8537. func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
  8538. s.Errors = v
  8539. return s
  8540. }
  8541. // SetRequestCharged sets the RequestCharged field's value.
  8542. func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
  8543. s.RequestCharged = &v
  8544. return s
  8545. }
  8546. type DeletedObject struct {
  8547. _ struct{} `type:"structure"`
  8548. DeleteMarker *bool `type:"boolean"`
  8549. DeleteMarkerVersionId *string `type:"string"`
  8550. Key *string `min:"1" type:"string"`
  8551. VersionId *string `type:"string"`
  8552. }
  8553. // String returns the string representation
  8554. func (s DeletedObject) String() string {
  8555. return awsutil.Prettify(s)
  8556. }
  8557. // GoString returns the string representation
  8558. func (s DeletedObject) GoString() string {
  8559. return s.String()
  8560. }
  8561. // SetDeleteMarker sets the DeleteMarker field's value.
  8562. func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
  8563. s.DeleteMarker = &v
  8564. return s
  8565. }
  8566. // SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
  8567. func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
  8568. s.DeleteMarkerVersionId = &v
  8569. return s
  8570. }
  8571. // SetKey sets the Key field's value.
  8572. func (s *DeletedObject) SetKey(v string) *DeletedObject {
  8573. s.Key = &v
  8574. return s
  8575. }
  8576. // SetVersionId sets the VersionId field's value.
  8577. func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
  8578. s.VersionId = &v
  8579. return s
  8580. }
  8581. // Container for replication destination information.
  8582. type Destination struct {
  8583. _ struct{} `type:"structure"`
  8584. // Container for information regarding the access control for replicas.
  8585. AccessControlTranslation *AccessControlTranslation `type:"structure"`
  8586. // Account ID of the destination bucket. Currently this is only being verified
  8587. // if Access Control Translation is enabled
  8588. Account *string `type:"string"`
  8589. // Amazon resource name (ARN) of the bucket where you want Amazon S3 to store
  8590. // replicas of the object identified by the rule.
  8591. //
  8592. // Bucket is a required field
  8593. Bucket *string `type:"string" required:"true"`
  8594. // Container for information regarding encryption based configuration for replicas.
  8595. EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
  8596. // The class of storage used to store the object.
  8597. StorageClass *string `type:"string" enum:"StorageClass"`
  8598. }
  8599. // String returns the string representation
  8600. func (s Destination) String() string {
  8601. return awsutil.Prettify(s)
  8602. }
  8603. // GoString returns the string representation
  8604. func (s Destination) GoString() string {
  8605. return s.String()
  8606. }
  8607. // Validate inspects the fields of the type to determine if they are valid.
  8608. func (s *Destination) Validate() error {
  8609. invalidParams := request.ErrInvalidParams{Context: "Destination"}
  8610. if s.Bucket == nil {
  8611. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8612. }
  8613. if s.AccessControlTranslation != nil {
  8614. if err := s.AccessControlTranslation.Validate(); err != nil {
  8615. invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
  8616. }
  8617. }
  8618. if invalidParams.Len() > 0 {
  8619. return invalidParams
  8620. }
  8621. return nil
  8622. }
  8623. // SetAccessControlTranslation sets the AccessControlTranslation field's value.
  8624. func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
  8625. s.AccessControlTranslation = v
  8626. return s
  8627. }
  8628. // SetAccount sets the Account field's value.
  8629. func (s *Destination) SetAccount(v string) *Destination {
  8630. s.Account = &v
  8631. return s
  8632. }
  8633. // SetBucket sets the Bucket field's value.
  8634. func (s *Destination) SetBucket(v string) *Destination {
  8635. s.Bucket = &v
  8636. return s
  8637. }
  8638. func (s *Destination) getBucket() (v string) {
  8639. if s.Bucket == nil {
  8640. return v
  8641. }
  8642. return *s.Bucket
  8643. }
  8644. // SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
  8645. func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
  8646. s.EncryptionConfiguration = v
  8647. return s
  8648. }
  8649. // SetStorageClass sets the StorageClass field's value.
  8650. func (s *Destination) SetStorageClass(v string) *Destination {
  8651. s.StorageClass = &v
  8652. return s
  8653. }
  8654. // Describes the server-side encryption that will be applied to the restore
  8655. // results.
  8656. type Encryption struct {
  8657. _ struct{} `type:"structure"`
  8658. // The server-side encryption algorithm used when storing job results in Amazon
  8659. // S3 (e.g., AES256, aws:kms).
  8660. //
  8661. // EncryptionType is a required field
  8662. EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  8663. // If the encryption type is aws:kms, this optional value can be used to specify
  8664. // the encryption context for the restore results.
  8665. KMSContext *string `type:"string"`
  8666. // If the encryption type is aws:kms, this optional value specifies the AWS
  8667. // KMS key ID to use for encryption of job results.
  8668. KMSKeyId *string `type:"string"`
  8669. }
  8670. // String returns the string representation
  8671. func (s Encryption) String() string {
  8672. return awsutil.Prettify(s)
  8673. }
  8674. // GoString returns the string representation
  8675. func (s Encryption) GoString() string {
  8676. return s.String()
  8677. }
  8678. // Validate inspects the fields of the type to determine if they are valid.
  8679. func (s *Encryption) Validate() error {
  8680. invalidParams := request.ErrInvalidParams{Context: "Encryption"}
  8681. if s.EncryptionType == nil {
  8682. invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
  8683. }
  8684. if invalidParams.Len() > 0 {
  8685. return invalidParams
  8686. }
  8687. return nil
  8688. }
  8689. // SetEncryptionType sets the EncryptionType field's value.
  8690. func (s *Encryption) SetEncryptionType(v string) *Encryption {
  8691. s.EncryptionType = &v
  8692. return s
  8693. }
  8694. // SetKMSContext sets the KMSContext field's value.
  8695. func (s *Encryption) SetKMSContext(v string) *Encryption {
  8696. s.KMSContext = &v
  8697. return s
  8698. }
  8699. // SetKMSKeyId sets the KMSKeyId field's value.
  8700. func (s *Encryption) SetKMSKeyId(v string) *Encryption {
  8701. s.KMSKeyId = &v
  8702. return s
  8703. }
  8704. // Container for information regarding encryption based configuration for replicas.
  8705. type EncryptionConfiguration struct {
  8706. _ struct{} `type:"structure"`
  8707. // The id of the KMS key used to encrypt the replica object.
  8708. ReplicaKmsKeyID *string `type:"string"`
  8709. }
  8710. // String returns the string representation
  8711. func (s EncryptionConfiguration) String() string {
  8712. return awsutil.Prettify(s)
  8713. }
  8714. // GoString returns the string representation
  8715. func (s EncryptionConfiguration) GoString() string {
  8716. return s.String()
  8717. }
  8718. // SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
  8719. func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
  8720. s.ReplicaKmsKeyID = &v
  8721. return s
  8722. }
  8723. type Error struct {
  8724. _ struct{} `type:"structure"`
  8725. Code *string `type:"string"`
  8726. Key *string `min:"1" type:"string"`
  8727. Message *string `type:"string"`
  8728. VersionId *string `type:"string"`
  8729. }
  8730. // String returns the string representation
  8731. func (s Error) String() string {
  8732. return awsutil.Prettify(s)
  8733. }
  8734. // GoString returns the string representation
  8735. func (s Error) GoString() string {
  8736. return s.String()
  8737. }
  8738. // SetCode sets the Code field's value.
  8739. func (s *Error) SetCode(v string) *Error {
  8740. s.Code = &v
  8741. return s
  8742. }
  8743. // SetKey sets the Key field's value.
  8744. func (s *Error) SetKey(v string) *Error {
  8745. s.Key = &v
  8746. return s
  8747. }
  8748. // SetMessage sets the Message field's value.
  8749. func (s *Error) SetMessage(v string) *Error {
  8750. s.Message = &v
  8751. return s
  8752. }
  8753. // SetVersionId sets the VersionId field's value.
  8754. func (s *Error) SetVersionId(v string) *Error {
  8755. s.VersionId = &v
  8756. return s
  8757. }
  8758. type ErrorDocument struct {
  8759. _ struct{} `type:"structure"`
  8760. // The object key name to use when a 4XX class error occurs.
  8761. //
  8762. // Key is a required field
  8763. Key *string `min:"1" type:"string" required:"true"`
  8764. }
  8765. // String returns the string representation
  8766. func (s ErrorDocument) String() string {
  8767. return awsutil.Prettify(s)
  8768. }
  8769. // GoString returns the string representation
  8770. func (s ErrorDocument) GoString() string {
  8771. return s.String()
  8772. }
  8773. // Validate inspects the fields of the type to determine if they are valid.
  8774. func (s *ErrorDocument) Validate() error {
  8775. invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
  8776. if s.Key == nil {
  8777. invalidParams.Add(request.NewErrParamRequired("Key"))
  8778. }
  8779. if s.Key != nil && len(*s.Key) < 1 {
  8780. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  8781. }
  8782. if invalidParams.Len() > 0 {
  8783. return invalidParams
  8784. }
  8785. return nil
  8786. }
  8787. // SetKey sets the Key field's value.
  8788. func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
  8789. s.Key = &v
  8790. return s
  8791. }
  8792. // Container for key value pair that defines the criteria for the filter rule.
  8793. type FilterRule struct {
  8794. _ struct{} `type:"structure"`
  8795. // Object key name prefix or suffix identifying one or more objects to which
  8796. // the filtering rule applies. Maximum prefix length can be up to 1,024 characters.
  8797. // Overlapping prefixes and suffixes are not supported. For more information,
  8798. // go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  8799. Name *string `type:"string" enum:"FilterRuleName"`
  8800. Value *string `type:"string"`
  8801. }
  8802. // String returns the string representation
  8803. func (s FilterRule) String() string {
  8804. return awsutil.Prettify(s)
  8805. }
  8806. // GoString returns the string representation
  8807. func (s FilterRule) GoString() string {
  8808. return s.String()
  8809. }
  8810. // SetName sets the Name field's value.
  8811. func (s *FilterRule) SetName(v string) *FilterRule {
  8812. s.Name = &v
  8813. return s
  8814. }
  8815. // SetValue sets the Value field's value.
  8816. func (s *FilterRule) SetValue(v string) *FilterRule {
  8817. s.Value = &v
  8818. return s
  8819. }
  8820. type GetBucketAccelerateConfigurationInput struct {
  8821. _ struct{} `type:"structure"`
  8822. // Name of the bucket for which the accelerate configuration is retrieved.
  8823. //
  8824. // Bucket is a required field
  8825. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8826. }
  8827. // String returns the string representation
  8828. func (s GetBucketAccelerateConfigurationInput) String() string {
  8829. return awsutil.Prettify(s)
  8830. }
  8831. // GoString returns the string representation
  8832. func (s GetBucketAccelerateConfigurationInput) GoString() string {
  8833. return s.String()
  8834. }
  8835. // Validate inspects the fields of the type to determine if they are valid.
  8836. func (s *GetBucketAccelerateConfigurationInput) Validate() error {
  8837. invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
  8838. if s.Bucket == nil {
  8839. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8840. }
  8841. if invalidParams.Len() > 0 {
  8842. return invalidParams
  8843. }
  8844. return nil
  8845. }
  8846. // SetBucket sets the Bucket field's value.
  8847. func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
  8848. s.Bucket = &v
  8849. return s
  8850. }
  8851. func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
  8852. if s.Bucket == nil {
  8853. return v
  8854. }
  8855. return *s.Bucket
  8856. }
  8857. type GetBucketAccelerateConfigurationOutput struct {
  8858. _ struct{} `type:"structure"`
  8859. // The accelerate configuration of the bucket.
  8860. Status *string `type:"string" enum:"BucketAccelerateStatus"`
  8861. }
  8862. // String returns the string representation
  8863. func (s GetBucketAccelerateConfigurationOutput) String() string {
  8864. return awsutil.Prettify(s)
  8865. }
  8866. // GoString returns the string representation
  8867. func (s GetBucketAccelerateConfigurationOutput) GoString() string {
  8868. return s.String()
  8869. }
  8870. // SetStatus sets the Status field's value.
  8871. func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
  8872. s.Status = &v
  8873. return s
  8874. }
  8875. type GetBucketAclInput struct {
  8876. _ struct{} `type:"structure"`
  8877. // Bucket is a required field
  8878. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8879. }
  8880. // String returns the string representation
  8881. func (s GetBucketAclInput) String() string {
  8882. return awsutil.Prettify(s)
  8883. }
  8884. // GoString returns the string representation
  8885. func (s GetBucketAclInput) GoString() string {
  8886. return s.String()
  8887. }
  8888. // Validate inspects the fields of the type to determine if they are valid.
  8889. func (s *GetBucketAclInput) Validate() error {
  8890. invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
  8891. if s.Bucket == nil {
  8892. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8893. }
  8894. if invalidParams.Len() > 0 {
  8895. return invalidParams
  8896. }
  8897. return nil
  8898. }
  8899. // SetBucket sets the Bucket field's value.
  8900. func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
  8901. s.Bucket = &v
  8902. return s
  8903. }
  8904. func (s *GetBucketAclInput) getBucket() (v string) {
  8905. if s.Bucket == nil {
  8906. return v
  8907. }
  8908. return *s.Bucket
  8909. }
  8910. type GetBucketAclOutput struct {
  8911. _ struct{} `type:"structure"`
  8912. // A list of grants.
  8913. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  8914. Owner *Owner `type:"structure"`
  8915. }
  8916. // String returns the string representation
  8917. func (s GetBucketAclOutput) String() string {
  8918. return awsutil.Prettify(s)
  8919. }
  8920. // GoString returns the string representation
  8921. func (s GetBucketAclOutput) GoString() string {
  8922. return s.String()
  8923. }
  8924. // SetGrants sets the Grants field's value.
  8925. func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
  8926. s.Grants = v
  8927. return s
  8928. }
  8929. // SetOwner sets the Owner field's value.
  8930. func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
  8931. s.Owner = v
  8932. return s
  8933. }
  8934. type GetBucketAnalyticsConfigurationInput struct {
  8935. _ struct{} `type:"structure"`
  8936. // The name of the bucket from which an analytics configuration is retrieved.
  8937. //
  8938. // Bucket is a required field
  8939. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  8940. // The identifier used to represent an analytics configuration.
  8941. //
  8942. // Id is a required field
  8943. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  8944. }
  8945. // String returns the string representation
  8946. func (s GetBucketAnalyticsConfigurationInput) String() string {
  8947. return awsutil.Prettify(s)
  8948. }
  8949. // GoString returns the string representation
  8950. func (s GetBucketAnalyticsConfigurationInput) GoString() string {
  8951. return s.String()
  8952. }
  8953. // Validate inspects the fields of the type to determine if they are valid.
  8954. func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
  8955. invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
  8956. if s.Bucket == nil {
  8957. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  8958. }
  8959. if s.Id == nil {
  8960. invalidParams.Add(request.NewErrParamRequired("Id"))
  8961. }
  8962. if invalidParams.Len() > 0 {
  8963. return invalidParams
  8964. }
  8965. return nil
  8966. }
  8967. // SetBucket sets the Bucket field's value.
  8968. func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
  8969. s.Bucket = &v
  8970. return s
  8971. }
  8972. func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
  8973. if s.Bucket == nil {
  8974. return v
  8975. }
  8976. return *s.Bucket
  8977. }
  8978. // SetId sets the Id field's value.
  8979. func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
  8980. s.Id = &v
  8981. return s
  8982. }
  8983. type GetBucketAnalyticsConfigurationOutput struct {
  8984. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  8985. // The configuration and any analyses for the analytics filter.
  8986. AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
  8987. }
  8988. // String returns the string representation
  8989. func (s GetBucketAnalyticsConfigurationOutput) String() string {
  8990. return awsutil.Prettify(s)
  8991. }
  8992. // GoString returns the string representation
  8993. func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
  8994. return s.String()
  8995. }
  8996. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  8997. func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
  8998. s.AnalyticsConfiguration = v
  8999. return s
  9000. }
  9001. type GetBucketCorsInput struct {
  9002. _ struct{} `type:"structure"`
  9003. // Bucket is a required field
  9004. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9005. }
  9006. // String returns the string representation
  9007. func (s GetBucketCorsInput) String() string {
  9008. return awsutil.Prettify(s)
  9009. }
  9010. // GoString returns the string representation
  9011. func (s GetBucketCorsInput) GoString() string {
  9012. return s.String()
  9013. }
  9014. // Validate inspects the fields of the type to determine if they are valid.
  9015. func (s *GetBucketCorsInput) Validate() error {
  9016. invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
  9017. if s.Bucket == nil {
  9018. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9019. }
  9020. if invalidParams.Len() > 0 {
  9021. return invalidParams
  9022. }
  9023. return nil
  9024. }
  9025. // SetBucket sets the Bucket field's value.
  9026. func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
  9027. s.Bucket = &v
  9028. return s
  9029. }
  9030. func (s *GetBucketCorsInput) getBucket() (v string) {
  9031. if s.Bucket == nil {
  9032. return v
  9033. }
  9034. return *s.Bucket
  9035. }
  9036. type GetBucketCorsOutput struct {
  9037. _ struct{} `type:"structure"`
  9038. CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
  9039. }
  9040. // String returns the string representation
  9041. func (s GetBucketCorsOutput) String() string {
  9042. return awsutil.Prettify(s)
  9043. }
  9044. // GoString returns the string representation
  9045. func (s GetBucketCorsOutput) GoString() string {
  9046. return s.String()
  9047. }
  9048. // SetCORSRules sets the CORSRules field's value.
  9049. func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
  9050. s.CORSRules = v
  9051. return s
  9052. }
  9053. type GetBucketEncryptionInput struct {
  9054. _ struct{} `type:"structure"`
  9055. // The name of the bucket from which the server-side encryption configuration
  9056. // is retrieved.
  9057. //
  9058. // Bucket is a required field
  9059. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9060. }
  9061. // String returns the string representation
  9062. func (s GetBucketEncryptionInput) String() string {
  9063. return awsutil.Prettify(s)
  9064. }
  9065. // GoString returns the string representation
  9066. func (s GetBucketEncryptionInput) GoString() string {
  9067. return s.String()
  9068. }
  9069. // Validate inspects the fields of the type to determine if they are valid.
  9070. func (s *GetBucketEncryptionInput) Validate() error {
  9071. invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
  9072. if s.Bucket == nil {
  9073. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9074. }
  9075. if invalidParams.Len() > 0 {
  9076. return invalidParams
  9077. }
  9078. return nil
  9079. }
  9080. // SetBucket sets the Bucket field's value.
  9081. func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
  9082. s.Bucket = &v
  9083. return s
  9084. }
  9085. func (s *GetBucketEncryptionInput) getBucket() (v string) {
  9086. if s.Bucket == nil {
  9087. return v
  9088. }
  9089. return *s.Bucket
  9090. }
  9091. type GetBucketEncryptionOutput struct {
  9092. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  9093. // Container for server-side encryption configuration rules. Currently S3 supports
  9094. // one rule only.
  9095. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
  9096. }
  9097. // String returns the string representation
  9098. func (s GetBucketEncryptionOutput) String() string {
  9099. return awsutil.Prettify(s)
  9100. }
  9101. // GoString returns the string representation
  9102. func (s GetBucketEncryptionOutput) GoString() string {
  9103. return s.String()
  9104. }
  9105. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  9106. func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
  9107. s.ServerSideEncryptionConfiguration = v
  9108. return s
  9109. }
  9110. type GetBucketInventoryConfigurationInput struct {
  9111. _ struct{} `type:"structure"`
  9112. // The name of the bucket containing the inventory configuration to retrieve.
  9113. //
  9114. // Bucket is a required field
  9115. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9116. // The ID used to identify the inventory configuration.
  9117. //
  9118. // Id is a required field
  9119. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9120. }
  9121. // String returns the string representation
  9122. func (s GetBucketInventoryConfigurationInput) String() string {
  9123. return awsutil.Prettify(s)
  9124. }
  9125. // GoString returns the string representation
  9126. func (s GetBucketInventoryConfigurationInput) GoString() string {
  9127. return s.String()
  9128. }
  9129. // Validate inspects the fields of the type to determine if they are valid.
  9130. func (s *GetBucketInventoryConfigurationInput) Validate() error {
  9131. invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
  9132. if s.Bucket == nil {
  9133. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9134. }
  9135. if s.Id == nil {
  9136. invalidParams.Add(request.NewErrParamRequired("Id"))
  9137. }
  9138. if invalidParams.Len() > 0 {
  9139. return invalidParams
  9140. }
  9141. return nil
  9142. }
  9143. // SetBucket sets the Bucket field's value.
  9144. func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
  9145. s.Bucket = &v
  9146. return s
  9147. }
  9148. func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
  9149. if s.Bucket == nil {
  9150. return v
  9151. }
  9152. return *s.Bucket
  9153. }
  9154. // SetId sets the Id field's value.
  9155. func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
  9156. s.Id = &v
  9157. return s
  9158. }
  9159. type GetBucketInventoryConfigurationOutput struct {
  9160. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  9161. // Specifies the inventory configuration.
  9162. InventoryConfiguration *InventoryConfiguration `type:"structure"`
  9163. }
  9164. // String returns the string representation
  9165. func (s GetBucketInventoryConfigurationOutput) String() string {
  9166. return awsutil.Prettify(s)
  9167. }
  9168. // GoString returns the string representation
  9169. func (s GetBucketInventoryConfigurationOutput) GoString() string {
  9170. return s.String()
  9171. }
  9172. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  9173. func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
  9174. s.InventoryConfiguration = v
  9175. return s
  9176. }
  9177. type GetBucketLifecycleConfigurationInput struct {
  9178. _ struct{} `type:"structure"`
  9179. // Bucket is a required field
  9180. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9181. }
  9182. // String returns the string representation
  9183. func (s GetBucketLifecycleConfigurationInput) String() string {
  9184. return awsutil.Prettify(s)
  9185. }
  9186. // GoString returns the string representation
  9187. func (s GetBucketLifecycleConfigurationInput) GoString() string {
  9188. return s.String()
  9189. }
  9190. // Validate inspects the fields of the type to determine if they are valid.
  9191. func (s *GetBucketLifecycleConfigurationInput) Validate() error {
  9192. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
  9193. if s.Bucket == nil {
  9194. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9195. }
  9196. if invalidParams.Len() > 0 {
  9197. return invalidParams
  9198. }
  9199. return nil
  9200. }
  9201. // SetBucket sets the Bucket field's value.
  9202. func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
  9203. s.Bucket = &v
  9204. return s
  9205. }
  9206. func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
  9207. if s.Bucket == nil {
  9208. return v
  9209. }
  9210. return *s.Bucket
  9211. }
  9212. type GetBucketLifecycleConfigurationOutput struct {
  9213. _ struct{} `type:"structure"`
  9214. Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
  9215. }
  9216. // String returns the string representation
  9217. func (s GetBucketLifecycleConfigurationOutput) String() string {
  9218. return awsutil.Prettify(s)
  9219. }
  9220. // GoString returns the string representation
  9221. func (s GetBucketLifecycleConfigurationOutput) GoString() string {
  9222. return s.String()
  9223. }
  9224. // SetRules sets the Rules field's value.
  9225. func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
  9226. s.Rules = v
  9227. return s
  9228. }
  9229. type GetBucketLifecycleInput struct {
  9230. _ struct{} `type:"structure"`
  9231. // Bucket is a required field
  9232. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9233. }
  9234. // String returns the string representation
  9235. func (s GetBucketLifecycleInput) String() string {
  9236. return awsutil.Prettify(s)
  9237. }
  9238. // GoString returns the string representation
  9239. func (s GetBucketLifecycleInput) GoString() string {
  9240. return s.String()
  9241. }
  9242. // Validate inspects the fields of the type to determine if they are valid.
  9243. func (s *GetBucketLifecycleInput) Validate() error {
  9244. invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
  9245. if s.Bucket == nil {
  9246. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9247. }
  9248. if invalidParams.Len() > 0 {
  9249. return invalidParams
  9250. }
  9251. return nil
  9252. }
  9253. // SetBucket sets the Bucket field's value.
  9254. func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
  9255. s.Bucket = &v
  9256. return s
  9257. }
  9258. func (s *GetBucketLifecycleInput) getBucket() (v string) {
  9259. if s.Bucket == nil {
  9260. return v
  9261. }
  9262. return *s.Bucket
  9263. }
  9264. type GetBucketLifecycleOutput struct {
  9265. _ struct{} `type:"structure"`
  9266. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
  9267. }
  9268. // String returns the string representation
  9269. func (s GetBucketLifecycleOutput) String() string {
  9270. return awsutil.Prettify(s)
  9271. }
  9272. // GoString returns the string representation
  9273. func (s GetBucketLifecycleOutput) GoString() string {
  9274. return s.String()
  9275. }
  9276. // SetRules sets the Rules field's value.
  9277. func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
  9278. s.Rules = v
  9279. return s
  9280. }
  9281. type GetBucketLocationInput struct {
  9282. _ struct{} `type:"structure"`
  9283. // Bucket is a required field
  9284. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9285. }
  9286. // String returns the string representation
  9287. func (s GetBucketLocationInput) String() string {
  9288. return awsutil.Prettify(s)
  9289. }
  9290. // GoString returns the string representation
  9291. func (s GetBucketLocationInput) GoString() string {
  9292. return s.String()
  9293. }
  9294. // Validate inspects the fields of the type to determine if they are valid.
  9295. func (s *GetBucketLocationInput) Validate() error {
  9296. invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
  9297. if s.Bucket == nil {
  9298. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9299. }
  9300. if invalidParams.Len() > 0 {
  9301. return invalidParams
  9302. }
  9303. return nil
  9304. }
  9305. // SetBucket sets the Bucket field's value.
  9306. func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
  9307. s.Bucket = &v
  9308. return s
  9309. }
  9310. func (s *GetBucketLocationInput) getBucket() (v string) {
  9311. if s.Bucket == nil {
  9312. return v
  9313. }
  9314. return *s.Bucket
  9315. }
  9316. type GetBucketLocationOutput struct {
  9317. _ struct{} `type:"structure"`
  9318. LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
  9319. }
  9320. // String returns the string representation
  9321. func (s GetBucketLocationOutput) String() string {
  9322. return awsutil.Prettify(s)
  9323. }
  9324. // GoString returns the string representation
  9325. func (s GetBucketLocationOutput) GoString() string {
  9326. return s.String()
  9327. }
  9328. // SetLocationConstraint sets the LocationConstraint field's value.
  9329. func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
  9330. s.LocationConstraint = &v
  9331. return s
  9332. }
  9333. type GetBucketLoggingInput struct {
  9334. _ struct{} `type:"structure"`
  9335. // Bucket is a required field
  9336. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9337. }
  9338. // String returns the string representation
  9339. func (s GetBucketLoggingInput) String() string {
  9340. return awsutil.Prettify(s)
  9341. }
  9342. // GoString returns the string representation
  9343. func (s GetBucketLoggingInput) GoString() string {
  9344. return s.String()
  9345. }
  9346. // Validate inspects the fields of the type to determine if they are valid.
  9347. func (s *GetBucketLoggingInput) Validate() error {
  9348. invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
  9349. if s.Bucket == nil {
  9350. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9351. }
  9352. if invalidParams.Len() > 0 {
  9353. return invalidParams
  9354. }
  9355. return nil
  9356. }
  9357. // SetBucket sets the Bucket field's value.
  9358. func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
  9359. s.Bucket = &v
  9360. return s
  9361. }
  9362. func (s *GetBucketLoggingInput) getBucket() (v string) {
  9363. if s.Bucket == nil {
  9364. return v
  9365. }
  9366. return *s.Bucket
  9367. }
  9368. type GetBucketLoggingOutput struct {
  9369. _ struct{} `type:"structure"`
  9370. // Container for logging information. Presence of this element indicates that
  9371. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  9372. // in this case.
  9373. LoggingEnabled *LoggingEnabled `type:"structure"`
  9374. }
  9375. // String returns the string representation
  9376. func (s GetBucketLoggingOutput) String() string {
  9377. return awsutil.Prettify(s)
  9378. }
  9379. // GoString returns the string representation
  9380. func (s GetBucketLoggingOutput) GoString() string {
  9381. return s.String()
  9382. }
  9383. // SetLoggingEnabled sets the LoggingEnabled field's value.
  9384. func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
  9385. s.LoggingEnabled = v
  9386. return s
  9387. }
  9388. type GetBucketMetricsConfigurationInput struct {
  9389. _ struct{} `type:"structure"`
  9390. // The name of the bucket containing the metrics configuration to retrieve.
  9391. //
  9392. // Bucket is a required field
  9393. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9394. // The ID used to identify the metrics configuration.
  9395. //
  9396. // Id is a required field
  9397. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  9398. }
  9399. // String returns the string representation
  9400. func (s GetBucketMetricsConfigurationInput) String() string {
  9401. return awsutil.Prettify(s)
  9402. }
  9403. // GoString returns the string representation
  9404. func (s GetBucketMetricsConfigurationInput) GoString() string {
  9405. return s.String()
  9406. }
  9407. // Validate inspects the fields of the type to determine if they are valid.
  9408. func (s *GetBucketMetricsConfigurationInput) Validate() error {
  9409. invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
  9410. if s.Bucket == nil {
  9411. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9412. }
  9413. if s.Id == nil {
  9414. invalidParams.Add(request.NewErrParamRequired("Id"))
  9415. }
  9416. if invalidParams.Len() > 0 {
  9417. return invalidParams
  9418. }
  9419. return nil
  9420. }
  9421. // SetBucket sets the Bucket field's value.
  9422. func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
  9423. s.Bucket = &v
  9424. return s
  9425. }
  9426. func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
  9427. if s.Bucket == nil {
  9428. return v
  9429. }
  9430. return *s.Bucket
  9431. }
  9432. // SetId sets the Id field's value.
  9433. func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
  9434. s.Id = &v
  9435. return s
  9436. }
  9437. type GetBucketMetricsConfigurationOutput struct {
  9438. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  9439. // Specifies the metrics configuration.
  9440. MetricsConfiguration *MetricsConfiguration `type:"structure"`
  9441. }
  9442. // String returns the string representation
  9443. func (s GetBucketMetricsConfigurationOutput) String() string {
  9444. return awsutil.Prettify(s)
  9445. }
  9446. // GoString returns the string representation
  9447. func (s GetBucketMetricsConfigurationOutput) GoString() string {
  9448. return s.String()
  9449. }
  9450. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  9451. func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
  9452. s.MetricsConfiguration = v
  9453. return s
  9454. }
  9455. type GetBucketNotificationConfigurationRequest struct {
  9456. _ struct{} `type:"structure"`
  9457. // Name of the bucket to get the notification configuration for.
  9458. //
  9459. // Bucket is a required field
  9460. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9461. }
  9462. // String returns the string representation
  9463. func (s GetBucketNotificationConfigurationRequest) String() string {
  9464. return awsutil.Prettify(s)
  9465. }
  9466. // GoString returns the string representation
  9467. func (s GetBucketNotificationConfigurationRequest) GoString() string {
  9468. return s.String()
  9469. }
  9470. // Validate inspects the fields of the type to determine if they are valid.
  9471. func (s *GetBucketNotificationConfigurationRequest) Validate() error {
  9472. invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
  9473. if s.Bucket == nil {
  9474. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9475. }
  9476. if invalidParams.Len() > 0 {
  9477. return invalidParams
  9478. }
  9479. return nil
  9480. }
  9481. // SetBucket sets the Bucket field's value.
  9482. func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
  9483. s.Bucket = &v
  9484. return s
  9485. }
  9486. func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
  9487. if s.Bucket == nil {
  9488. return v
  9489. }
  9490. return *s.Bucket
  9491. }
  9492. type GetBucketPolicyInput struct {
  9493. _ struct{} `type:"structure"`
  9494. // Bucket is a required field
  9495. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9496. }
  9497. // String returns the string representation
  9498. func (s GetBucketPolicyInput) String() string {
  9499. return awsutil.Prettify(s)
  9500. }
  9501. // GoString returns the string representation
  9502. func (s GetBucketPolicyInput) GoString() string {
  9503. return s.String()
  9504. }
  9505. // Validate inspects the fields of the type to determine if they are valid.
  9506. func (s *GetBucketPolicyInput) Validate() error {
  9507. invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
  9508. if s.Bucket == nil {
  9509. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9510. }
  9511. if invalidParams.Len() > 0 {
  9512. return invalidParams
  9513. }
  9514. return nil
  9515. }
  9516. // SetBucket sets the Bucket field's value.
  9517. func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
  9518. s.Bucket = &v
  9519. return s
  9520. }
  9521. func (s *GetBucketPolicyInput) getBucket() (v string) {
  9522. if s.Bucket == nil {
  9523. return v
  9524. }
  9525. return *s.Bucket
  9526. }
  9527. type GetBucketPolicyOutput struct {
  9528. _ struct{} `type:"structure" payload:"Policy"`
  9529. // The bucket policy as a JSON document.
  9530. Policy *string `type:"string"`
  9531. }
  9532. // String returns the string representation
  9533. func (s GetBucketPolicyOutput) String() string {
  9534. return awsutil.Prettify(s)
  9535. }
  9536. // GoString returns the string representation
  9537. func (s GetBucketPolicyOutput) GoString() string {
  9538. return s.String()
  9539. }
  9540. // SetPolicy sets the Policy field's value.
  9541. func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
  9542. s.Policy = &v
  9543. return s
  9544. }
  9545. type GetBucketReplicationInput struct {
  9546. _ struct{} `type:"structure"`
  9547. // Bucket is a required field
  9548. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9549. }
  9550. // String returns the string representation
  9551. func (s GetBucketReplicationInput) String() string {
  9552. return awsutil.Prettify(s)
  9553. }
  9554. // GoString returns the string representation
  9555. func (s GetBucketReplicationInput) GoString() string {
  9556. return s.String()
  9557. }
  9558. // Validate inspects the fields of the type to determine if they are valid.
  9559. func (s *GetBucketReplicationInput) Validate() error {
  9560. invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
  9561. if s.Bucket == nil {
  9562. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9563. }
  9564. if invalidParams.Len() > 0 {
  9565. return invalidParams
  9566. }
  9567. return nil
  9568. }
  9569. // SetBucket sets the Bucket field's value.
  9570. func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
  9571. s.Bucket = &v
  9572. return s
  9573. }
  9574. func (s *GetBucketReplicationInput) getBucket() (v string) {
  9575. if s.Bucket == nil {
  9576. return v
  9577. }
  9578. return *s.Bucket
  9579. }
  9580. type GetBucketReplicationOutput struct {
  9581. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  9582. // Container for replication rules. You can add as many as 1,000 rules. Total
  9583. // replication configuration size can be up to 2 MB.
  9584. ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
  9585. }
  9586. // String returns the string representation
  9587. func (s GetBucketReplicationOutput) String() string {
  9588. return awsutil.Prettify(s)
  9589. }
  9590. // GoString returns the string representation
  9591. func (s GetBucketReplicationOutput) GoString() string {
  9592. return s.String()
  9593. }
  9594. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  9595. func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
  9596. s.ReplicationConfiguration = v
  9597. return s
  9598. }
  9599. type GetBucketRequestPaymentInput struct {
  9600. _ struct{} `type:"structure"`
  9601. // Bucket is a required field
  9602. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9603. }
  9604. // String returns the string representation
  9605. func (s GetBucketRequestPaymentInput) String() string {
  9606. return awsutil.Prettify(s)
  9607. }
  9608. // GoString returns the string representation
  9609. func (s GetBucketRequestPaymentInput) GoString() string {
  9610. return s.String()
  9611. }
  9612. // Validate inspects the fields of the type to determine if they are valid.
  9613. func (s *GetBucketRequestPaymentInput) Validate() error {
  9614. invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
  9615. if s.Bucket == nil {
  9616. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9617. }
  9618. if invalidParams.Len() > 0 {
  9619. return invalidParams
  9620. }
  9621. return nil
  9622. }
  9623. // SetBucket sets the Bucket field's value.
  9624. func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
  9625. s.Bucket = &v
  9626. return s
  9627. }
  9628. func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
  9629. if s.Bucket == nil {
  9630. return v
  9631. }
  9632. return *s.Bucket
  9633. }
  9634. type GetBucketRequestPaymentOutput struct {
  9635. _ struct{} `type:"structure"`
  9636. // Specifies who pays for the download and request fees.
  9637. Payer *string `type:"string" enum:"Payer"`
  9638. }
  9639. // String returns the string representation
  9640. func (s GetBucketRequestPaymentOutput) String() string {
  9641. return awsutil.Prettify(s)
  9642. }
  9643. // GoString returns the string representation
  9644. func (s GetBucketRequestPaymentOutput) GoString() string {
  9645. return s.String()
  9646. }
  9647. // SetPayer sets the Payer field's value.
  9648. func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
  9649. s.Payer = &v
  9650. return s
  9651. }
  9652. type GetBucketTaggingInput struct {
  9653. _ struct{} `type:"structure"`
  9654. // Bucket is a required field
  9655. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9656. }
  9657. // String returns the string representation
  9658. func (s GetBucketTaggingInput) String() string {
  9659. return awsutil.Prettify(s)
  9660. }
  9661. // GoString returns the string representation
  9662. func (s GetBucketTaggingInput) GoString() string {
  9663. return s.String()
  9664. }
  9665. // Validate inspects the fields of the type to determine if they are valid.
  9666. func (s *GetBucketTaggingInput) Validate() error {
  9667. invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
  9668. if s.Bucket == nil {
  9669. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9670. }
  9671. if invalidParams.Len() > 0 {
  9672. return invalidParams
  9673. }
  9674. return nil
  9675. }
  9676. // SetBucket sets the Bucket field's value.
  9677. func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
  9678. s.Bucket = &v
  9679. return s
  9680. }
  9681. func (s *GetBucketTaggingInput) getBucket() (v string) {
  9682. if s.Bucket == nil {
  9683. return v
  9684. }
  9685. return *s.Bucket
  9686. }
  9687. type GetBucketTaggingOutput struct {
  9688. _ struct{} `type:"structure"`
  9689. // TagSet is a required field
  9690. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  9691. }
  9692. // String returns the string representation
  9693. func (s GetBucketTaggingOutput) String() string {
  9694. return awsutil.Prettify(s)
  9695. }
  9696. // GoString returns the string representation
  9697. func (s GetBucketTaggingOutput) GoString() string {
  9698. return s.String()
  9699. }
  9700. // SetTagSet sets the TagSet field's value.
  9701. func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
  9702. s.TagSet = v
  9703. return s
  9704. }
  9705. type GetBucketVersioningInput struct {
  9706. _ struct{} `type:"structure"`
  9707. // Bucket is a required field
  9708. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9709. }
  9710. // String returns the string representation
  9711. func (s GetBucketVersioningInput) String() string {
  9712. return awsutil.Prettify(s)
  9713. }
  9714. // GoString returns the string representation
  9715. func (s GetBucketVersioningInput) GoString() string {
  9716. return s.String()
  9717. }
  9718. // Validate inspects the fields of the type to determine if they are valid.
  9719. func (s *GetBucketVersioningInput) Validate() error {
  9720. invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
  9721. if s.Bucket == nil {
  9722. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9723. }
  9724. if invalidParams.Len() > 0 {
  9725. return invalidParams
  9726. }
  9727. return nil
  9728. }
  9729. // SetBucket sets the Bucket field's value.
  9730. func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
  9731. s.Bucket = &v
  9732. return s
  9733. }
  9734. func (s *GetBucketVersioningInput) getBucket() (v string) {
  9735. if s.Bucket == nil {
  9736. return v
  9737. }
  9738. return *s.Bucket
  9739. }
  9740. type GetBucketVersioningOutput struct {
  9741. _ struct{} `type:"structure"`
  9742. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  9743. // This element is only returned if the bucket has been configured with MFA
  9744. // delete. If the bucket has never been so configured, this element is not returned.
  9745. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
  9746. // The versioning state of the bucket.
  9747. Status *string `type:"string" enum:"BucketVersioningStatus"`
  9748. }
  9749. // String returns the string representation
  9750. func (s GetBucketVersioningOutput) String() string {
  9751. return awsutil.Prettify(s)
  9752. }
  9753. // GoString returns the string representation
  9754. func (s GetBucketVersioningOutput) GoString() string {
  9755. return s.String()
  9756. }
  9757. // SetMFADelete sets the MFADelete field's value.
  9758. func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
  9759. s.MFADelete = &v
  9760. return s
  9761. }
  9762. // SetStatus sets the Status field's value.
  9763. func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
  9764. s.Status = &v
  9765. return s
  9766. }
  9767. type GetBucketWebsiteInput struct {
  9768. _ struct{} `type:"structure"`
  9769. // Bucket is a required field
  9770. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9771. }
  9772. // String returns the string representation
  9773. func (s GetBucketWebsiteInput) String() string {
  9774. return awsutil.Prettify(s)
  9775. }
  9776. // GoString returns the string representation
  9777. func (s GetBucketWebsiteInput) GoString() string {
  9778. return s.String()
  9779. }
  9780. // Validate inspects the fields of the type to determine if they are valid.
  9781. func (s *GetBucketWebsiteInput) Validate() error {
  9782. invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
  9783. if s.Bucket == nil {
  9784. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9785. }
  9786. if invalidParams.Len() > 0 {
  9787. return invalidParams
  9788. }
  9789. return nil
  9790. }
  9791. // SetBucket sets the Bucket field's value.
  9792. func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
  9793. s.Bucket = &v
  9794. return s
  9795. }
  9796. func (s *GetBucketWebsiteInput) getBucket() (v string) {
  9797. if s.Bucket == nil {
  9798. return v
  9799. }
  9800. return *s.Bucket
  9801. }
  9802. type GetBucketWebsiteOutput struct {
  9803. _ struct{} `type:"structure"`
  9804. ErrorDocument *ErrorDocument `type:"structure"`
  9805. IndexDocument *IndexDocument `type:"structure"`
  9806. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  9807. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  9808. }
  9809. // String returns the string representation
  9810. func (s GetBucketWebsiteOutput) String() string {
  9811. return awsutil.Prettify(s)
  9812. }
  9813. // GoString returns the string representation
  9814. func (s GetBucketWebsiteOutput) GoString() string {
  9815. return s.String()
  9816. }
  9817. // SetErrorDocument sets the ErrorDocument field's value.
  9818. func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
  9819. s.ErrorDocument = v
  9820. return s
  9821. }
  9822. // SetIndexDocument sets the IndexDocument field's value.
  9823. func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
  9824. s.IndexDocument = v
  9825. return s
  9826. }
  9827. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  9828. func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
  9829. s.RedirectAllRequestsTo = v
  9830. return s
  9831. }
  9832. // SetRoutingRules sets the RoutingRules field's value.
  9833. func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
  9834. s.RoutingRules = v
  9835. return s
  9836. }
  9837. type GetObjectAclInput struct {
  9838. _ struct{} `type:"structure"`
  9839. // Bucket is a required field
  9840. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9841. // Key is a required field
  9842. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9843. // Confirms that the requester knows that she or he will be charged for the
  9844. // request. Bucket owners need not specify this parameter in their requests.
  9845. // Documentation on downloading objects from requester pays buckets can be found
  9846. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9847. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9848. // VersionId used to reference a specific version of the object.
  9849. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9850. }
  9851. // String returns the string representation
  9852. func (s GetObjectAclInput) String() string {
  9853. return awsutil.Prettify(s)
  9854. }
  9855. // GoString returns the string representation
  9856. func (s GetObjectAclInput) GoString() string {
  9857. return s.String()
  9858. }
  9859. // Validate inspects the fields of the type to determine if they are valid.
  9860. func (s *GetObjectAclInput) Validate() error {
  9861. invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
  9862. if s.Bucket == nil {
  9863. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  9864. }
  9865. if s.Key == nil {
  9866. invalidParams.Add(request.NewErrParamRequired("Key"))
  9867. }
  9868. if s.Key != nil && len(*s.Key) < 1 {
  9869. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  9870. }
  9871. if invalidParams.Len() > 0 {
  9872. return invalidParams
  9873. }
  9874. return nil
  9875. }
  9876. // SetBucket sets the Bucket field's value.
  9877. func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
  9878. s.Bucket = &v
  9879. return s
  9880. }
  9881. func (s *GetObjectAclInput) getBucket() (v string) {
  9882. if s.Bucket == nil {
  9883. return v
  9884. }
  9885. return *s.Bucket
  9886. }
  9887. // SetKey sets the Key field's value.
  9888. func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
  9889. s.Key = &v
  9890. return s
  9891. }
  9892. // SetRequestPayer sets the RequestPayer field's value.
  9893. func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
  9894. s.RequestPayer = &v
  9895. return s
  9896. }
  9897. // SetVersionId sets the VersionId field's value.
  9898. func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
  9899. s.VersionId = &v
  9900. return s
  9901. }
  9902. type GetObjectAclOutput struct {
  9903. _ struct{} `type:"structure"`
  9904. // A list of grants.
  9905. Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
  9906. Owner *Owner `type:"structure"`
  9907. // If present, indicates that the requester was successfully charged for the
  9908. // request.
  9909. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  9910. }
  9911. // String returns the string representation
  9912. func (s GetObjectAclOutput) String() string {
  9913. return awsutil.Prettify(s)
  9914. }
  9915. // GoString returns the string representation
  9916. func (s GetObjectAclOutput) GoString() string {
  9917. return s.String()
  9918. }
  9919. // SetGrants sets the Grants field's value.
  9920. func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
  9921. s.Grants = v
  9922. return s
  9923. }
  9924. // SetOwner sets the Owner field's value.
  9925. func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
  9926. s.Owner = v
  9927. return s
  9928. }
  9929. // SetRequestCharged sets the RequestCharged field's value.
  9930. func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
  9931. s.RequestCharged = &v
  9932. return s
  9933. }
  9934. type GetObjectInput struct {
  9935. _ struct{} `type:"structure"`
  9936. // Bucket is a required field
  9937. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  9938. // Return the object only if its entity tag (ETag) is the same as the one specified,
  9939. // otherwise return a 412 (precondition failed).
  9940. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  9941. // Return the object only if it has been modified since the specified time,
  9942. // otherwise return a 304 (not modified).
  9943. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  9944. // Return the object only if its entity tag (ETag) is different from the one
  9945. // specified, otherwise return a 304 (not modified).
  9946. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  9947. // Return the object only if it has not been modified since the specified time,
  9948. // otherwise return a 412 (precondition failed).
  9949. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  9950. // Key is a required field
  9951. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  9952. // Part number of the object being read. This is a positive integer between
  9953. // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
  9954. // Useful for downloading just a part of an object.
  9955. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  9956. // Downloads the specified range bytes of an object. For more information about
  9957. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  9958. Range *string `location:"header" locationName:"Range" type:"string"`
  9959. // Confirms that the requester knows that she or he will be charged for the
  9960. // request. Bucket owners need not specify this parameter in their requests.
  9961. // Documentation on downloading objects from requester pays buckets can be found
  9962. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  9963. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  9964. // Sets the Cache-Control header of the response.
  9965. ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
  9966. // Sets the Content-Disposition header of the response
  9967. ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
  9968. // Sets the Content-Encoding header of the response.
  9969. ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
  9970. // Sets the Content-Language header of the response.
  9971. ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
  9972. // Sets the Content-Type header of the response.
  9973. ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
  9974. // Sets the Expires header of the response.
  9975. ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"iso8601"`
  9976. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  9977. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  9978. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  9979. // data. This value is used to store the object and then it is discarded; Amazon
  9980. // does not store the encryption key. The key must be appropriate for use with
  9981. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  9982. // header.
  9983. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  9984. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  9985. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  9986. // key was transmitted without error.
  9987. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  9988. // VersionId used to reference a specific version of the object.
  9989. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  9990. }
  9991. // String returns the string representation
  9992. func (s GetObjectInput) String() string {
  9993. return awsutil.Prettify(s)
  9994. }
  9995. // GoString returns the string representation
  9996. func (s GetObjectInput) GoString() string {
  9997. return s.String()
  9998. }
  9999. // Validate inspects the fields of the type to determine if they are valid.
  10000. func (s *GetObjectInput) Validate() error {
  10001. invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
  10002. if s.Bucket == nil {
  10003. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10004. }
  10005. if s.Key == nil {
  10006. invalidParams.Add(request.NewErrParamRequired("Key"))
  10007. }
  10008. if s.Key != nil && len(*s.Key) < 1 {
  10009. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10010. }
  10011. if invalidParams.Len() > 0 {
  10012. return invalidParams
  10013. }
  10014. return nil
  10015. }
  10016. // SetBucket sets the Bucket field's value.
  10017. func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
  10018. s.Bucket = &v
  10019. return s
  10020. }
  10021. func (s *GetObjectInput) getBucket() (v string) {
  10022. if s.Bucket == nil {
  10023. return v
  10024. }
  10025. return *s.Bucket
  10026. }
  10027. // SetIfMatch sets the IfMatch field's value.
  10028. func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
  10029. s.IfMatch = &v
  10030. return s
  10031. }
  10032. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10033. func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
  10034. s.IfModifiedSince = &v
  10035. return s
  10036. }
  10037. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10038. func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
  10039. s.IfNoneMatch = &v
  10040. return s
  10041. }
  10042. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10043. func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
  10044. s.IfUnmodifiedSince = &v
  10045. return s
  10046. }
  10047. // SetKey sets the Key field's value.
  10048. func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
  10049. s.Key = &v
  10050. return s
  10051. }
  10052. // SetPartNumber sets the PartNumber field's value.
  10053. func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
  10054. s.PartNumber = &v
  10055. return s
  10056. }
  10057. // SetRange sets the Range field's value.
  10058. func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
  10059. s.Range = &v
  10060. return s
  10061. }
  10062. // SetRequestPayer sets the RequestPayer field's value.
  10063. func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
  10064. s.RequestPayer = &v
  10065. return s
  10066. }
  10067. // SetResponseCacheControl sets the ResponseCacheControl field's value.
  10068. func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
  10069. s.ResponseCacheControl = &v
  10070. return s
  10071. }
  10072. // SetResponseContentDisposition sets the ResponseContentDisposition field's value.
  10073. func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
  10074. s.ResponseContentDisposition = &v
  10075. return s
  10076. }
  10077. // SetResponseContentEncoding sets the ResponseContentEncoding field's value.
  10078. func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
  10079. s.ResponseContentEncoding = &v
  10080. return s
  10081. }
  10082. // SetResponseContentLanguage sets the ResponseContentLanguage field's value.
  10083. func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
  10084. s.ResponseContentLanguage = &v
  10085. return s
  10086. }
  10087. // SetResponseContentType sets the ResponseContentType field's value.
  10088. func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
  10089. s.ResponseContentType = &v
  10090. return s
  10091. }
  10092. // SetResponseExpires sets the ResponseExpires field's value.
  10093. func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
  10094. s.ResponseExpires = &v
  10095. return s
  10096. }
  10097. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10098. func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
  10099. s.SSECustomerAlgorithm = &v
  10100. return s
  10101. }
  10102. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10103. func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
  10104. s.SSECustomerKey = &v
  10105. return s
  10106. }
  10107. func (s *GetObjectInput) getSSECustomerKey() (v string) {
  10108. if s.SSECustomerKey == nil {
  10109. return v
  10110. }
  10111. return *s.SSECustomerKey
  10112. }
  10113. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10114. func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
  10115. s.SSECustomerKeyMD5 = &v
  10116. return s
  10117. }
  10118. // SetVersionId sets the VersionId field's value.
  10119. func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
  10120. s.VersionId = &v
  10121. return s
  10122. }
  10123. type GetObjectOutput struct {
  10124. _ struct{} `type:"structure" payload:"Body"`
  10125. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10126. // Object data.
  10127. Body io.ReadCloser `type:"blob"`
  10128. // Specifies caching behavior along the request/reply chain.
  10129. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10130. // Specifies presentational information for the object.
  10131. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10132. // Specifies what content encodings have been applied to the object and thus
  10133. // what decoding mechanisms must be applied to obtain the media-type referenced
  10134. // by the Content-Type header field.
  10135. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10136. // The language the content is in.
  10137. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10138. // Size of the body in bytes.
  10139. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10140. // The portion of the object returned in the response.
  10141. ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
  10142. // A standard MIME type describing the format of the object data.
  10143. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10144. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10145. // Marker. If false, this response header does not appear in the response.
  10146. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10147. // An ETag is an opaque identifier assigned by a web server to a specific version
  10148. // of a resource found at a URL
  10149. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10150. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10151. // includes this header. It includes the expiry-date and rule-id key value pairs
  10152. // providing object expiration information. The value of the rule-id is URL
  10153. // encoded.
  10154. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10155. // The date and time at which the object is no longer cacheable.
  10156. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10157. // Last modified date of the object
  10158. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  10159. // A map of metadata to store with the object in S3.
  10160. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10161. // This is set to the number of metadata entries not returned in x-amz-meta
  10162. // headers. This can happen if you create metadata using an API like SOAP that
  10163. // supports more flexible metadata than the REST API. For example, using SOAP,
  10164. // you can create metadata whose values are not legal HTTP headers.
  10165. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10166. // The count of parts this object has.
  10167. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10168. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10169. // If present, indicates that the requester was successfully charged for the
  10170. // request.
  10171. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10172. // Provides information about object restoration operation and expiration time
  10173. // of the restored object copy.
  10174. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  10175. // If server-side encryption with a customer-provided encryption key was requested,
  10176. // the response will include this header confirming the encryption algorithm
  10177. // used.
  10178. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10179. // If server-side encryption with a customer-provided encryption key was requested,
  10180. // the response will include this header to provide round trip message integrity
  10181. // verification of the customer-provided encryption key.
  10182. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10183. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10184. // encryption key that was used for the object.
  10185. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10186. // The Server-side encryption algorithm used when storing this object in S3
  10187. // (e.g., AES256, aws:kms).
  10188. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10189. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10190. // The number of tags, if any, on the object.
  10191. TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
  10192. // Version of the object.
  10193. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10194. // If the bucket is configured as a website, redirects requests for this object
  10195. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10196. // the value of this header in the object metadata.
  10197. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10198. }
  10199. // String returns the string representation
  10200. func (s GetObjectOutput) String() string {
  10201. return awsutil.Prettify(s)
  10202. }
  10203. // GoString returns the string representation
  10204. func (s GetObjectOutput) GoString() string {
  10205. return s.String()
  10206. }
  10207. // SetAcceptRanges sets the AcceptRanges field's value.
  10208. func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
  10209. s.AcceptRanges = &v
  10210. return s
  10211. }
  10212. // SetBody sets the Body field's value.
  10213. func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
  10214. s.Body = v
  10215. return s
  10216. }
  10217. // SetCacheControl sets the CacheControl field's value.
  10218. func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
  10219. s.CacheControl = &v
  10220. return s
  10221. }
  10222. // SetContentDisposition sets the ContentDisposition field's value.
  10223. func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
  10224. s.ContentDisposition = &v
  10225. return s
  10226. }
  10227. // SetContentEncoding sets the ContentEncoding field's value.
  10228. func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
  10229. s.ContentEncoding = &v
  10230. return s
  10231. }
  10232. // SetContentLanguage sets the ContentLanguage field's value.
  10233. func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
  10234. s.ContentLanguage = &v
  10235. return s
  10236. }
  10237. // SetContentLength sets the ContentLength field's value.
  10238. func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
  10239. s.ContentLength = &v
  10240. return s
  10241. }
  10242. // SetContentRange sets the ContentRange field's value.
  10243. func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
  10244. s.ContentRange = &v
  10245. return s
  10246. }
  10247. // SetContentType sets the ContentType field's value.
  10248. func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
  10249. s.ContentType = &v
  10250. return s
  10251. }
  10252. // SetDeleteMarker sets the DeleteMarker field's value.
  10253. func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
  10254. s.DeleteMarker = &v
  10255. return s
  10256. }
  10257. // SetETag sets the ETag field's value.
  10258. func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
  10259. s.ETag = &v
  10260. return s
  10261. }
  10262. // SetExpiration sets the Expiration field's value.
  10263. func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
  10264. s.Expiration = &v
  10265. return s
  10266. }
  10267. // SetExpires sets the Expires field's value.
  10268. func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
  10269. s.Expires = &v
  10270. return s
  10271. }
  10272. // SetLastModified sets the LastModified field's value.
  10273. func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
  10274. s.LastModified = &v
  10275. return s
  10276. }
  10277. // SetMetadata sets the Metadata field's value.
  10278. func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
  10279. s.Metadata = v
  10280. return s
  10281. }
  10282. // SetMissingMeta sets the MissingMeta field's value.
  10283. func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
  10284. s.MissingMeta = &v
  10285. return s
  10286. }
  10287. // SetPartsCount sets the PartsCount field's value.
  10288. func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
  10289. s.PartsCount = &v
  10290. return s
  10291. }
  10292. // SetReplicationStatus sets the ReplicationStatus field's value.
  10293. func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
  10294. s.ReplicationStatus = &v
  10295. return s
  10296. }
  10297. // SetRequestCharged sets the RequestCharged field's value.
  10298. func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
  10299. s.RequestCharged = &v
  10300. return s
  10301. }
  10302. // SetRestore sets the Restore field's value.
  10303. func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
  10304. s.Restore = &v
  10305. return s
  10306. }
  10307. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10308. func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
  10309. s.SSECustomerAlgorithm = &v
  10310. return s
  10311. }
  10312. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10313. func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
  10314. s.SSECustomerKeyMD5 = &v
  10315. return s
  10316. }
  10317. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  10318. func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
  10319. s.SSEKMSKeyId = &v
  10320. return s
  10321. }
  10322. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  10323. func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
  10324. s.ServerSideEncryption = &v
  10325. return s
  10326. }
  10327. // SetStorageClass sets the StorageClass field's value.
  10328. func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
  10329. s.StorageClass = &v
  10330. return s
  10331. }
  10332. // SetTagCount sets the TagCount field's value.
  10333. func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
  10334. s.TagCount = &v
  10335. return s
  10336. }
  10337. // SetVersionId sets the VersionId field's value.
  10338. func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
  10339. s.VersionId = &v
  10340. return s
  10341. }
  10342. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  10343. func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
  10344. s.WebsiteRedirectLocation = &v
  10345. return s
  10346. }
  10347. type GetObjectTaggingInput struct {
  10348. _ struct{} `type:"structure"`
  10349. // Bucket is a required field
  10350. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10351. // Key is a required field
  10352. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10353. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10354. }
  10355. // String returns the string representation
  10356. func (s GetObjectTaggingInput) String() string {
  10357. return awsutil.Prettify(s)
  10358. }
  10359. // GoString returns the string representation
  10360. func (s GetObjectTaggingInput) GoString() string {
  10361. return s.String()
  10362. }
  10363. // Validate inspects the fields of the type to determine if they are valid.
  10364. func (s *GetObjectTaggingInput) Validate() error {
  10365. invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
  10366. if s.Bucket == nil {
  10367. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10368. }
  10369. if s.Key == nil {
  10370. invalidParams.Add(request.NewErrParamRequired("Key"))
  10371. }
  10372. if s.Key != nil && len(*s.Key) < 1 {
  10373. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10374. }
  10375. if invalidParams.Len() > 0 {
  10376. return invalidParams
  10377. }
  10378. return nil
  10379. }
  10380. // SetBucket sets the Bucket field's value.
  10381. func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
  10382. s.Bucket = &v
  10383. return s
  10384. }
  10385. func (s *GetObjectTaggingInput) getBucket() (v string) {
  10386. if s.Bucket == nil {
  10387. return v
  10388. }
  10389. return *s.Bucket
  10390. }
  10391. // SetKey sets the Key field's value.
  10392. func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
  10393. s.Key = &v
  10394. return s
  10395. }
  10396. // SetVersionId sets the VersionId field's value.
  10397. func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
  10398. s.VersionId = &v
  10399. return s
  10400. }
  10401. type GetObjectTaggingOutput struct {
  10402. _ struct{} `type:"structure"`
  10403. // TagSet is a required field
  10404. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  10405. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10406. }
  10407. // String returns the string representation
  10408. func (s GetObjectTaggingOutput) String() string {
  10409. return awsutil.Prettify(s)
  10410. }
  10411. // GoString returns the string representation
  10412. func (s GetObjectTaggingOutput) GoString() string {
  10413. return s.String()
  10414. }
  10415. // SetTagSet sets the TagSet field's value.
  10416. func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
  10417. s.TagSet = v
  10418. return s
  10419. }
  10420. // SetVersionId sets the VersionId field's value.
  10421. func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
  10422. s.VersionId = &v
  10423. return s
  10424. }
  10425. type GetObjectTorrentInput struct {
  10426. _ struct{} `type:"structure"`
  10427. // Bucket is a required field
  10428. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10429. // Key is a required field
  10430. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10431. // Confirms that the requester knows that she or he will be charged for the
  10432. // request. Bucket owners need not specify this parameter in their requests.
  10433. // Documentation on downloading objects from requester pays buckets can be found
  10434. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10435. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10436. }
  10437. // String returns the string representation
  10438. func (s GetObjectTorrentInput) String() string {
  10439. return awsutil.Prettify(s)
  10440. }
  10441. // GoString returns the string representation
  10442. func (s GetObjectTorrentInput) GoString() string {
  10443. return s.String()
  10444. }
  10445. // Validate inspects the fields of the type to determine if they are valid.
  10446. func (s *GetObjectTorrentInput) Validate() error {
  10447. invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
  10448. if s.Bucket == nil {
  10449. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10450. }
  10451. if s.Key == nil {
  10452. invalidParams.Add(request.NewErrParamRequired("Key"))
  10453. }
  10454. if s.Key != nil && len(*s.Key) < 1 {
  10455. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10456. }
  10457. if invalidParams.Len() > 0 {
  10458. return invalidParams
  10459. }
  10460. return nil
  10461. }
  10462. // SetBucket sets the Bucket field's value.
  10463. func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
  10464. s.Bucket = &v
  10465. return s
  10466. }
  10467. func (s *GetObjectTorrentInput) getBucket() (v string) {
  10468. if s.Bucket == nil {
  10469. return v
  10470. }
  10471. return *s.Bucket
  10472. }
  10473. // SetKey sets the Key field's value.
  10474. func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
  10475. s.Key = &v
  10476. return s
  10477. }
  10478. // SetRequestPayer sets the RequestPayer field's value.
  10479. func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
  10480. s.RequestPayer = &v
  10481. return s
  10482. }
  10483. type GetObjectTorrentOutput struct {
  10484. _ struct{} `type:"structure" payload:"Body"`
  10485. Body io.ReadCloser `type:"blob"`
  10486. // If present, indicates that the requester was successfully charged for the
  10487. // request.
  10488. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10489. }
  10490. // String returns the string representation
  10491. func (s GetObjectTorrentOutput) String() string {
  10492. return awsutil.Prettify(s)
  10493. }
  10494. // GoString returns the string representation
  10495. func (s GetObjectTorrentOutput) GoString() string {
  10496. return s.String()
  10497. }
  10498. // SetBody sets the Body field's value.
  10499. func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
  10500. s.Body = v
  10501. return s
  10502. }
  10503. // SetRequestCharged sets the RequestCharged field's value.
  10504. func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
  10505. s.RequestCharged = &v
  10506. return s
  10507. }
  10508. type GlacierJobParameters struct {
  10509. _ struct{} `type:"structure"`
  10510. // Glacier retrieval tier at which the restore will be processed.
  10511. //
  10512. // Tier is a required field
  10513. Tier *string `type:"string" required:"true" enum:"Tier"`
  10514. }
  10515. // String returns the string representation
  10516. func (s GlacierJobParameters) String() string {
  10517. return awsutil.Prettify(s)
  10518. }
  10519. // GoString returns the string representation
  10520. func (s GlacierJobParameters) GoString() string {
  10521. return s.String()
  10522. }
  10523. // Validate inspects the fields of the type to determine if they are valid.
  10524. func (s *GlacierJobParameters) Validate() error {
  10525. invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
  10526. if s.Tier == nil {
  10527. invalidParams.Add(request.NewErrParamRequired("Tier"))
  10528. }
  10529. if invalidParams.Len() > 0 {
  10530. return invalidParams
  10531. }
  10532. return nil
  10533. }
  10534. // SetTier sets the Tier field's value.
  10535. func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
  10536. s.Tier = &v
  10537. return s
  10538. }
  10539. type Grant struct {
  10540. _ struct{} `type:"structure"`
  10541. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10542. // Specifies the permission given to the grantee.
  10543. Permission *string `type:"string" enum:"Permission"`
  10544. }
  10545. // String returns the string representation
  10546. func (s Grant) String() string {
  10547. return awsutil.Prettify(s)
  10548. }
  10549. // GoString returns the string representation
  10550. func (s Grant) GoString() string {
  10551. return s.String()
  10552. }
  10553. // Validate inspects the fields of the type to determine if they are valid.
  10554. func (s *Grant) Validate() error {
  10555. invalidParams := request.ErrInvalidParams{Context: "Grant"}
  10556. if s.Grantee != nil {
  10557. if err := s.Grantee.Validate(); err != nil {
  10558. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  10559. }
  10560. }
  10561. if invalidParams.Len() > 0 {
  10562. return invalidParams
  10563. }
  10564. return nil
  10565. }
  10566. // SetGrantee sets the Grantee field's value.
  10567. func (s *Grant) SetGrantee(v *Grantee) *Grant {
  10568. s.Grantee = v
  10569. return s
  10570. }
  10571. // SetPermission sets the Permission field's value.
  10572. func (s *Grant) SetPermission(v string) *Grant {
  10573. s.Permission = &v
  10574. return s
  10575. }
  10576. type Grantee struct {
  10577. _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  10578. // Screen name of the grantee.
  10579. DisplayName *string `type:"string"`
  10580. // Email address of the grantee.
  10581. EmailAddress *string `type:"string"`
  10582. // The canonical user ID of the grantee.
  10583. ID *string `type:"string"`
  10584. // Type of grantee
  10585. //
  10586. // Type is a required field
  10587. Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
  10588. // URI of the grantee group.
  10589. URI *string `type:"string"`
  10590. }
  10591. // String returns the string representation
  10592. func (s Grantee) String() string {
  10593. return awsutil.Prettify(s)
  10594. }
  10595. // GoString returns the string representation
  10596. func (s Grantee) GoString() string {
  10597. return s.String()
  10598. }
  10599. // Validate inspects the fields of the type to determine if they are valid.
  10600. func (s *Grantee) Validate() error {
  10601. invalidParams := request.ErrInvalidParams{Context: "Grantee"}
  10602. if s.Type == nil {
  10603. invalidParams.Add(request.NewErrParamRequired("Type"))
  10604. }
  10605. if invalidParams.Len() > 0 {
  10606. return invalidParams
  10607. }
  10608. return nil
  10609. }
  10610. // SetDisplayName sets the DisplayName field's value.
  10611. func (s *Grantee) SetDisplayName(v string) *Grantee {
  10612. s.DisplayName = &v
  10613. return s
  10614. }
  10615. // SetEmailAddress sets the EmailAddress field's value.
  10616. func (s *Grantee) SetEmailAddress(v string) *Grantee {
  10617. s.EmailAddress = &v
  10618. return s
  10619. }
  10620. // SetID sets the ID field's value.
  10621. func (s *Grantee) SetID(v string) *Grantee {
  10622. s.ID = &v
  10623. return s
  10624. }
  10625. // SetType sets the Type field's value.
  10626. func (s *Grantee) SetType(v string) *Grantee {
  10627. s.Type = &v
  10628. return s
  10629. }
  10630. // SetURI sets the URI field's value.
  10631. func (s *Grantee) SetURI(v string) *Grantee {
  10632. s.URI = &v
  10633. return s
  10634. }
  10635. type HeadBucketInput struct {
  10636. _ struct{} `type:"structure"`
  10637. // Bucket is a required field
  10638. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10639. }
  10640. // String returns the string representation
  10641. func (s HeadBucketInput) String() string {
  10642. return awsutil.Prettify(s)
  10643. }
  10644. // GoString returns the string representation
  10645. func (s HeadBucketInput) GoString() string {
  10646. return s.String()
  10647. }
  10648. // Validate inspects the fields of the type to determine if they are valid.
  10649. func (s *HeadBucketInput) Validate() error {
  10650. invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
  10651. if s.Bucket == nil {
  10652. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10653. }
  10654. if invalidParams.Len() > 0 {
  10655. return invalidParams
  10656. }
  10657. return nil
  10658. }
  10659. // SetBucket sets the Bucket field's value.
  10660. func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
  10661. s.Bucket = &v
  10662. return s
  10663. }
  10664. func (s *HeadBucketInput) getBucket() (v string) {
  10665. if s.Bucket == nil {
  10666. return v
  10667. }
  10668. return *s.Bucket
  10669. }
  10670. type HeadBucketOutput struct {
  10671. _ struct{} `type:"structure"`
  10672. }
  10673. // String returns the string representation
  10674. func (s HeadBucketOutput) String() string {
  10675. return awsutil.Prettify(s)
  10676. }
  10677. // GoString returns the string representation
  10678. func (s HeadBucketOutput) GoString() string {
  10679. return s.String()
  10680. }
  10681. type HeadObjectInput struct {
  10682. _ struct{} `type:"structure"`
  10683. // Bucket is a required field
  10684. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  10685. // Return the object only if its entity tag (ETag) is the same as the one specified,
  10686. // otherwise return a 412 (precondition failed).
  10687. IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
  10688. // Return the object only if it has been modified since the specified time,
  10689. // otherwise return a 304 (not modified).
  10690. IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10691. // Return the object only if its entity tag (ETag) is different from the one
  10692. // specified, otherwise return a 304 (not modified).
  10693. IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
  10694. // Return the object only if it has not been modified since the specified time,
  10695. // otherwise return a 412 (precondition failed).
  10696. IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp" timestampFormat:"rfc822"`
  10697. // Key is a required field
  10698. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  10699. // Part number of the object being read. This is a positive integer between
  10700. // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
  10701. // Useful querying about the size of the part and the number of parts in this
  10702. // object.
  10703. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
  10704. // Downloads the specified range bytes of an object. For more information about
  10705. // the HTTP Range header, go to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.
  10706. Range *string `location:"header" locationName:"Range" type:"string"`
  10707. // Confirms that the requester knows that she or he will be charged for the
  10708. // request. Bucket owners need not specify this parameter in their requests.
  10709. // Documentation on downloading objects from requester pays buckets can be found
  10710. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  10711. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  10712. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  10713. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10714. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  10715. // data. This value is used to store the object and then it is discarded; Amazon
  10716. // does not store the encryption key. The key must be appropriate for use with
  10717. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  10718. // header.
  10719. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  10720. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  10721. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  10722. // key was transmitted without error.
  10723. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10724. // VersionId used to reference a specific version of the object.
  10725. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  10726. }
  10727. // String returns the string representation
  10728. func (s HeadObjectInput) String() string {
  10729. return awsutil.Prettify(s)
  10730. }
  10731. // GoString returns the string representation
  10732. func (s HeadObjectInput) GoString() string {
  10733. return s.String()
  10734. }
  10735. // Validate inspects the fields of the type to determine if they are valid.
  10736. func (s *HeadObjectInput) Validate() error {
  10737. invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
  10738. if s.Bucket == nil {
  10739. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  10740. }
  10741. if s.Key == nil {
  10742. invalidParams.Add(request.NewErrParamRequired("Key"))
  10743. }
  10744. if s.Key != nil && len(*s.Key) < 1 {
  10745. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  10746. }
  10747. if invalidParams.Len() > 0 {
  10748. return invalidParams
  10749. }
  10750. return nil
  10751. }
  10752. // SetBucket sets the Bucket field's value.
  10753. func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
  10754. s.Bucket = &v
  10755. return s
  10756. }
  10757. func (s *HeadObjectInput) getBucket() (v string) {
  10758. if s.Bucket == nil {
  10759. return v
  10760. }
  10761. return *s.Bucket
  10762. }
  10763. // SetIfMatch sets the IfMatch field's value.
  10764. func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
  10765. s.IfMatch = &v
  10766. return s
  10767. }
  10768. // SetIfModifiedSince sets the IfModifiedSince field's value.
  10769. func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
  10770. s.IfModifiedSince = &v
  10771. return s
  10772. }
  10773. // SetIfNoneMatch sets the IfNoneMatch field's value.
  10774. func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
  10775. s.IfNoneMatch = &v
  10776. return s
  10777. }
  10778. // SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
  10779. func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
  10780. s.IfUnmodifiedSince = &v
  10781. return s
  10782. }
  10783. // SetKey sets the Key field's value.
  10784. func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
  10785. s.Key = &v
  10786. return s
  10787. }
  10788. // SetPartNumber sets the PartNumber field's value.
  10789. func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
  10790. s.PartNumber = &v
  10791. return s
  10792. }
  10793. // SetRange sets the Range field's value.
  10794. func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
  10795. s.Range = &v
  10796. return s
  10797. }
  10798. // SetRequestPayer sets the RequestPayer field's value.
  10799. func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
  10800. s.RequestPayer = &v
  10801. return s
  10802. }
  10803. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10804. func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
  10805. s.SSECustomerAlgorithm = &v
  10806. return s
  10807. }
  10808. // SetSSECustomerKey sets the SSECustomerKey field's value.
  10809. func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
  10810. s.SSECustomerKey = &v
  10811. return s
  10812. }
  10813. func (s *HeadObjectInput) getSSECustomerKey() (v string) {
  10814. if s.SSECustomerKey == nil {
  10815. return v
  10816. }
  10817. return *s.SSECustomerKey
  10818. }
  10819. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  10820. func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
  10821. s.SSECustomerKeyMD5 = &v
  10822. return s
  10823. }
  10824. // SetVersionId sets the VersionId field's value.
  10825. func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
  10826. s.VersionId = &v
  10827. return s
  10828. }
  10829. type HeadObjectOutput struct {
  10830. _ struct{} `type:"structure"`
  10831. AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
  10832. // Specifies caching behavior along the request/reply chain.
  10833. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  10834. // Specifies presentational information for the object.
  10835. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  10836. // Specifies what content encodings have been applied to the object and thus
  10837. // what decoding mechanisms must be applied to obtain the media-type referenced
  10838. // by the Content-Type header field.
  10839. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  10840. // The language the content is in.
  10841. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  10842. // Size of the body in bytes.
  10843. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  10844. // A standard MIME type describing the format of the object data.
  10845. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  10846. // Specifies whether the object retrieved was (true) or was not (false) a Delete
  10847. // Marker. If false, this response header does not appear in the response.
  10848. DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
  10849. // An ETag is an opaque identifier assigned by a web server to a specific version
  10850. // of a resource found at a URL
  10851. ETag *string `location:"header" locationName:"ETag" type:"string"`
  10852. // If the object expiration is configured (see PUT Bucket lifecycle), the response
  10853. // includes this header. It includes the expiry-date and rule-id key value pairs
  10854. // providing object expiration information. The value of the rule-id is URL
  10855. // encoded.
  10856. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  10857. // The date and time at which the object is no longer cacheable.
  10858. Expires *string `location:"header" locationName:"Expires" type:"string"`
  10859. // Last modified date of the object
  10860. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp" timestampFormat:"rfc822"`
  10861. // A map of metadata to store with the object in S3.
  10862. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  10863. // This is set to the number of metadata entries not returned in x-amz-meta
  10864. // headers. This can happen if you create metadata using an API like SOAP that
  10865. // supports more flexible metadata than the REST API. For example, using SOAP,
  10866. // you can create metadata whose values are not legal HTTP headers.
  10867. MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
  10868. // The count of parts this object has.
  10869. PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
  10870. ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
  10871. // If present, indicates that the requester was successfully charged for the
  10872. // request.
  10873. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  10874. // Provides information about object restoration operation and expiration time
  10875. // of the restored object copy.
  10876. Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
  10877. // If server-side encryption with a customer-provided encryption key was requested,
  10878. // the response will include this header confirming the encryption algorithm
  10879. // used.
  10880. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  10881. // If server-side encryption with a customer-provided encryption key was requested,
  10882. // the response will include this header to provide round trip message integrity
  10883. // verification of the customer-provided encryption key.
  10884. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  10885. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  10886. // encryption key that was used for the object.
  10887. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  10888. // The Server-side encryption algorithm used when storing this object in S3
  10889. // (e.g., AES256, aws:kms).
  10890. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  10891. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  10892. // Version of the object.
  10893. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  10894. // If the bucket is configured as a website, redirects requests for this object
  10895. // to another object in the same bucket or to an external URL. Amazon S3 stores
  10896. // the value of this header in the object metadata.
  10897. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  10898. }
  10899. // String returns the string representation
  10900. func (s HeadObjectOutput) String() string {
  10901. return awsutil.Prettify(s)
  10902. }
  10903. // GoString returns the string representation
  10904. func (s HeadObjectOutput) GoString() string {
  10905. return s.String()
  10906. }
  10907. // SetAcceptRanges sets the AcceptRanges field's value.
  10908. func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
  10909. s.AcceptRanges = &v
  10910. return s
  10911. }
  10912. // SetCacheControl sets the CacheControl field's value.
  10913. func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
  10914. s.CacheControl = &v
  10915. return s
  10916. }
  10917. // SetContentDisposition sets the ContentDisposition field's value.
  10918. func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
  10919. s.ContentDisposition = &v
  10920. return s
  10921. }
  10922. // SetContentEncoding sets the ContentEncoding field's value.
  10923. func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
  10924. s.ContentEncoding = &v
  10925. return s
  10926. }
  10927. // SetContentLanguage sets the ContentLanguage field's value.
  10928. func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
  10929. s.ContentLanguage = &v
  10930. return s
  10931. }
  10932. // SetContentLength sets the ContentLength field's value.
  10933. func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
  10934. s.ContentLength = &v
  10935. return s
  10936. }
  10937. // SetContentType sets the ContentType field's value.
  10938. func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
  10939. s.ContentType = &v
  10940. return s
  10941. }
  10942. // SetDeleteMarker sets the DeleteMarker field's value.
  10943. func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
  10944. s.DeleteMarker = &v
  10945. return s
  10946. }
  10947. // SetETag sets the ETag field's value.
  10948. func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
  10949. s.ETag = &v
  10950. return s
  10951. }
  10952. // SetExpiration sets the Expiration field's value.
  10953. func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
  10954. s.Expiration = &v
  10955. return s
  10956. }
  10957. // SetExpires sets the Expires field's value.
  10958. func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
  10959. s.Expires = &v
  10960. return s
  10961. }
  10962. // SetLastModified sets the LastModified field's value.
  10963. func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
  10964. s.LastModified = &v
  10965. return s
  10966. }
  10967. // SetMetadata sets the Metadata field's value.
  10968. func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
  10969. s.Metadata = v
  10970. return s
  10971. }
  10972. // SetMissingMeta sets the MissingMeta field's value.
  10973. func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
  10974. s.MissingMeta = &v
  10975. return s
  10976. }
  10977. // SetPartsCount sets the PartsCount field's value.
  10978. func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
  10979. s.PartsCount = &v
  10980. return s
  10981. }
  10982. // SetReplicationStatus sets the ReplicationStatus field's value.
  10983. func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
  10984. s.ReplicationStatus = &v
  10985. return s
  10986. }
  10987. // SetRequestCharged sets the RequestCharged field's value.
  10988. func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
  10989. s.RequestCharged = &v
  10990. return s
  10991. }
  10992. // SetRestore sets the Restore field's value.
  10993. func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
  10994. s.Restore = &v
  10995. return s
  10996. }
  10997. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  10998. func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
  10999. s.SSECustomerAlgorithm = &v
  11000. return s
  11001. }
  11002. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  11003. func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
  11004. s.SSECustomerKeyMD5 = &v
  11005. return s
  11006. }
  11007. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  11008. func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
  11009. s.SSEKMSKeyId = &v
  11010. return s
  11011. }
  11012. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  11013. func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
  11014. s.ServerSideEncryption = &v
  11015. return s
  11016. }
  11017. // SetStorageClass sets the StorageClass field's value.
  11018. func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
  11019. s.StorageClass = &v
  11020. return s
  11021. }
  11022. // SetVersionId sets the VersionId field's value.
  11023. func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
  11024. s.VersionId = &v
  11025. return s
  11026. }
  11027. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  11028. func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
  11029. s.WebsiteRedirectLocation = &v
  11030. return s
  11031. }
  11032. type IndexDocument struct {
  11033. _ struct{} `type:"structure"`
  11034. // A suffix that is appended to a request that is for a directory on the website
  11035. // endpoint (e.g. if the suffix is index.html and you make a request to samplebucket/images/
  11036. // the data that is returned will be for the object with the key name images/index.html)
  11037. // The suffix must not be empty and must not include a slash character.
  11038. //
  11039. // Suffix is a required field
  11040. Suffix *string `type:"string" required:"true"`
  11041. }
  11042. // String returns the string representation
  11043. func (s IndexDocument) String() string {
  11044. return awsutil.Prettify(s)
  11045. }
  11046. // GoString returns the string representation
  11047. func (s IndexDocument) GoString() string {
  11048. return s.String()
  11049. }
  11050. // Validate inspects the fields of the type to determine if they are valid.
  11051. func (s *IndexDocument) Validate() error {
  11052. invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
  11053. if s.Suffix == nil {
  11054. invalidParams.Add(request.NewErrParamRequired("Suffix"))
  11055. }
  11056. if invalidParams.Len() > 0 {
  11057. return invalidParams
  11058. }
  11059. return nil
  11060. }
  11061. // SetSuffix sets the Suffix field's value.
  11062. func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
  11063. s.Suffix = &v
  11064. return s
  11065. }
  11066. type Initiator struct {
  11067. _ struct{} `type:"structure"`
  11068. // Name of the Principal.
  11069. DisplayName *string `type:"string"`
  11070. // If the principal is an AWS account, it provides the Canonical User ID. If
  11071. // the principal is an IAM User, it provides a user ARN value.
  11072. ID *string `type:"string"`
  11073. }
  11074. // String returns the string representation
  11075. func (s Initiator) String() string {
  11076. return awsutil.Prettify(s)
  11077. }
  11078. // GoString returns the string representation
  11079. func (s Initiator) GoString() string {
  11080. return s.String()
  11081. }
  11082. // SetDisplayName sets the DisplayName field's value.
  11083. func (s *Initiator) SetDisplayName(v string) *Initiator {
  11084. s.DisplayName = &v
  11085. return s
  11086. }
  11087. // SetID sets the ID field's value.
  11088. func (s *Initiator) SetID(v string) *Initiator {
  11089. s.ID = &v
  11090. return s
  11091. }
  11092. // Describes the serialization format of the object.
  11093. type InputSerialization struct {
  11094. _ struct{} `type:"structure"`
  11095. // Describes the serialization of a CSV-encoded object.
  11096. CSV *CSVInput `type:"structure"`
  11097. // Specifies object's compression format. Valid values: NONE, GZIP. Default
  11098. // Value: NONE.
  11099. CompressionType *string `type:"string" enum:"CompressionType"`
  11100. // Specifies JSON as object's input serialization format.
  11101. JSON *JSONInput `type:"structure"`
  11102. }
  11103. // String returns the string representation
  11104. func (s InputSerialization) String() string {
  11105. return awsutil.Prettify(s)
  11106. }
  11107. // GoString returns the string representation
  11108. func (s InputSerialization) GoString() string {
  11109. return s.String()
  11110. }
  11111. // SetCSV sets the CSV field's value.
  11112. func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
  11113. s.CSV = v
  11114. return s
  11115. }
  11116. // SetCompressionType sets the CompressionType field's value.
  11117. func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
  11118. s.CompressionType = &v
  11119. return s
  11120. }
  11121. // SetJSON sets the JSON field's value.
  11122. func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
  11123. s.JSON = v
  11124. return s
  11125. }
  11126. type InventoryConfiguration struct {
  11127. _ struct{} `type:"structure"`
  11128. // Contains information about where to publish the inventory results.
  11129. //
  11130. // Destination is a required field
  11131. Destination *InventoryDestination `type:"structure" required:"true"`
  11132. // Specifies an inventory filter. The inventory only includes objects that meet
  11133. // the filter's criteria.
  11134. Filter *InventoryFilter `type:"structure"`
  11135. // The ID used to identify the inventory configuration.
  11136. //
  11137. // Id is a required field
  11138. Id *string `type:"string" required:"true"`
  11139. // Specifies which object version(s) to included in the inventory results.
  11140. //
  11141. // IncludedObjectVersions is a required field
  11142. IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
  11143. // Specifies whether the inventory is enabled or disabled.
  11144. //
  11145. // IsEnabled is a required field
  11146. IsEnabled *bool `type:"boolean" required:"true"`
  11147. // Contains the optional fields that are included in the inventory results.
  11148. OptionalFields []*string `locationNameList:"Field" type:"list"`
  11149. // Specifies the schedule for generating inventory results.
  11150. //
  11151. // Schedule is a required field
  11152. Schedule *InventorySchedule `type:"structure" required:"true"`
  11153. }
  11154. // String returns the string representation
  11155. func (s InventoryConfiguration) String() string {
  11156. return awsutil.Prettify(s)
  11157. }
  11158. // GoString returns the string representation
  11159. func (s InventoryConfiguration) GoString() string {
  11160. return s.String()
  11161. }
  11162. // Validate inspects the fields of the type to determine if they are valid.
  11163. func (s *InventoryConfiguration) Validate() error {
  11164. invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
  11165. if s.Destination == nil {
  11166. invalidParams.Add(request.NewErrParamRequired("Destination"))
  11167. }
  11168. if s.Id == nil {
  11169. invalidParams.Add(request.NewErrParamRequired("Id"))
  11170. }
  11171. if s.IncludedObjectVersions == nil {
  11172. invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
  11173. }
  11174. if s.IsEnabled == nil {
  11175. invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
  11176. }
  11177. if s.Schedule == nil {
  11178. invalidParams.Add(request.NewErrParamRequired("Schedule"))
  11179. }
  11180. if s.Destination != nil {
  11181. if err := s.Destination.Validate(); err != nil {
  11182. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  11183. }
  11184. }
  11185. if s.Filter != nil {
  11186. if err := s.Filter.Validate(); err != nil {
  11187. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11188. }
  11189. }
  11190. if s.Schedule != nil {
  11191. if err := s.Schedule.Validate(); err != nil {
  11192. invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
  11193. }
  11194. }
  11195. if invalidParams.Len() > 0 {
  11196. return invalidParams
  11197. }
  11198. return nil
  11199. }
  11200. // SetDestination sets the Destination field's value.
  11201. func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
  11202. s.Destination = v
  11203. return s
  11204. }
  11205. // SetFilter sets the Filter field's value.
  11206. func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
  11207. s.Filter = v
  11208. return s
  11209. }
  11210. // SetId sets the Id field's value.
  11211. func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
  11212. s.Id = &v
  11213. return s
  11214. }
  11215. // SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
  11216. func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
  11217. s.IncludedObjectVersions = &v
  11218. return s
  11219. }
  11220. // SetIsEnabled sets the IsEnabled field's value.
  11221. func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
  11222. s.IsEnabled = &v
  11223. return s
  11224. }
  11225. // SetOptionalFields sets the OptionalFields field's value.
  11226. func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
  11227. s.OptionalFields = v
  11228. return s
  11229. }
  11230. // SetSchedule sets the Schedule field's value.
  11231. func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
  11232. s.Schedule = v
  11233. return s
  11234. }
  11235. type InventoryDestination struct {
  11236. _ struct{} `type:"structure"`
  11237. // Contains the bucket name, file format, bucket owner (optional), and prefix
  11238. // (optional) where inventory results are published.
  11239. //
  11240. // S3BucketDestination is a required field
  11241. S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
  11242. }
  11243. // String returns the string representation
  11244. func (s InventoryDestination) String() string {
  11245. return awsutil.Prettify(s)
  11246. }
  11247. // GoString returns the string representation
  11248. func (s InventoryDestination) GoString() string {
  11249. return s.String()
  11250. }
  11251. // Validate inspects the fields of the type to determine if they are valid.
  11252. func (s *InventoryDestination) Validate() error {
  11253. invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
  11254. if s.S3BucketDestination == nil {
  11255. invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
  11256. }
  11257. if s.S3BucketDestination != nil {
  11258. if err := s.S3BucketDestination.Validate(); err != nil {
  11259. invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
  11260. }
  11261. }
  11262. if invalidParams.Len() > 0 {
  11263. return invalidParams
  11264. }
  11265. return nil
  11266. }
  11267. // SetS3BucketDestination sets the S3BucketDestination field's value.
  11268. func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
  11269. s.S3BucketDestination = v
  11270. return s
  11271. }
  11272. // Contains the type of server-side encryption used to encrypt the inventory
  11273. // results.
  11274. type InventoryEncryption struct {
  11275. _ struct{} `type:"structure"`
  11276. // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
  11277. SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
  11278. // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
  11279. SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
  11280. }
  11281. // String returns the string representation
  11282. func (s InventoryEncryption) String() string {
  11283. return awsutil.Prettify(s)
  11284. }
  11285. // GoString returns the string representation
  11286. func (s InventoryEncryption) GoString() string {
  11287. return s.String()
  11288. }
  11289. // Validate inspects the fields of the type to determine if they are valid.
  11290. func (s *InventoryEncryption) Validate() error {
  11291. invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
  11292. if s.SSEKMS != nil {
  11293. if err := s.SSEKMS.Validate(); err != nil {
  11294. invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
  11295. }
  11296. }
  11297. if invalidParams.Len() > 0 {
  11298. return invalidParams
  11299. }
  11300. return nil
  11301. }
  11302. // SetSSEKMS sets the SSEKMS field's value.
  11303. func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
  11304. s.SSEKMS = v
  11305. return s
  11306. }
  11307. // SetSSES3 sets the SSES3 field's value.
  11308. func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
  11309. s.SSES3 = v
  11310. return s
  11311. }
  11312. type InventoryFilter struct {
  11313. _ struct{} `type:"structure"`
  11314. // The prefix that an object must have to be included in the inventory results.
  11315. //
  11316. // Prefix is a required field
  11317. Prefix *string `type:"string" required:"true"`
  11318. }
  11319. // String returns the string representation
  11320. func (s InventoryFilter) String() string {
  11321. return awsutil.Prettify(s)
  11322. }
  11323. // GoString returns the string representation
  11324. func (s InventoryFilter) GoString() string {
  11325. return s.String()
  11326. }
  11327. // Validate inspects the fields of the type to determine if they are valid.
  11328. func (s *InventoryFilter) Validate() error {
  11329. invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
  11330. if s.Prefix == nil {
  11331. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  11332. }
  11333. if invalidParams.Len() > 0 {
  11334. return invalidParams
  11335. }
  11336. return nil
  11337. }
  11338. // SetPrefix sets the Prefix field's value.
  11339. func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
  11340. s.Prefix = &v
  11341. return s
  11342. }
  11343. type InventoryS3BucketDestination struct {
  11344. _ struct{} `type:"structure"`
  11345. // The ID of the account that owns the destination bucket.
  11346. AccountId *string `type:"string"`
  11347. // The Amazon resource name (ARN) of the bucket where inventory results will
  11348. // be published.
  11349. //
  11350. // Bucket is a required field
  11351. Bucket *string `type:"string" required:"true"`
  11352. // Contains the type of server-side encryption used to encrypt the inventory
  11353. // results.
  11354. Encryption *InventoryEncryption `type:"structure"`
  11355. // Specifies the output format of the inventory results.
  11356. //
  11357. // Format is a required field
  11358. Format *string `type:"string" required:"true" enum:"InventoryFormat"`
  11359. // The prefix that is prepended to all inventory results.
  11360. Prefix *string `type:"string"`
  11361. }
  11362. // String returns the string representation
  11363. func (s InventoryS3BucketDestination) String() string {
  11364. return awsutil.Prettify(s)
  11365. }
  11366. // GoString returns the string representation
  11367. func (s InventoryS3BucketDestination) GoString() string {
  11368. return s.String()
  11369. }
  11370. // Validate inspects the fields of the type to determine if they are valid.
  11371. func (s *InventoryS3BucketDestination) Validate() error {
  11372. invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
  11373. if s.Bucket == nil {
  11374. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11375. }
  11376. if s.Format == nil {
  11377. invalidParams.Add(request.NewErrParamRequired("Format"))
  11378. }
  11379. if s.Encryption != nil {
  11380. if err := s.Encryption.Validate(); err != nil {
  11381. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  11382. }
  11383. }
  11384. if invalidParams.Len() > 0 {
  11385. return invalidParams
  11386. }
  11387. return nil
  11388. }
  11389. // SetAccountId sets the AccountId field's value.
  11390. func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
  11391. s.AccountId = &v
  11392. return s
  11393. }
  11394. // SetBucket sets the Bucket field's value.
  11395. func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
  11396. s.Bucket = &v
  11397. return s
  11398. }
  11399. func (s *InventoryS3BucketDestination) getBucket() (v string) {
  11400. if s.Bucket == nil {
  11401. return v
  11402. }
  11403. return *s.Bucket
  11404. }
  11405. // SetEncryption sets the Encryption field's value.
  11406. func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
  11407. s.Encryption = v
  11408. return s
  11409. }
  11410. // SetFormat sets the Format field's value.
  11411. func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
  11412. s.Format = &v
  11413. return s
  11414. }
  11415. // SetPrefix sets the Prefix field's value.
  11416. func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
  11417. s.Prefix = &v
  11418. return s
  11419. }
  11420. type InventorySchedule struct {
  11421. _ struct{} `type:"structure"`
  11422. // Specifies how frequently inventory results are produced.
  11423. //
  11424. // Frequency is a required field
  11425. Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
  11426. }
  11427. // String returns the string representation
  11428. func (s InventorySchedule) String() string {
  11429. return awsutil.Prettify(s)
  11430. }
  11431. // GoString returns the string representation
  11432. func (s InventorySchedule) GoString() string {
  11433. return s.String()
  11434. }
  11435. // Validate inspects the fields of the type to determine if they are valid.
  11436. func (s *InventorySchedule) Validate() error {
  11437. invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
  11438. if s.Frequency == nil {
  11439. invalidParams.Add(request.NewErrParamRequired("Frequency"))
  11440. }
  11441. if invalidParams.Len() > 0 {
  11442. return invalidParams
  11443. }
  11444. return nil
  11445. }
  11446. // SetFrequency sets the Frequency field's value.
  11447. func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
  11448. s.Frequency = &v
  11449. return s
  11450. }
  11451. type JSONInput struct {
  11452. _ struct{} `type:"structure"`
  11453. // The type of JSON. Valid values: Document, Lines.
  11454. Type *string `type:"string" enum:"JSONType"`
  11455. }
  11456. // String returns the string representation
  11457. func (s JSONInput) String() string {
  11458. return awsutil.Prettify(s)
  11459. }
  11460. // GoString returns the string representation
  11461. func (s JSONInput) GoString() string {
  11462. return s.String()
  11463. }
  11464. // SetType sets the Type field's value.
  11465. func (s *JSONInput) SetType(v string) *JSONInput {
  11466. s.Type = &v
  11467. return s
  11468. }
  11469. type JSONOutput struct {
  11470. _ struct{} `type:"structure"`
  11471. // The value used to separate individual records in the output.
  11472. RecordDelimiter *string `type:"string"`
  11473. }
  11474. // String returns the string representation
  11475. func (s JSONOutput) String() string {
  11476. return awsutil.Prettify(s)
  11477. }
  11478. // GoString returns the string representation
  11479. func (s JSONOutput) GoString() string {
  11480. return s.String()
  11481. }
  11482. // SetRecordDelimiter sets the RecordDelimiter field's value.
  11483. func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
  11484. s.RecordDelimiter = &v
  11485. return s
  11486. }
  11487. // Container for object key name prefix and suffix filtering rules.
  11488. type KeyFilter struct {
  11489. _ struct{} `type:"structure"`
  11490. // A list of containers for key value pair that defines the criteria for the
  11491. // filter rule.
  11492. FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
  11493. }
  11494. // String returns the string representation
  11495. func (s KeyFilter) String() string {
  11496. return awsutil.Prettify(s)
  11497. }
  11498. // GoString returns the string representation
  11499. func (s KeyFilter) GoString() string {
  11500. return s.String()
  11501. }
  11502. // SetFilterRules sets the FilterRules field's value.
  11503. func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
  11504. s.FilterRules = v
  11505. return s
  11506. }
  11507. // Container for specifying the AWS Lambda notification configuration.
  11508. type LambdaFunctionConfiguration struct {
  11509. _ struct{} `type:"structure"`
  11510. // Events is a required field
  11511. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  11512. // Container for object key name filtering rules. For information about key
  11513. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  11514. Filter *NotificationConfigurationFilter `type:"structure"`
  11515. // Optional unique identifier for configurations in a notification configuration.
  11516. // If you don't provide one, Amazon S3 will assign an ID.
  11517. Id *string `type:"string"`
  11518. // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
  11519. // of the specified type.
  11520. //
  11521. // LambdaFunctionArn is a required field
  11522. LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
  11523. }
  11524. // String returns the string representation
  11525. func (s LambdaFunctionConfiguration) String() string {
  11526. return awsutil.Prettify(s)
  11527. }
  11528. // GoString returns the string representation
  11529. func (s LambdaFunctionConfiguration) GoString() string {
  11530. return s.String()
  11531. }
  11532. // Validate inspects the fields of the type to determine if they are valid.
  11533. func (s *LambdaFunctionConfiguration) Validate() error {
  11534. invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
  11535. if s.Events == nil {
  11536. invalidParams.Add(request.NewErrParamRequired("Events"))
  11537. }
  11538. if s.LambdaFunctionArn == nil {
  11539. invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
  11540. }
  11541. if invalidParams.Len() > 0 {
  11542. return invalidParams
  11543. }
  11544. return nil
  11545. }
  11546. // SetEvents sets the Events field's value.
  11547. func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
  11548. s.Events = v
  11549. return s
  11550. }
  11551. // SetFilter sets the Filter field's value.
  11552. func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
  11553. s.Filter = v
  11554. return s
  11555. }
  11556. // SetId sets the Id field's value.
  11557. func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
  11558. s.Id = &v
  11559. return s
  11560. }
  11561. // SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
  11562. func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
  11563. s.LambdaFunctionArn = &v
  11564. return s
  11565. }
  11566. type LifecycleConfiguration struct {
  11567. _ struct{} `type:"structure"`
  11568. // Rules is a required field
  11569. Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  11570. }
  11571. // String returns the string representation
  11572. func (s LifecycleConfiguration) String() string {
  11573. return awsutil.Prettify(s)
  11574. }
  11575. // GoString returns the string representation
  11576. func (s LifecycleConfiguration) GoString() string {
  11577. return s.String()
  11578. }
  11579. // Validate inspects the fields of the type to determine if they are valid.
  11580. func (s *LifecycleConfiguration) Validate() error {
  11581. invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
  11582. if s.Rules == nil {
  11583. invalidParams.Add(request.NewErrParamRequired("Rules"))
  11584. }
  11585. if s.Rules != nil {
  11586. for i, v := range s.Rules {
  11587. if v == nil {
  11588. continue
  11589. }
  11590. if err := v.Validate(); err != nil {
  11591. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  11592. }
  11593. }
  11594. }
  11595. if invalidParams.Len() > 0 {
  11596. return invalidParams
  11597. }
  11598. return nil
  11599. }
  11600. // SetRules sets the Rules field's value.
  11601. func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
  11602. s.Rules = v
  11603. return s
  11604. }
  11605. type LifecycleExpiration struct {
  11606. _ struct{} `type:"structure"`
  11607. // Indicates at what date the object is to be moved or deleted. Should be in
  11608. // GMT ISO 8601 Format.
  11609. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  11610. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  11611. // The value must be a non-zero positive integer.
  11612. Days *int64 `type:"integer"`
  11613. // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
  11614. // versions. If set to true, the delete marker will be expired; if set to false
  11615. // the policy takes no action. This cannot be specified with Days or Date in
  11616. // a Lifecycle Expiration Policy.
  11617. ExpiredObjectDeleteMarker *bool `type:"boolean"`
  11618. }
  11619. // String returns the string representation
  11620. func (s LifecycleExpiration) String() string {
  11621. return awsutil.Prettify(s)
  11622. }
  11623. // GoString returns the string representation
  11624. func (s LifecycleExpiration) GoString() string {
  11625. return s.String()
  11626. }
  11627. // SetDate sets the Date field's value.
  11628. func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
  11629. s.Date = &v
  11630. return s
  11631. }
  11632. // SetDays sets the Days field's value.
  11633. func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
  11634. s.Days = &v
  11635. return s
  11636. }
  11637. // SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
  11638. func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
  11639. s.ExpiredObjectDeleteMarker = &v
  11640. return s
  11641. }
  11642. type LifecycleRule struct {
  11643. _ struct{} `type:"structure"`
  11644. // Specifies the days since the initiation of an Incomplete Multipart Upload
  11645. // that Lifecycle will wait before permanently removing all parts of the upload.
  11646. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  11647. Expiration *LifecycleExpiration `type:"structure"`
  11648. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11649. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11650. Filter *LifecycleRuleFilter `type:"structure"`
  11651. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  11652. ID *string `type:"string"`
  11653. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  11654. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  11655. // configuration action on a bucket that has versioning enabled (or suspended)
  11656. // to request that Amazon S3 delete noncurrent object versions at a specific
  11657. // period in the object's lifetime.
  11658. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  11659. NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
  11660. // Prefix identifying one or more objects to which the rule applies. This is
  11661. // deprecated; use Filter instead.
  11662. Prefix *string `deprecated:"true" type:"string"`
  11663. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  11664. // is not currently being applied.
  11665. //
  11666. // Status is a required field
  11667. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  11668. Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
  11669. }
  11670. // String returns the string representation
  11671. func (s LifecycleRule) String() string {
  11672. return awsutil.Prettify(s)
  11673. }
  11674. // GoString returns the string representation
  11675. func (s LifecycleRule) GoString() string {
  11676. return s.String()
  11677. }
  11678. // Validate inspects the fields of the type to determine if they are valid.
  11679. func (s *LifecycleRule) Validate() error {
  11680. invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
  11681. if s.Status == nil {
  11682. invalidParams.Add(request.NewErrParamRequired("Status"))
  11683. }
  11684. if s.Filter != nil {
  11685. if err := s.Filter.Validate(); err != nil {
  11686. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  11687. }
  11688. }
  11689. if invalidParams.Len() > 0 {
  11690. return invalidParams
  11691. }
  11692. return nil
  11693. }
  11694. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  11695. func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
  11696. s.AbortIncompleteMultipartUpload = v
  11697. return s
  11698. }
  11699. // SetExpiration sets the Expiration field's value.
  11700. func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
  11701. s.Expiration = v
  11702. return s
  11703. }
  11704. // SetFilter sets the Filter field's value.
  11705. func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
  11706. s.Filter = v
  11707. return s
  11708. }
  11709. // SetID sets the ID field's value.
  11710. func (s *LifecycleRule) SetID(v string) *LifecycleRule {
  11711. s.ID = &v
  11712. return s
  11713. }
  11714. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  11715. func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
  11716. s.NoncurrentVersionExpiration = v
  11717. return s
  11718. }
  11719. // SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
  11720. func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
  11721. s.NoncurrentVersionTransitions = v
  11722. return s
  11723. }
  11724. // SetPrefix sets the Prefix field's value.
  11725. func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
  11726. s.Prefix = &v
  11727. return s
  11728. }
  11729. // SetStatus sets the Status field's value.
  11730. func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
  11731. s.Status = &v
  11732. return s
  11733. }
  11734. // SetTransitions sets the Transitions field's value.
  11735. func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
  11736. s.Transitions = v
  11737. return s
  11738. }
  11739. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11740. // more predicates. The Lifecycle Rule will apply to any object matching all
  11741. // of the predicates configured inside the And operator.
  11742. type LifecycleRuleAndOperator struct {
  11743. _ struct{} `type:"structure"`
  11744. Prefix *string `type:"string"`
  11745. // All of these tags must exist in the object's tag set in order for the rule
  11746. // to apply.
  11747. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  11748. }
  11749. // String returns the string representation
  11750. func (s LifecycleRuleAndOperator) String() string {
  11751. return awsutil.Prettify(s)
  11752. }
  11753. // GoString returns the string representation
  11754. func (s LifecycleRuleAndOperator) GoString() string {
  11755. return s.String()
  11756. }
  11757. // Validate inspects the fields of the type to determine if they are valid.
  11758. func (s *LifecycleRuleAndOperator) Validate() error {
  11759. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
  11760. if s.Tags != nil {
  11761. for i, v := range s.Tags {
  11762. if v == nil {
  11763. continue
  11764. }
  11765. if err := v.Validate(); err != nil {
  11766. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  11767. }
  11768. }
  11769. }
  11770. if invalidParams.Len() > 0 {
  11771. return invalidParams
  11772. }
  11773. return nil
  11774. }
  11775. // SetPrefix sets the Prefix field's value.
  11776. func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
  11777. s.Prefix = &v
  11778. return s
  11779. }
  11780. // SetTags sets the Tags field's value.
  11781. func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
  11782. s.Tags = v
  11783. return s
  11784. }
  11785. // The Filter is used to identify objects that a Lifecycle Rule applies to.
  11786. // A Filter must have exactly one of Prefix, Tag, or And specified.
  11787. type LifecycleRuleFilter struct {
  11788. _ struct{} `type:"structure"`
  11789. // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
  11790. // more predicates. The Lifecycle Rule will apply to any object matching all
  11791. // of the predicates configured inside the And operator.
  11792. And *LifecycleRuleAndOperator `type:"structure"`
  11793. // Prefix identifying one or more objects to which the rule applies.
  11794. Prefix *string `type:"string"`
  11795. // This tag must exist in the object's tag set in order for the rule to apply.
  11796. Tag *Tag `type:"structure"`
  11797. }
  11798. // String returns the string representation
  11799. func (s LifecycleRuleFilter) String() string {
  11800. return awsutil.Prettify(s)
  11801. }
  11802. // GoString returns the string representation
  11803. func (s LifecycleRuleFilter) GoString() string {
  11804. return s.String()
  11805. }
  11806. // Validate inspects the fields of the type to determine if they are valid.
  11807. func (s *LifecycleRuleFilter) Validate() error {
  11808. invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
  11809. if s.And != nil {
  11810. if err := s.And.Validate(); err != nil {
  11811. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  11812. }
  11813. }
  11814. if s.Tag != nil {
  11815. if err := s.Tag.Validate(); err != nil {
  11816. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  11817. }
  11818. }
  11819. if invalidParams.Len() > 0 {
  11820. return invalidParams
  11821. }
  11822. return nil
  11823. }
  11824. // SetAnd sets the And field's value.
  11825. func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
  11826. s.And = v
  11827. return s
  11828. }
  11829. // SetPrefix sets the Prefix field's value.
  11830. func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
  11831. s.Prefix = &v
  11832. return s
  11833. }
  11834. // SetTag sets the Tag field's value.
  11835. func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
  11836. s.Tag = v
  11837. return s
  11838. }
  11839. type ListBucketAnalyticsConfigurationsInput struct {
  11840. _ struct{} `type:"structure"`
  11841. // The name of the bucket from which analytics configurations are retrieved.
  11842. //
  11843. // Bucket is a required field
  11844. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11845. // The ContinuationToken that represents a placeholder from where this request
  11846. // should begin.
  11847. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11848. }
  11849. // String returns the string representation
  11850. func (s ListBucketAnalyticsConfigurationsInput) String() string {
  11851. return awsutil.Prettify(s)
  11852. }
  11853. // GoString returns the string representation
  11854. func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
  11855. return s.String()
  11856. }
  11857. // Validate inspects the fields of the type to determine if they are valid.
  11858. func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
  11859. invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
  11860. if s.Bucket == nil {
  11861. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11862. }
  11863. if invalidParams.Len() > 0 {
  11864. return invalidParams
  11865. }
  11866. return nil
  11867. }
  11868. // SetBucket sets the Bucket field's value.
  11869. func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
  11870. s.Bucket = &v
  11871. return s
  11872. }
  11873. func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
  11874. if s.Bucket == nil {
  11875. return v
  11876. }
  11877. return *s.Bucket
  11878. }
  11879. // SetContinuationToken sets the ContinuationToken field's value.
  11880. func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
  11881. s.ContinuationToken = &v
  11882. return s
  11883. }
  11884. type ListBucketAnalyticsConfigurationsOutput struct {
  11885. _ struct{} `type:"structure"`
  11886. // The list of analytics configurations for a bucket.
  11887. AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
  11888. // The ContinuationToken that represents where this request began.
  11889. ContinuationToken *string `type:"string"`
  11890. // Indicates whether the returned list of analytics configurations is complete.
  11891. // A value of true indicates that the list is not complete and the NextContinuationToken
  11892. // will be provided for a subsequent request.
  11893. IsTruncated *bool `type:"boolean"`
  11894. // NextContinuationToken is sent when isTruncated is true, which indicates that
  11895. // there are more analytics configurations to list. The next request must include
  11896. // this NextContinuationToken. The token is obfuscated and is not a usable value.
  11897. NextContinuationToken *string `type:"string"`
  11898. }
  11899. // String returns the string representation
  11900. func (s ListBucketAnalyticsConfigurationsOutput) String() string {
  11901. return awsutil.Prettify(s)
  11902. }
  11903. // GoString returns the string representation
  11904. func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
  11905. return s.String()
  11906. }
  11907. // SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
  11908. func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
  11909. s.AnalyticsConfigurationList = v
  11910. return s
  11911. }
  11912. // SetContinuationToken sets the ContinuationToken field's value.
  11913. func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  11914. s.ContinuationToken = &v
  11915. return s
  11916. }
  11917. // SetIsTruncated sets the IsTruncated field's value.
  11918. func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
  11919. s.IsTruncated = &v
  11920. return s
  11921. }
  11922. // SetNextContinuationToken sets the NextContinuationToken field's value.
  11923. func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
  11924. s.NextContinuationToken = &v
  11925. return s
  11926. }
  11927. type ListBucketInventoryConfigurationsInput struct {
  11928. _ struct{} `type:"structure"`
  11929. // The name of the bucket containing the inventory configurations to retrieve.
  11930. //
  11931. // Bucket is a required field
  11932. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  11933. // The marker used to continue an inventory configuration listing that has been
  11934. // truncated. Use the NextContinuationToken from a previously truncated list
  11935. // response to continue the listing. The continuation token is an opaque value
  11936. // that Amazon S3 understands.
  11937. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  11938. }
  11939. // String returns the string representation
  11940. func (s ListBucketInventoryConfigurationsInput) String() string {
  11941. return awsutil.Prettify(s)
  11942. }
  11943. // GoString returns the string representation
  11944. func (s ListBucketInventoryConfigurationsInput) GoString() string {
  11945. return s.String()
  11946. }
  11947. // Validate inspects the fields of the type to determine if they are valid.
  11948. func (s *ListBucketInventoryConfigurationsInput) Validate() error {
  11949. invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
  11950. if s.Bucket == nil {
  11951. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  11952. }
  11953. if invalidParams.Len() > 0 {
  11954. return invalidParams
  11955. }
  11956. return nil
  11957. }
  11958. // SetBucket sets the Bucket field's value.
  11959. func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
  11960. s.Bucket = &v
  11961. return s
  11962. }
  11963. func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
  11964. if s.Bucket == nil {
  11965. return v
  11966. }
  11967. return *s.Bucket
  11968. }
  11969. // SetContinuationToken sets the ContinuationToken field's value.
  11970. func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
  11971. s.ContinuationToken = &v
  11972. return s
  11973. }
  11974. type ListBucketInventoryConfigurationsOutput struct {
  11975. _ struct{} `type:"structure"`
  11976. // If sent in the request, the marker that is used as a starting point for this
  11977. // inventory configuration list response.
  11978. ContinuationToken *string `type:"string"`
  11979. // The list of inventory configurations for a bucket.
  11980. InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
  11981. // Indicates whether the returned list of inventory configurations is truncated
  11982. // in this response. A value of true indicates that the list is truncated.
  11983. IsTruncated *bool `type:"boolean"`
  11984. // The marker used to continue this inventory configuration listing. Use the
  11985. // NextContinuationToken from this response to continue the listing in a subsequent
  11986. // request. The continuation token is an opaque value that Amazon S3 understands.
  11987. NextContinuationToken *string `type:"string"`
  11988. }
  11989. // String returns the string representation
  11990. func (s ListBucketInventoryConfigurationsOutput) String() string {
  11991. return awsutil.Prettify(s)
  11992. }
  11993. // GoString returns the string representation
  11994. func (s ListBucketInventoryConfigurationsOutput) GoString() string {
  11995. return s.String()
  11996. }
  11997. // SetContinuationToken sets the ContinuationToken field's value.
  11998. func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  11999. s.ContinuationToken = &v
  12000. return s
  12001. }
  12002. // SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
  12003. func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
  12004. s.InventoryConfigurationList = v
  12005. return s
  12006. }
  12007. // SetIsTruncated sets the IsTruncated field's value.
  12008. func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
  12009. s.IsTruncated = &v
  12010. return s
  12011. }
  12012. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12013. func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
  12014. s.NextContinuationToken = &v
  12015. return s
  12016. }
  12017. type ListBucketMetricsConfigurationsInput struct {
  12018. _ struct{} `type:"structure"`
  12019. // The name of the bucket containing the metrics configurations to retrieve.
  12020. //
  12021. // Bucket is a required field
  12022. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12023. // The marker that is used to continue a metrics configuration listing that
  12024. // has been truncated. Use the NextContinuationToken from a previously truncated
  12025. // list response to continue the listing. The continuation token is an opaque
  12026. // value that Amazon S3 understands.
  12027. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12028. }
  12029. // String returns the string representation
  12030. func (s ListBucketMetricsConfigurationsInput) String() string {
  12031. return awsutil.Prettify(s)
  12032. }
  12033. // GoString returns the string representation
  12034. func (s ListBucketMetricsConfigurationsInput) GoString() string {
  12035. return s.String()
  12036. }
  12037. // Validate inspects the fields of the type to determine if they are valid.
  12038. func (s *ListBucketMetricsConfigurationsInput) Validate() error {
  12039. invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
  12040. if s.Bucket == nil {
  12041. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12042. }
  12043. if invalidParams.Len() > 0 {
  12044. return invalidParams
  12045. }
  12046. return nil
  12047. }
  12048. // SetBucket sets the Bucket field's value.
  12049. func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
  12050. s.Bucket = &v
  12051. return s
  12052. }
  12053. func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
  12054. if s.Bucket == nil {
  12055. return v
  12056. }
  12057. return *s.Bucket
  12058. }
  12059. // SetContinuationToken sets the ContinuationToken field's value.
  12060. func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
  12061. s.ContinuationToken = &v
  12062. return s
  12063. }
  12064. type ListBucketMetricsConfigurationsOutput struct {
  12065. _ struct{} `type:"structure"`
  12066. // The marker that is used as a starting point for this metrics configuration
  12067. // list response. This value is present if it was sent in the request.
  12068. ContinuationToken *string `type:"string"`
  12069. // Indicates whether the returned list of metrics configurations is complete.
  12070. // A value of true indicates that the list is not complete and the NextContinuationToken
  12071. // will be provided for a subsequent request.
  12072. IsTruncated *bool `type:"boolean"`
  12073. // The list of metrics configurations for a bucket.
  12074. MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
  12075. // The marker used to continue a metrics configuration listing that has been
  12076. // truncated. Use the NextContinuationToken from a previously truncated list
  12077. // response to continue the listing. The continuation token is an opaque value
  12078. // that Amazon S3 understands.
  12079. NextContinuationToken *string `type:"string"`
  12080. }
  12081. // String returns the string representation
  12082. func (s ListBucketMetricsConfigurationsOutput) String() string {
  12083. return awsutil.Prettify(s)
  12084. }
  12085. // GoString returns the string representation
  12086. func (s ListBucketMetricsConfigurationsOutput) GoString() string {
  12087. return s.String()
  12088. }
  12089. // SetContinuationToken sets the ContinuationToken field's value.
  12090. func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  12091. s.ContinuationToken = &v
  12092. return s
  12093. }
  12094. // SetIsTruncated sets the IsTruncated field's value.
  12095. func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
  12096. s.IsTruncated = &v
  12097. return s
  12098. }
  12099. // SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
  12100. func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
  12101. s.MetricsConfigurationList = v
  12102. return s
  12103. }
  12104. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12105. func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
  12106. s.NextContinuationToken = &v
  12107. return s
  12108. }
  12109. type ListBucketsInput struct {
  12110. _ struct{} `type:"structure"`
  12111. }
  12112. // String returns the string representation
  12113. func (s ListBucketsInput) String() string {
  12114. return awsutil.Prettify(s)
  12115. }
  12116. // GoString returns the string representation
  12117. func (s ListBucketsInput) GoString() string {
  12118. return s.String()
  12119. }
  12120. type ListBucketsOutput struct {
  12121. _ struct{} `type:"structure"`
  12122. Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
  12123. Owner *Owner `type:"structure"`
  12124. }
  12125. // String returns the string representation
  12126. func (s ListBucketsOutput) String() string {
  12127. return awsutil.Prettify(s)
  12128. }
  12129. // GoString returns the string representation
  12130. func (s ListBucketsOutput) GoString() string {
  12131. return s.String()
  12132. }
  12133. // SetBuckets sets the Buckets field's value.
  12134. func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
  12135. s.Buckets = v
  12136. return s
  12137. }
  12138. // SetOwner sets the Owner field's value.
  12139. func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
  12140. s.Owner = v
  12141. return s
  12142. }
  12143. type ListMultipartUploadsInput struct {
  12144. _ struct{} `type:"structure"`
  12145. // Bucket is a required field
  12146. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12147. // Character you use to group keys.
  12148. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12149. // Requests Amazon S3 to encode the object keys in the response and specifies
  12150. // the encoding method to use. An object key may contain any Unicode character;
  12151. // however, XML 1.0 parser cannot parse some characters, such as characters
  12152. // with an ASCII value from 0 to 10. For characters that are not supported in
  12153. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12154. // keys in the response.
  12155. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12156. // Together with upload-id-marker, this parameter specifies the multipart upload
  12157. // after which listing should begin.
  12158. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  12159. // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
  12160. // in the response body. 1,000 is the maximum number of uploads that can be
  12161. // returned in a response.
  12162. MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
  12163. // Lists in-progress uploads only for those keys that begin with the specified
  12164. // prefix.
  12165. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12166. // Together with key-marker, specifies the multipart upload after which listing
  12167. // should begin. If key-marker is not specified, the upload-id-marker parameter
  12168. // is ignored.
  12169. UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
  12170. }
  12171. // String returns the string representation
  12172. func (s ListMultipartUploadsInput) String() string {
  12173. return awsutil.Prettify(s)
  12174. }
  12175. // GoString returns the string representation
  12176. func (s ListMultipartUploadsInput) GoString() string {
  12177. return s.String()
  12178. }
  12179. // Validate inspects the fields of the type to determine if they are valid.
  12180. func (s *ListMultipartUploadsInput) Validate() error {
  12181. invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
  12182. if s.Bucket == nil {
  12183. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12184. }
  12185. if invalidParams.Len() > 0 {
  12186. return invalidParams
  12187. }
  12188. return nil
  12189. }
  12190. // SetBucket sets the Bucket field's value.
  12191. func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
  12192. s.Bucket = &v
  12193. return s
  12194. }
  12195. func (s *ListMultipartUploadsInput) getBucket() (v string) {
  12196. if s.Bucket == nil {
  12197. return v
  12198. }
  12199. return *s.Bucket
  12200. }
  12201. // SetDelimiter sets the Delimiter field's value.
  12202. func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
  12203. s.Delimiter = &v
  12204. return s
  12205. }
  12206. // SetEncodingType sets the EncodingType field's value.
  12207. func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
  12208. s.EncodingType = &v
  12209. return s
  12210. }
  12211. // SetKeyMarker sets the KeyMarker field's value.
  12212. func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
  12213. s.KeyMarker = &v
  12214. return s
  12215. }
  12216. // SetMaxUploads sets the MaxUploads field's value.
  12217. func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
  12218. s.MaxUploads = &v
  12219. return s
  12220. }
  12221. // SetPrefix sets the Prefix field's value.
  12222. func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
  12223. s.Prefix = &v
  12224. return s
  12225. }
  12226. // SetUploadIdMarker sets the UploadIdMarker field's value.
  12227. func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
  12228. s.UploadIdMarker = &v
  12229. return s
  12230. }
  12231. type ListMultipartUploadsOutput struct {
  12232. _ struct{} `type:"structure"`
  12233. // Name of the bucket to which the multipart upload was initiated.
  12234. Bucket *string `type:"string"`
  12235. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12236. Delimiter *string `type:"string"`
  12237. // Encoding type used by Amazon S3 to encode object keys in the response.
  12238. EncodingType *string `type:"string" enum:"EncodingType"`
  12239. // Indicates whether the returned list of multipart uploads is truncated. A
  12240. // value of true indicates that the list was truncated. The list can be truncated
  12241. // if the number of multipart uploads exceeds the limit allowed or specified
  12242. // by max uploads.
  12243. IsTruncated *bool `type:"boolean"`
  12244. // The key at or after which the listing began.
  12245. KeyMarker *string `type:"string"`
  12246. // Maximum number of multipart uploads that could have been included in the
  12247. // response.
  12248. MaxUploads *int64 `type:"integer"`
  12249. // When a list is truncated, this element specifies the value that should be
  12250. // used for the key-marker request parameter in a subsequent request.
  12251. NextKeyMarker *string `type:"string"`
  12252. // When a list is truncated, this element specifies the value that should be
  12253. // used for the upload-id-marker request parameter in a subsequent request.
  12254. NextUploadIdMarker *string `type:"string"`
  12255. // When a prefix is provided in the request, this field contains the specified
  12256. // prefix. The result contains only keys starting with the specified prefix.
  12257. Prefix *string `type:"string"`
  12258. // Upload ID after which listing began.
  12259. UploadIdMarker *string `type:"string"`
  12260. Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
  12261. }
  12262. // String returns the string representation
  12263. func (s ListMultipartUploadsOutput) String() string {
  12264. return awsutil.Prettify(s)
  12265. }
  12266. // GoString returns the string representation
  12267. func (s ListMultipartUploadsOutput) GoString() string {
  12268. return s.String()
  12269. }
  12270. // SetBucket sets the Bucket field's value.
  12271. func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
  12272. s.Bucket = &v
  12273. return s
  12274. }
  12275. func (s *ListMultipartUploadsOutput) getBucket() (v string) {
  12276. if s.Bucket == nil {
  12277. return v
  12278. }
  12279. return *s.Bucket
  12280. }
  12281. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12282. func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
  12283. s.CommonPrefixes = v
  12284. return s
  12285. }
  12286. // SetDelimiter sets the Delimiter field's value.
  12287. func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
  12288. s.Delimiter = &v
  12289. return s
  12290. }
  12291. // SetEncodingType sets the EncodingType field's value.
  12292. func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
  12293. s.EncodingType = &v
  12294. return s
  12295. }
  12296. // SetIsTruncated sets the IsTruncated field's value.
  12297. func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
  12298. s.IsTruncated = &v
  12299. return s
  12300. }
  12301. // SetKeyMarker sets the KeyMarker field's value.
  12302. func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
  12303. s.KeyMarker = &v
  12304. return s
  12305. }
  12306. // SetMaxUploads sets the MaxUploads field's value.
  12307. func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
  12308. s.MaxUploads = &v
  12309. return s
  12310. }
  12311. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12312. func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
  12313. s.NextKeyMarker = &v
  12314. return s
  12315. }
  12316. // SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
  12317. func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
  12318. s.NextUploadIdMarker = &v
  12319. return s
  12320. }
  12321. // SetPrefix sets the Prefix field's value.
  12322. func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
  12323. s.Prefix = &v
  12324. return s
  12325. }
  12326. // SetUploadIdMarker sets the UploadIdMarker field's value.
  12327. func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
  12328. s.UploadIdMarker = &v
  12329. return s
  12330. }
  12331. // SetUploads sets the Uploads field's value.
  12332. func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
  12333. s.Uploads = v
  12334. return s
  12335. }
  12336. type ListObjectVersionsInput struct {
  12337. _ struct{} `type:"structure"`
  12338. // Bucket is a required field
  12339. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12340. // A delimiter is a character you use to group keys.
  12341. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12342. // Requests Amazon S3 to encode the object keys in the response and specifies
  12343. // the encoding method to use. An object key may contain any Unicode character;
  12344. // however, XML 1.0 parser cannot parse some characters, such as characters
  12345. // with an ASCII value from 0 to 10. For characters that are not supported in
  12346. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12347. // keys in the response.
  12348. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12349. // Specifies the key to start with when listing objects in a bucket.
  12350. KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
  12351. // Sets the maximum number of keys returned in the response. The response might
  12352. // contain fewer keys but will never contain more.
  12353. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12354. // Limits the response to keys that begin with the specified prefix.
  12355. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12356. // Specifies the object version you want to start listing from.
  12357. VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
  12358. }
  12359. // String returns the string representation
  12360. func (s ListObjectVersionsInput) String() string {
  12361. return awsutil.Prettify(s)
  12362. }
  12363. // GoString returns the string representation
  12364. func (s ListObjectVersionsInput) GoString() string {
  12365. return s.String()
  12366. }
  12367. // Validate inspects the fields of the type to determine if they are valid.
  12368. func (s *ListObjectVersionsInput) Validate() error {
  12369. invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
  12370. if s.Bucket == nil {
  12371. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12372. }
  12373. if invalidParams.Len() > 0 {
  12374. return invalidParams
  12375. }
  12376. return nil
  12377. }
  12378. // SetBucket sets the Bucket field's value.
  12379. func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
  12380. s.Bucket = &v
  12381. return s
  12382. }
  12383. func (s *ListObjectVersionsInput) getBucket() (v string) {
  12384. if s.Bucket == nil {
  12385. return v
  12386. }
  12387. return *s.Bucket
  12388. }
  12389. // SetDelimiter sets the Delimiter field's value.
  12390. func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
  12391. s.Delimiter = &v
  12392. return s
  12393. }
  12394. // SetEncodingType sets the EncodingType field's value.
  12395. func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
  12396. s.EncodingType = &v
  12397. return s
  12398. }
  12399. // SetKeyMarker sets the KeyMarker field's value.
  12400. func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
  12401. s.KeyMarker = &v
  12402. return s
  12403. }
  12404. // SetMaxKeys sets the MaxKeys field's value.
  12405. func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
  12406. s.MaxKeys = &v
  12407. return s
  12408. }
  12409. // SetPrefix sets the Prefix field's value.
  12410. func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
  12411. s.Prefix = &v
  12412. return s
  12413. }
  12414. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12415. func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
  12416. s.VersionIdMarker = &v
  12417. return s
  12418. }
  12419. type ListObjectVersionsOutput struct {
  12420. _ struct{} `type:"structure"`
  12421. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12422. DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
  12423. Delimiter *string `type:"string"`
  12424. // Encoding type used by Amazon S3 to encode object keys in the response.
  12425. EncodingType *string `type:"string" enum:"EncodingType"`
  12426. // A flag that indicates whether or not Amazon S3 returned all of the results
  12427. // that satisfied the search criteria. If your results were truncated, you can
  12428. // make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
  12429. // response parameters as a starting place in another request to return the
  12430. // rest of the results.
  12431. IsTruncated *bool `type:"boolean"`
  12432. // Marks the last Key returned in a truncated response.
  12433. KeyMarker *string `type:"string"`
  12434. MaxKeys *int64 `type:"integer"`
  12435. Name *string `type:"string"`
  12436. // Use this value for the key marker request parameter in a subsequent request.
  12437. NextKeyMarker *string `type:"string"`
  12438. // Use this value for the next version id marker parameter in a subsequent request.
  12439. NextVersionIdMarker *string `type:"string"`
  12440. Prefix *string `type:"string"`
  12441. VersionIdMarker *string `type:"string"`
  12442. Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
  12443. }
  12444. // String returns the string representation
  12445. func (s ListObjectVersionsOutput) String() string {
  12446. return awsutil.Prettify(s)
  12447. }
  12448. // GoString returns the string representation
  12449. func (s ListObjectVersionsOutput) GoString() string {
  12450. return s.String()
  12451. }
  12452. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12453. func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
  12454. s.CommonPrefixes = v
  12455. return s
  12456. }
  12457. // SetDeleteMarkers sets the DeleteMarkers field's value.
  12458. func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
  12459. s.DeleteMarkers = v
  12460. return s
  12461. }
  12462. // SetDelimiter sets the Delimiter field's value.
  12463. func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
  12464. s.Delimiter = &v
  12465. return s
  12466. }
  12467. // SetEncodingType sets the EncodingType field's value.
  12468. func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
  12469. s.EncodingType = &v
  12470. return s
  12471. }
  12472. // SetIsTruncated sets the IsTruncated field's value.
  12473. func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
  12474. s.IsTruncated = &v
  12475. return s
  12476. }
  12477. // SetKeyMarker sets the KeyMarker field's value.
  12478. func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
  12479. s.KeyMarker = &v
  12480. return s
  12481. }
  12482. // SetMaxKeys sets the MaxKeys field's value.
  12483. func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
  12484. s.MaxKeys = &v
  12485. return s
  12486. }
  12487. // SetName sets the Name field's value.
  12488. func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
  12489. s.Name = &v
  12490. return s
  12491. }
  12492. // SetNextKeyMarker sets the NextKeyMarker field's value.
  12493. func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
  12494. s.NextKeyMarker = &v
  12495. return s
  12496. }
  12497. // SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
  12498. func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
  12499. s.NextVersionIdMarker = &v
  12500. return s
  12501. }
  12502. // SetPrefix sets the Prefix field's value.
  12503. func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
  12504. s.Prefix = &v
  12505. return s
  12506. }
  12507. // SetVersionIdMarker sets the VersionIdMarker field's value.
  12508. func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
  12509. s.VersionIdMarker = &v
  12510. return s
  12511. }
  12512. // SetVersions sets the Versions field's value.
  12513. func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
  12514. s.Versions = v
  12515. return s
  12516. }
  12517. type ListObjectsInput struct {
  12518. _ struct{} `type:"structure"`
  12519. // Bucket is a required field
  12520. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12521. // A delimiter is a character you use to group keys.
  12522. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12523. // Requests Amazon S3 to encode the object keys in the response and specifies
  12524. // the encoding method to use. An object key may contain any Unicode character;
  12525. // however, XML 1.0 parser cannot parse some characters, such as characters
  12526. // with an ASCII value from 0 to 10. For characters that are not supported in
  12527. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  12528. // keys in the response.
  12529. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12530. // Specifies the key to start with when listing objects in a bucket.
  12531. Marker *string `location:"querystring" locationName:"marker" type:"string"`
  12532. // Sets the maximum number of keys returned in the response. The response might
  12533. // contain fewer keys but will never contain more.
  12534. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12535. // Limits the response to keys that begin with the specified prefix.
  12536. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12537. // Confirms that the requester knows that she or he will be charged for the
  12538. // list objects request. Bucket owners need not specify this parameter in their
  12539. // requests.
  12540. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12541. }
  12542. // String returns the string representation
  12543. func (s ListObjectsInput) String() string {
  12544. return awsutil.Prettify(s)
  12545. }
  12546. // GoString returns the string representation
  12547. func (s ListObjectsInput) GoString() string {
  12548. return s.String()
  12549. }
  12550. // Validate inspects the fields of the type to determine if they are valid.
  12551. func (s *ListObjectsInput) Validate() error {
  12552. invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
  12553. if s.Bucket == nil {
  12554. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12555. }
  12556. if invalidParams.Len() > 0 {
  12557. return invalidParams
  12558. }
  12559. return nil
  12560. }
  12561. // SetBucket sets the Bucket field's value.
  12562. func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
  12563. s.Bucket = &v
  12564. return s
  12565. }
  12566. func (s *ListObjectsInput) getBucket() (v string) {
  12567. if s.Bucket == nil {
  12568. return v
  12569. }
  12570. return *s.Bucket
  12571. }
  12572. // SetDelimiter sets the Delimiter field's value.
  12573. func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
  12574. s.Delimiter = &v
  12575. return s
  12576. }
  12577. // SetEncodingType sets the EncodingType field's value.
  12578. func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
  12579. s.EncodingType = &v
  12580. return s
  12581. }
  12582. // SetMarker sets the Marker field's value.
  12583. func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
  12584. s.Marker = &v
  12585. return s
  12586. }
  12587. // SetMaxKeys sets the MaxKeys field's value.
  12588. func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
  12589. s.MaxKeys = &v
  12590. return s
  12591. }
  12592. // SetPrefix sets the Prefix field's value.
  12593. func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
  12594. s.Prefix = &v
  12595. return s
  12596. }
  12597. // SetRequestPayer sets the RequestPayer field's value.
  12598. func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
  12599. s.RequestPayer = &v
  12600. return s
  12601. }
  12602. type ListObjectsOutput struct {
  12603. _ struct{} `type:"structure"`
  12604. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12605. Contents []*Object `type:"list" flattened:"true"`
  12606. Delimiter *string `type:"string"`
  12607. // Encoding type used by Amazon S3 to encode object keys in the response.
  12608. EncodingType *string `type:"string" enum:"EncodingType"`
  12609. // A flag that indicates whether or not Amazon S3 returned all of the results
  12610. // that satisfied the search criteria.
  12611. IsTruncated *bool `type:"boolean"`
  12612. Marker *string `type:"string"`
  12613. MaxKeys *int64 `type:"integer"`
  12614. Name *string `type:"string"`
  12615. // When response is truncated (the IsTruncated element value in the response
  12616. // is true), you can use the key name in this field as marker in the subsequent
  12617. // request to get next set of objects. Amazon S3 lists objects in alphabetical
  12618. // order Note: This element is returned only if you have delimiter request parameter
  12619. // specified. If response does not include the NextMaker and it is truncated,
  12620. // you can use the value of the last Key in the response as the marker in the
  12621. // subsequent request to get the next set of object keys.
  12622. NextMarker *string `type:"string"`
  12623. Prefix *string `type:"string"`
  12624. }
  12625. // String returns the string representation
  12626. func (s ListObjectsOutput) String() string {
  12627. return awsutil.Prettify(s)
  12628. }
  12629. // GoString returns the string representation
  12630. func (s ListObjectsOutput) GoString() string {
  12631. return s.String()
  12632. }
  12633. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12634. func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
  12635. s.CommonPrefixes = v
  12636. return s
  12637. }
  12638. // SetContents sets the Contents field's value.
  12639. func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
  12640. s.Contents = v
  12641. return s
  12642. }
  12643. // SetDelimiter sets the Delimiter field's value.
  12644. func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
  12645. s.Delimiter = &v
  12646. return s
  12647. }
  12648. // SetEncodingType sets the EncodingType field's value.
  12649. func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
  12650. s.EncodingType = &v
  12651. return s
  12652. }
  12653. // SetIsTruncated sets the IsTruncated field's value.
  12654. func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
  12655. s.IsTruncated = &v
  12656. return s
  12657. }
  12658. // SetMarker sets the Marker field's value.
  12659. func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
  12660. s.Marker = &v
  12661. return s
  12662. }
  12663. // SetMaxKeys sets the MaxKeys field's value.
  12664. func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
  12665. s.MaxKeys = &v
  12666. return s
  12667. }
  12668. // SetName sets the Name field's value.
  12669. func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
  12670. s.Name = &v
  12671. return s
  12672. }
  12673. // SetNextMarker sets the NextMarker field's value.
  12674. func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
  12675. s.NextMarker = &v
  12676. return s
  12677. }
  12678. // SetPrefix sets the Prefix field's value.
  12679. func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
  12680. s.Prefix = &v
  12681. return s
  12682. }
  12683. type ListObjectsV2Input struct {
  12684. _ struct{} `type:"structure"`
  12685. // Name of the bucket to list.
  12686. //
  12687. // Bucket is a required field
  12688. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12689. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12690. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12691. // key
  12692. ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
  12693. // A delimiter is a character you use to group keys.
  12694. Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
  12695. // Encoding type used by Amazon S3 to encode object keys in the response.
  12696. EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
  12697. // The owner field is not present in listV2 by default, if you want to return
  12698. // owner field with each key in the result then set the fetch owner field to
  12699. // true
  12700. FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
  12701. // Sets the maximum number of keys returned in the response. The response might
  12702. // contain fewer keys but will never contain more.
  12703. MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
  12704. // Limits the response to keys that begin with the specified prefix.
  12705. Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
  12706. // Confirms that the requester knows that she or he will be charged for the
  12707. // list objects request in V2 style. Bucket owners need not specify this parameter
  12708. // in their requests.
  12709. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12710. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12711. // listing after this specified key. StartAfter can be any key in the bucket
  12712. StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
  12713. }
  12714. // String returns the string representation
  12715. func (s ListObjectsV2Input) String() string {
  12716. return awsutil.Prettify(s)
  12717. }
  12718. // GoString returns the string representation
  12719. func (s ListObjectsV2Input) GoString() string {
  12720. return s.String()
  12721. }
  12722. // Validate inspects the fields of the type to determine if they are valid.
  12723. func (s *ListObjectsV2Input) Validate() error {
  12724. invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
  12725. if s.Bucket == nil {
  12726. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12727. }
  12728. if invalidParams.Len() > 0 {
  12729. return invalidParams
  12730. }
  12731. return nil
  12732. }
  12733. // SetBucket sets the Bucket field's value.
  12734. func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
  12735. s.Bucket = &v
  12736. return s
  12737. }
  12738. func (s *ListObjectsV2Input) getBucket() (v string) {
  12739. if s.Bucket == nil {
  12740. return v
  12741. }
  12742. return *s.Bucket
  12743. }
  12744. // SetContinuationToken sets the ContinuationToken field's value.
  12745. func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
  12746. s.ContinuationToken = &v
  12747. return s
  12748. }
  12749. // SetDelimiter sets the Delimiter field's value.
  12750. func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
  12751. s.Delimiter = &v
  12752. return s
  12753. }
  12754. // SetEncodingType sets the EncodingType field's value.
  12755. func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
  12756. s.EncodingType = &v
  12757. return s
  12758. }
  12759. // SetFetchOwner sets the FetchOwner field's value.
  12760. func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
  12761. s.FetchOwner = &v
  12762. return s
  12763. }
  12764. // SetMaxKeys sets the MaxKeys field's value.
  12765. func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
  12766. s.MaxKeys = &v
  12767. return s
  12768. }
  12769. // SetPrefix sets the Prefix field's value.
  12770. func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
  12771. s.Prefix = &v
  12772. return s
  12773. }
  12774. // SetRequestPayer sets the RequestPayer field's value.
  12775. func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
  12776. s.RequestPayer = &v
  12777. return s
  12778. }
  12779. // SetStartAfter sets the StartAfter field's value.
  12780. func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
  12781. s.StartAfter = &v
  12782. return s
  12783. }
  12784. type ListObjectsV2Output struct {
  12785. _ struct{} `type:"structure"`
  12786. // CommonPrefixes contains all (if there are any) keys between Prefix and the
  12787. // next occurrence of the string specified by delimiter
  12788. CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
  12789. // Metadata about each object returned.
  12790. Contents []*Object `type:"list" flattened:"true"`
  12791. // ContinuationToken indicates Amazon S3 that the list is being continued on
  12792. // this bucket with a token. ContinuationToken is obfuscated and is not a real
  12793. // key
  12794. ContinuationToken *string `type:"string"`
  12795. // A delimiter is a character you use to group keys.
  12796. Delimiter *string `type:"string"`
  12797. // Encoding type used by Amazon S3 to encode object keys in the response.
  12798. EncodingType *string `type:"string" enum:"EncodingType"`
  12799. // A flag that indicates whether or not Amazon S3 returned all of the results
  12800. // that satisfied the search criteria.
  12801. IsTruncated *bool `type:"boolean"`
  12802. // KeyCount is the number of keys returned with this request. KeyCount will
  12803. // always be less than equals to MaxKeys field. Say you ask for 50 keys, your
  12804. // result will include less than equals 50 keys
  12805. KeyCount *int64 `type:"integer"`
  12806. // Sets the maximum number of keys returned in the response. The response might
  12807. // contain fewer keys but will never contain more.
  12808. MaxKeys *int64 `type:"integer"`
  12809. // Name of the bucket to list.
  12810. Name *string `type:"string"`
  12811. // NextContinuationToken is sent when isTruncated is true which means there
  12812. // are more keys in the bucket that can be listed. The next list requests to
  12813. // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
  12814. // is obfuscated and is not a real key
  12815. NextContinuationToken *string `type:"string"`
  12816. // Limits the response to keys that begin with the specified prefix.
  12817. Prefix *string `type:"string"`
  12818. // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
  12819. // listing after this specified key. StartAfter can be any key in the bucket
  12820. StartAfter *string `type:"string"`
  12821. }
  12822. // String returns the string representation
  12823. func (s ListObjectsV2Output) String() string {
  12824. return awsutil.Prettify(s)
  12825. }
  12826. // GoString returns the string representation
  12827. func (s ListObjectsV2Output) GoString() string {
  12828. return s.String()
  12829. }
  12830. // SetCommonPrefixes sets the CommonPrefixes field's value.
  12831. func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
  12832. s.CommonPrefixes = v
  12833. return s
  12834. }
  12835. // SetContents sets the Contents field's value.
  12836. func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
  12837. s.Contents = v
  12838. return s
  12839. }
  12840. // SetContinuationToken sets the ContinuationToken field's value.
  12841. func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
  12842. s.ContinuationToken = &v
  12843. return s
  12844. }
  12845. // SetDelimiter sets the Delimiter field's value.
  12846. func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
  12847. s.Delimiter = &v
  12848. return s
  12849. }
  12850. // SetEncodingType sets the EncodingType field's value.
  12851. func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
  12852. s.EncodingType = &v
  12853. return s
  12854. }
  12855. // SetIsTruncated sets the IsTruncated field's value.
  12856. func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
  12857. s.IsTruncated = &v
  12858. return s
  12859. }
  12860. // SetKeyCount sets the KeyCount field's value.
  12861. func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
  12862. s.KeyCount = &v
  12863. return s
  12864. }
  12865. // SetMaxKeys sets the MaxKeys field's value.
  12866. func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
  12867. s.MaxKeys = &v
  12868. return s
  12869. }
  12870. // SetName sets the Name field's value.
  12871. func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
  12872. s.Name = &v
  12873. return s
  12874. }
  12875. // SetNextContinuationToken sets the NextContinuationToken field's value.
  12876. func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
  12877. s.NextContinuationToken = &v
  12878. return s
  12879. }
  12880. // SetPrefix sets the Prefix field's value.
  12881. func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
  12882. s.Prefix = &v
  12883. return s
  12884. }
  12885. // SetStartAfter sets the StartAfter field's value.
  12886. func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
  12887. s.StartAfter = &v
  12888. return s
  12889. }
  12890. type ListPartsInput struct {
  12891. _ struct{} `type:"structure"`
  12892. // Bucket is a required field
  12893. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  12894. // Key is a required field
  12895. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  12896. // Sets the maximum number of parts to return.
  12897. MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
  12898. // Specifies the part after which listing should begin. Only parts with higher
  12899. // part numbers will be listed.
  12900. PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
  12901. // Confirms that the requester knows that she or he will be charged for the
  12902. // request. Bucket owners need not specify this parameter in their requests.
  12903. // Documentation on downloading objects from requester pays buckets can be found
  12904. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  12905. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  12906. // Upload ID identifying the multipart upload whose parts are being listed.
  12907. //
  12908. // UploadId is a required field
  12909. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  12910. }
  12911. // String returns the string representation
  12912. func (s ListPartsInput) String() string {
  12913. return awsutil.Prettify(s)
  12914. }
  12915. // GoString returns the string representation
  12916. func (s ListPartsInput) GoString() string {
  12917. return s.String()
  12918. }
  12919. // Validate inspects the fields of the type to determine if they are valid.
  12920. func (s *ListPartsInput) Validate() error {
  12921. invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
  12922. if s.Bucket == nil {
  12923. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  12924. }
  12925. if s.Key == nil {
  12926. invalidParams.Add(request.NewErrParamRequired("Key"))
  12927. }
  12928. if s.Key != nil && len(*s.Key) < 1 {
  12929. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  12930. }
  12931. if s.UploadId == nil {
  12932. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  12933. }
  12934. if invalidParams.Len() > 0 {
  12935. return invalidParams
  12936. }
  12937. return nil
  12938. }
  12939. // SetBucket sets the Bucket field's value.
  12940. func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
  12941. s.Bucket = &v
  12942. return s
  12943. }
  12944. func (s *ListPartsInput) getBucket() (v string) {
  12945. if s.Bucket == nil {
  12946. return v
  12947. }
  12948. return *s.Bucket
  12949. }
  12950. // SetKey sets the Key field's value.
  12951. func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
  12952. s.Key = &v
  12953. return s
  12954. }
  12955. // SetMaxParts sets the MaxParts field's value.
  12956. func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
  12957. s.MaxParts = &v
  12958. return s
  12959. }
  12960. // SetPartNumberMarker sets the PartNumberMarker field's value.
  12961. func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
  12962. s.PartNumberMarker = &v
  12963. return s
  12964. }
  12965. // SetRequestPayer sets the RequestPayer field's value.
  12966. func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
  12967. s.RequestPayer = &v
  12968. return s
  12969. }
  12970. // SetUploadId sets the UploadId field's value.
  12971. func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
  12972. s.UploadId = &v
  12973. return s
  12974. }
  12975. type ListPartsOutput struct {
  12976. _ struct{} `type:"structure"`
  12977. // Date when multipart upload will become eligible for abort operation by lifecycle.
  12978. AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp" timestampFormat:"rfc822"`
  12979. // Id of the lifecycle rule that makes a multipart upload eligible for abort
  12980. // operation.
  12981. AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
  12982. // Name of the bucket to which the multipart upload was initiated.
  12983. Bucket *string `type:"string"`
  12984. // Identifies who initiated the multipart upload.
  12985. Initiator *Initiator `type:"structure"`
  12986. // Indicates whether the returned list of parts is truncated.
  12987. IsTruncated *bool `type:"boolean"`
  12988. // Object key for which the multipart upload was initiated.
  12989. Key *string `min:"1" type:"string"`
  12990. // Maximum number of parts that were allowed in the response.
  12991. MaxParts *int64 `type:"integer"`
  12992. // When a list is truncated, this element specifies the last part in the list,
  12993. // as well as the value to use for the part-number-marker request parameter
  12994. // in a subsequent request.
  12995. NextPartNumberMarker *int64 `type:"integer"`
  12996. Owner *Owner `type:"structure"`
  12997. // Part number after which listing begins.
  12998. PartNumberMarker *int64 `type:"integer"`
  12999. Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
  13000. // If present, indicates that the requester was successfully charged for the
  13001. // request.
  13002. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  13003. // The class of storage used to store the object.
  13004. StorageClass *string `type:"string" enum:"StorageClass"`
  13005. // Upload ID identifying the multipart upload whose parts are being listed.
  13006. UploadId *string `type:"string"`
  13007. }
  13008. // String returns the string representation
  13009. func (s ListPartsOutput) String() string {
  13010. return awsutil.Prettify(s)
  13011. }
  13012. // GoString returns the string representation
  13013. func (s ListPartsOutput) GoString() string {
  13014. return s.String()
  13015. }
  13016. // SetAbortDate sets the AbortDate field's value.
  13017. func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
  13018. s.AbortDate = &v
  13019. return s
  13020. }
  13021. // SetAbortRuleId sets the AbortRuleId field's value.
  13022. func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
  13023. s.AbortRuleId = &v
  13024. return s
  13025. }
  13026. // SetBucket sets the Bucket field's value.
  13027. func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
  13028. s.Bucket = &v
  13029. return s
  13030. }
  13031. func (s *ListPartsOutput) getBucket() (v string) {
  13032. if s.Bucket == nil {
  13033. return v
  13034. }
  13035. return *s.Bucket
  13036. }
  13037. // SetInitiator sets the Initiator field's value.
  13038. func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
  13039. s.Initiator = v
  13040. return s
  13041. }
  13042. // SetIsTruncated sets the IsTruncated field's value.
  13043. func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
  13044. s.IsTruncated = &v
  13045. return s
  13046. }
  13047. // SetKey sets the Key field's value.
  13048. func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
  13049. s.Key = &v
  13050. return s
  13051. }
  13052. // SetMaxParts sets the MaxParts field's value.
  13053. func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
  13054. s.MaxParts = &v
  13055. return s
  13056. }
  13057. // SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
  13058. func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
  13059. s.NextPartNumberMarker = &v
  13060. return s
  13061. }
  13062. // SetOwner sets the Owner field's value.
  13063. func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
  13064. s.Owner = v
  13065. return s
  13066. }
  13067. // SetPartNumberMarker sets the PartNumberMarker field's value.
  13068. func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
  13069. s.PartNumberMarker = &v
  13070. return s
  13071. }
  13072. // SetParts sets the Parts field's value.
  13073. func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
  13074. s.Parts = v
  13075. return s
  13076. }
  13077. // SetRequestCharged sets the RequestCharged field's value.
  13078. func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
  13079. s.RequestCharged = &v
  13080. return s
  13081. }
  13082. // SetStorageClass sets the StorageClass field's value.
  13083. func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
  13084. s.StorageClass = &v
  13085. return s
  13086. }
  13087. // SetUploadId sets the UploadId field's value.
  13088. func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
  13089. s.UploadId = &v
  13090. return s
  13091. }
  13092. // Describes an S3 location that will receive the results of the restore request.
  13093. type Location struct {
  13094. _ struct{} `type:"structure"`
  13095. // A list of grants that control access to the staged results.
  13096. AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
  13097. // The name of the bucket where the restore results will be placed.
  13098. //
  13099. // BucketName is a required field
  13100. BucketName *string `type:"string" required:"true"`
  13101. // The canned ACL to apply to the restore results.
  13102. CannedACL *string `type:"string" enum:"ObjectCannedACL"`
  13103. // Describes the server-side encryption that will be applied to the restore
  13104. // results.
  13105. Encryption *Encryption `type:"structure"`
  13106. // The prefix that is prepended to the restore results for this request.
  13107. //
  13108. // Prefix is a required field
  13109. Prefix *string `type:"string" required:"true"`
  13110. // The class of storage used to store the restore results.
  13111. StorageClass *string `type:"string" enum:"StorageClass"`
  13112. // The tag-set that is applied to the restore results.
  13113. Tagging *Tagging `type:"structure"`
  13114. // A list of metadata to store with the restore results in S3.
  13115. UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
  13116. }
  13117. // String returns the string representation
  13118. func (s Location) String() string {
  13119. return awsutil.Prettify(s)
  13120. }
  13121. // GoString returns the string representation
  13122. func (s Location) GoString() string {
  13123. return s.String()
  13124. }
  13125. // Validate inspects the fields of the type to determine if they are valid.
  13126. func (s *Location) Validate() error {
  13127. invalidParams := request.ErrInvalidParams{Context: "Location"}
  13128. if s.BucketName == nil {
  13129. invalidParams.Add(request.NewErrParamRequired("BucketName"))
  13130. }
  13131. if s.Prefix == nil {
  13132. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  13133. }
  13134. if s.AccessControlList != nil {
  13135. for i, v := range s.AccessControlList {
  13136. if v == nil {
  13137. continue
  13138. }
  13139. if err := v.Validate(); err != nil {
  13140. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
  13141. }
  13142. }
  13143. }
  13144. if s.Encryption != nil {
  13145. if err := s.Encryption.Validate(); err != nil {
  13146. invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
  13147. }
  13148. }
  13149. if s.Tagging != nil {
  13150. if err := s.Tagging.Validate(); err != nil {
  13151. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  13152. }
  13153. }
  13154. if invalidParams.Len() > 0 {
  13155. return invalidParams
  13156. }
  13157. return nil
  13158. }
  13159. // SetAccessControlList sets the AccessControlList field's value.
  13160. func (s *Location) SetAccessControlList(v []*Grant) *Location {
  13161. s.AccessControlList = v
  13162. return s
  13163. }
  13164. // SetBucketName sets the BucketName field's value.
  13165. func (s *Location) SetBucketName(v string) *Location {
  13166. s.BucketName = &v
  13167. return s
  13168. }
  13169. // SetCannedACL sets the CannedACL field's value.
  13170. func (s *Location) SetCannedACL(v string) *Location {
  13171. s.CannedACL = &v
  13172. return s
  13173. }
  13174. // SetEncryption sets the Encryption field's value.
  13175. func (s *Location) SetEncryption(v *Encryption) *Location {
  13176. s.Encryption = v
  13177. return s
  13178. }
  13179. // SetPrefix sets the Prefix field's value.
  13180. func (s *Location) SetPrefix(v string) *Location {
  13181. s.Prefix = &v
  13182. return s
  13183. }
  13184. // SetStorageClass sets the StorageClass field's value.
  13185. func (s *Location) SetStorageClass(v string) *Location {
  13186. s.StorageClass = &v
  13187. return s
  13188. }
  13189. // SetTagging sets the Tagging field's value.
  13190. func (s *Location) SetTagging(v *Tagging) *Location {
  13191. s.Tagging = v
  13192. return s
  13193. }
  13194. // SetUserMetadata sets the UserMetadata field's value.
  13195. func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
  13196. s.UserMetadata = v
  13197. return s
  13198. }
  13199. // Container for logging information. Presence of this element indicates that
  13200. // logging is enabled. Parameters TargetBucket and TargetPrefix are required
  13201. // in this case.
  13202. type LoggingEnabled struct {
  13203. _ struct{} `type:"structure"`
  13204. // Specifies the bucket where you want Amazon S3 to store server access logs.
  13205. // You can have your logs delivered to any bucket that you own, including the
  13206. // same bucket that is being logged. You can also configure multiple buckets
  13207. // to deliver their logs to the same target bucket. In this case you should
  13208. // choose a different TargetPrefix for each source bucket so that the delivered
  13209. // log files can be distinguished by key.
  13210. //
  13211. // TargetBucket is a required field
  13212. TargetBucket *string `type:"string" required:"true"`
  13213. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
  13214. // This element lets you specify a prefix for the keys that the log files will
  13215. // be stored under.
  13216. //
  13217. // TargetPrefix is a required field
  13218. TargetPrefix *string `type:"string" required:"true"`
  13219. }
  13220. // String returns the string representation
  13221. func (s LoggingEnabled) String() string {
  13222. return awsutil.Prettify(s)
  13223. }
  13224. // GoString returns the string representation
  13225. func (s LoggingEnabled) GoString() string {
  13226. return s.String()
  13227. }
  13228. // Validate inspects the fields of the type to determine if they are valid.
  13229. func (s *LoggingEnabled) Validate() error {
  13230. invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
  13231. if s.TargetBucket == nil {
  13232. invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
  13233. }
  13234. if s.TargetPrefix == nil {
  13235. invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
  13236. }
  13237. if s.TargetGrants != nil {
  13238. for i, v := range s.TargetGrants {
  13239. if v == nil {
  13240. continue
  13241. }
  13242. if err := v.Validate(); err != nil {
  13243. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
  13244. }
  13245. }
  13246. }
  13247. if invalidParams.Len() > 0 {
  13248. return invalidParams
  13249. }
  13250. return nil
  13251. }
  13252. // SetTargetBucket sets the TargetBucket field's value.
  13253. func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
  13254. s.TargetBucket = &v
  13255. return s
  13256. }
  13257. // SetTargetGrants sets the TargetGrants field's value.
  13258. func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
  13259. s.TargetGrants = v
  13260. return s
  13261. }
  13262. // SetTargetPrefix sets the TargetPrefix field's value.
  13263. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
  13264. s.TargetPrefix = &v
  13265. return s
  13266. }
  13267. // A metadata key-value pair to store with an object.
  13268. type MetadataEntry struct {
  13269. _ struct{} `type:"structure"`
  13270. Name *string `type:"string"`
  13271. Value *string `type:"string"`
  13272. }
  13273. // String returns the string representation
  13274. func (s MetadataEntry) String() string {
  13275. return awsutil.Prettify(s)
  13276. }
  13277. // GoString returns the string representation
  13278. func (s MetadataEntry) GoString() string {
  13279. return s.String()
  13280. }
  13281. // SetName sets the Name field's value.
  13282. func (s *MetadataEntry) SetName(v string) *MetadataEntry {
  13283. s.Name = &v
  13284. return s
  13285. }
  13286. // SetValue sets the Value field's value.
  13287. func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
  13288. s.Value = &v
  13289. return s
  13290. }
  13291. type MetricsAndOperator struct {
  13292. _ struct{} `type:"structure"`
  13293. // The prefix used when evaluating an AND predicate.
  13294. Prefix *string `type:"string"`
  13295. // The list of tags used when evaluating an AND predicate.
  13296. Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
  13297. }
  13298. // String returns the string representation
  13299. func (s MetricsAndOperator) String() string {
  13300. return awsutil.Prettify(s)
  13301. }
  13302. // GoString returns the string representation
  13303. func (s MetricsAndOperator) GoString() string {
  13304. return s.String()
  13305. }
  13306. // Validate inspects the fields of the type to determine if they are valid.
  13307. func (s *MetricsAndOperator) Validate() error {
  13308. invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
  13309. if s.Tags != nil {
  13310. for i, v := range s.Tags {
  13311. if v == nil {
  13312. continue
  13313. }
  13314. if err := v.Validate(); err != nil {
  13315. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  13316. }
  13317. }
  13318. }
  13319. if invalidParams.Len() > 0 {
  13320. return invalidParams
  13321. }
  13322. return nil
  13323. }
  13324. // SetPrefix sets the Prefix field's value.
  13325. func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
  13326. s.Prefix = &v
  13327. return s
  13328. }
  13329. // SetTags sets the Tags field's value.
  13330. func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
  13331. s.Tags = v
  13332. return s
  13333. }
  13334. type MetricsConfiguration struct {
  13335. _ struct{} `type:"structure"`
  13336. // Specifies a metrics configuration filter. The metrics configuration will
  13337. // only include objects that meet the filter's criteria. A filter must be a
  13338. // prefix, a tag, or a conjunction (MetricsAndOperator).
  13339. Filter *MetricsFilter `type:"structure"`
  13340. // The ID used to identify the metrics configuration.
  13341. //
  13342. // Id is a required field
  13343. Id *string `type:"string" required:"true"`
  13344. }
  13345. // String returns the string representation
  13346. func (s MetricsConfiguration) String() string {
  13347. return awsutil.Prettify(s)
  13348. }
  13349. // GoString returns the string representation
  13350. func (s MetricsConfiguration) GoString() string {
  13351. return s.String()
  13352. }
  13353. // Validate inspects the fields of the type to determine if they are valid.
  13354. func (s *MetricsConfiguration) Validate() error {
  13355. invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
  13356. if s.Id == nil {
  13357. invalidParams.Add(request.NewErrParamRequired("Id"))
  13358. }
  13359. if s.Filter != nil {
  13360. if err := s.Filter.Validate(); err != nil {
  13361. invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
  13362. }
  13363. }
  13364. if invalidParams.Len() > 0 {
  13365. return invalidParams
  13366. }
  13367. return nil
  13368. }
  13369. // SetFilter sets the Filter field's value.
  13370. func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
  13371. s.Filter = v
  13372. return s
  13373. }
  13374. // SetId sets the Id field's value.
  13375. func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
  13376. s.Id = &v
  13377. return s
  13378. }
  13379. type MetricsFilter struct {
  13380. _ struct{} `type:"structure"`
  13381. // A conjunction (logical AND) of predicates, which is used in evaluating a
  13382. // metrics filter. The operator must have at least two predicates, and an object
  13383. // must match all of the predicates in order for the filter to apply.
  13384. And *MetricsAndOperator `type:"structure"`
  13385. // The prefix used when evaluating a metrics filter.
  13386. Prefix *string `type:"string"`
  13387. // The tag used when evaluating a metrics filter.
  13388. Tag *Tag `type:"structure"`
  13389. }
  13390. // String returns the string representation
  13391. func (s MetricsFilter) String() string {
  13392. return awsutil.Prettify(s)
  13393. }
  13394. // GoString returns the string representation
  13395. func (s MetricsFilter) GoString() string {
  13396. return s.String()
  13397. }
  13398. // Validate inspects the fields of the type to determine if they are valid.
  13399. func (s *MetricsFilter) Validate() error {
  13400. invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
  13401. if s.And != nil {
  13402. if err := s.And.Validate(); err != nil {
  13403. invalidParams.AddNested("And", err.(request.ErrInvalidParams))
  13404. }
  13405. }
  13406. if s.Tag != nil {
  13407. if err := s.Tag.Validate(); err != nil {
  13408. invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
  13409. }
  13410. }
  13411. if invalidParams.Len() > 0 {
  13412. return invalidParams
  13413. }
  13414. return nil
  13415. }
  13416. // SetAnd sets the And field's value.
  13417. func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
  13418. s.And = v
  13419. return s
  13420. }
  13421. // SetPrefix sets the Prefix field's value.
  13422. func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
  13423. s.Prefix = &v
  13424. return s
  13425. }
  13426. // SetTag sets the Tag field's value.
  13427. func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
  13428. s.Tag = v
  13429. return s
  13430. }
  13431. type MultipartUpload struct {
  13432. _ struct{} `type:"structure"`
  13433. // Date and time at which the multipart upload was initiated.
  13434. Initiated *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13435. // Identifies who initiated the multipart upload.
  13436. Initiator *Initiator `type:"structure"`
  13437. // Key of the object for which the multipart upload was initiated.
  13438. Key *string `min:"1" type:"string"`
  13439. Owner *Owner `type:"structure"`
  13440. // The class of storage used to store the object.
  13441. StorageClass *string `type:"string" enum:"StorageClass"`
  13442. // Upload ID that identifies the multipart upload.
  13443. UploadId *string `type:"string"`
  13444. }
  13445. // String returns the string representation
  13446. func (s MultipartUpload) String() string {
  13447. return awsutil.Prettify(s)
  13448. }
  13449. // GoString returns the string representation
  13450. func (s MultipartUpload) GoString() string {
  13451. return s.String()
  13452. }
  13453. // SetInitiated sets the Initiated field's value.
  13454. func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
  13455. s.Initiated = &v
  13456. return s
  13457. }
  13458. // SetInitiator sets the Initiator field's value.
  13459. func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
  13460. s.Initiator = v
  13461. return s
  13462. }
  13463. // SetKey sets the Key field's value.
  13464. func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
  13465. s.Key = &v
  13466. return s
  13467. }
  13468. // SetOwner sets the Owner field's value.
  13469. func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
  13470. s.Owner = v
  13471. return s
  13472. }
  13473. // SetStorageClass sets the StorageClass field's value.
  13474. func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
  13475. s.StorageClass = &v
  13476. return s
  13477. }
  13478. // SetUploadId sets the UploadId field's value.
  13479. func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
  13480. s.UploadId = &v
  13481. return s
  13482. }
  13483. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  13484. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  13485. // configuration action on a bucket that has versioning enabled (or suspended)
  13486. // to request that Amazon S3 delete noncurrent object versions at a specific
  13487. // period in the object's lifetime.
  13488. type NoncurrentVersionExpiration struct {
  13489. _ struct{} `type:"structure"`
  13490. // Specifies the number of days an object is noncurrent before Amazon S3 can
  13491. // perform the associated action. For information about the noncurrent days
  13492. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  13493. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  13494. NoncurrentDays *int64 `type:"integer"`
  13495. }
  13496. // String returns the string representation
  13497. func (s NoncurrentVersionExpiration) String() string {
  13498. return awsutil.Prettify(s)
  13499. }
  13500. // GoString returns the string representation
  13501. func (s NoncurrentVersionExpiration) GoString() string {
  13502. return s.String()
  13503. }
  13504. // SetNoncurrentDays sets the NoncurrentDays field's value.
  13505. func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
  13506. s.NoncurrentDays = &v
  13507. return s
  13508. }
  13509. // Container for the transition rule that describes when noncurrent objects
  13510. // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your
  13511. // bucket is versioning-enabled (or versioning is suspended), you can set this
  13512. // action to request that Amazon S3 transition noncurrent object versions to
  13513. // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period
  13514. // in the object's lifetime.
  13515. type NoncurrentVersionTransition struct {
  13516. _ struct{} `type:"structure"`
  13517. // Specifies the number of days an object is noncurrent before Amazon S3 can
  13518. // perform the associated action. For information about the noncurrent days
  13519. // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
  13520. // (http://docs.aws.amazon.com/AmazonS3/latest/dev/s3-access-control.html)
  13521. NoncurrentDays *int64 `type:"integer"`
  13522. // The class of storage used to store the object.
  13523. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  13524. }
  13525. // String returns the string representation
  13526. func (s NoncurrentVersionTransition) String() string {
  13527. return awsutil.Prettify(s)
  13528. }
  13529. // GoString returns the string representation
  13530. func (s NoncurrentVersionTransition) GoString() string {
  13531. return s.String()
  13532. }
  13533. // SetNoncurrentDays sets the NoncurrentDays field's value.
  13534. func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
  13535. s.NoncurrentDays = &v
  13536. return s
  13537. }
  13538. // SetStorageClass sets the StorageClass field's value.
  13539. func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
  13540. s.StorageClass = &v
  13541. return s
  13542. }
  13543. // Container for specifying the notification configuration of the bucket. If
  13544. // this element is empty, notifications are turned off on the bucket.
  13545. type NotificationConfiguration struct {
  13546. _ struct{} `type:"structure"`
  13547. LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
  13548. QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
  13549. TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
  13550. }
  13551. // String returns the string representation
  13552. func (s NotificationConfiguration) String() string {
  13553. return awsutil.Prettify(s)
  13554. }
  13555. // GoString returns the string representation
  13556. func (s NotificationConfiguration) GoString() string {
  13557. return s.String()
  13558. }
  13559. // Validate inspects the fields of the type to determine if they are valid.
  13560. func (s *NotificationConfiguration) Validate() error {
  13561. invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
  13562. if s.LambdaFunctionConfigurations != nil {
  13563. for i, v := range s.LambdaFunctionConfigurations {
  13564. if v == nil {
  13565. continue
  13566. }
  13567. if err := v.Validate(); err != nil {
  13568. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
  13569. }
  13570. }
  13571. }
  13572. if s.QueueConfigurations != nil {
  13573. for i, v := range s.QueueConfigurations {
  13574. if v == nil {
  13575. continue
  13576. }
  13577. if err := v.Validate(); err != nil {
  13578. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
  13579. }
  13580. }
  13581. }
  13582. if s.TopicConfigurations != nil {
  13583. for i, v := range s.TopicConfigurations {
  13584. if v == nil {
  13585. continue
  13586. }
  13587. if err := v.Validate(); err != nil {
  13588. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
  13589. }
  13590. }
  13591. }
  13592. if invalidParams.Len() > 0 {
  13593. return invalidParams
  13594. }
  13595. return nil
  13596. }
  13597. // SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
  13598. func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
  13599. s.LambdaFunctionConfigurations = v
  13600. return s
  13601. }
  13602. // SetQueueConfigurations sets the QueueConfigurations field's value.
  13603. func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
  13604. s.QueueConfigurations = v
  13605. return s
  13606. }
  13607. // SetTopicConfigurations sets the TopicConfigurations field's value.
  13608. func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
  13609. s.TopicConfigurations = v
  13610. return s
  13611. }
  13612. type NotificationConfigurationDeprecated struct {
  13613. _ struct{} `type:"structure"`
  13614. CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
  13615. QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
  13616. TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
  13617. }
  13618. // String returns the string representation
  13619. func (s NotificationConfigurationDeprecated) String() string {
  13620. return awsutil.Prettify(s)
  13621. }
  13622. // GoString returns the string representation
  13623. func (s NotificationConfigurationDeprecated) GoString() string {
  13624. return s.String()
  13625. }
  13626. // SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
  13627. func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
  13628. s.CloudFunctionConfiguration = v
  13629. return s
  13630. }
  13631. // SetQueueConfiguration sets the QueueConfiguration field's value.
  13632. func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13633. s.QueueConfiguration = v
  13634. return s
  13635. }
  13636. // SetTopicConfiguration sets the TopicConfiguration field's value.
  13637. func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
  13638. s.TopicConfiguration = v
  13639. return s
  13640. }
  13641. // Container for object key name filtering rules. For information about key
  13642. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  13643. type NotificationConfigurationFilter struct {
  13644. _ struct{} `type:"structure"`
  13645. // Container for object key name prefix and suffix filtering rules.
  13646. Key *KeyFilter `locationName:"S3Key" type:"structure"`
  13647. }
  13648. // String returns the string representation
  13649. func (s NotificationConfigurationFilter) String() string {
  13650. return awsutil.Prettify(s)
  13651. }
  13652. // GoString returns the string representation
  13653. func (s NotificationConfigurationFilter) GoString() string {
  13654. return s.String()
  13655. }
  13656. // SetKey sets the Key field's value.
  13657. func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
  13658. s.Key = v
  13659. return s
  13660. }
  13661. type Object struct {
  13662. _ struct{} `type:"structure"`
  13663. ETag *string `type:"string"`
  13664. Key *string `min:"1" type:"string"`
  13665. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13666. Owner *Owner `type:"structure"`
  13667. Size *int64 `type:"integer"`
  13668. // The class of storage used to store the object.
  13669. StorageClass *string `type:"string" enum:"ObjectStorageClass"`
  13670. }
  13671. // String returns the string representation
  13672. func (s Object) String() string {
  13673. return awsutil.Prettify(s)
  13674. }
  13675. // GoString returns the string representation
  13676. func (s Object) GoString() string {
  13677. return s.String()
  13678. }
  13679. // SetETag sets the ETag field's value.
  13680. func (s *Object) SetETag(v string) *Object {
  13681. s.ETag = &v
  13682. return s
  13683. }
  13684. // SetKey sets the Key field's value.
  13685. func (s *Object) SetKey(v string) *Object {
  13686. s.Key = &v
  13687. return s
  13688. }
  13689. // SetLastModified sets the LastModified field's value.
  13690. func (s *Object) SetLastModified(v time.Time) *Object {
  13691. s.LastModified = &v
  13692. return s
  13693. }
  13694. // SetOwner sets the Owner field's value.
  13695. func (s *Object) SetOwner(v *Owner) *Object {
  13696. s.Owner = v
  13697. return s
  13698. }
  13699. // SetSize sets the Size field's value.
  13700. func (s *Object) SetSize(v int64) *Object {
  13701. s.Size = &v
  13702. return s
  13703. }
  13704. // SetStorageClass sets the StorageClass field's value.
  13705. func (s *Object) SetStorageClass(v string) *Object {
  13706. s.StorageClass = &v
  13707. return s
  13708. }
  13709. type ObjectIdentifier struct {
  13710. _ struct{} `type:"structure"`
  13711. // Key name of the object to delete.
  13712. //
  13713. // Key is a required field
  13714. Key *string `min:"1" type:"string" required:"true"`
  13715. // VersionId for the specific version of the object to delete.
  13716. VersionId *string `type:"string"`
  13717. }
  13718. // String returns the string representation
  13719. func (s ObjectIdentifier) String() string {
  13720. return awsutil.Prettify(s)
  13721. }
  13722. // GoString returns the string representation
  13723. func (s ObjectIdentifier) GoString() string {
  13724. return s.String()
  13725. }
  13726. // Validate inspects the fields of the type to determine if they are valid.
  13727. func (s *ObjectIdentifier) Validate() error {
  13728. invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
  13729. if s.Key == nil {
  13730. invalidParams.Add(request.NewErrParamRequired("Key"))
  13731. }
  13732. if s.Key != nil && len(*s.Key) < 1 {
  13733. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  13734. }
  13735. if invalidParams.Len() > 0 {
  13736. return invalidParams
  13737. }
  13738. return nil
  13739. }
  13740. // SetKey sets the Key field's value.
  13741. func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
  13742. s.Key = &v
  13743. return s
  13744. }
  13745. // SetVersionId sets the VersionId field's value.
  13746. func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
  13747. s.VersionId = &v
  13748. return s
  13749. }
  13750. type ObjectVersion struct {
  13751. _ struct{} `type:"structure"`
  13752. ETag *string `type:"string"`
  13753. // Specifies whether the object is (true) or is not (false) the latest version
  13754. // of an object.
  13755. IsLatest *bool `type:"boolean"`
  13756. // The object key.
  13757. Key *string `min:"1" type:"string"`
  13758. // Date and time the object was last modified.
  13759. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13760. Owner *Owner `type:"structure"`
  13761. // Size in bytes of the object.
  13762. Size *int64 `type:"integer"`
  13763. // The class of storage used to store the object.
  13764. StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
  13765. // Version ID of an object.
  13766. VersionId *string `type:"string"`
  13767. }
  13768. // String returns the string representation
  13769. func (s ObjectVersion) String() string {
  13770. return awsutil.Prettify(s)
  13771. }
  13772. // GoString returns the string representation
  13773. func (s ObjectVersion) GoString() string {
  13774. return s.String()
  13775. }
  13776. // SetETag sets the ETag field's value.
  13777. func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
  13778. s.ETag = &v
  13779. return s
  13780. }
  13781. // SetIsLatest sets the IsLatest field's value.
  13782. func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
  13783. s.IsLatest = &v
  13784. return s
  13785. }
  13786. // SetKey sets the Key field's value.
  13787. func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
  13788. s.Key = &v
  13789. return s
  13790. }
  13791. // SetLastModified sets the LastModified field's value.
  13792. func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
  13793. s.LastModified = &v
  13794. return s
  13795. }
  13796. // SetOwner sets the Owner field's value.
  13797. func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
  13798. s.Owner = v
  13799. return s
  13800. }
  13801. // SetSize sets the Size field's value.
  13802. func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
  13803. s.Size = &v
  13804. return s
  13805. }
  13806. // SetStorageClass sets the StorageClass field's value.
  13807. func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
  13808. s.StorageClass = &v
  13809. return s
  13810. }
  13811. // SetVersionId sets the VersionId field's value.
  13812. func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
  13813. s.VersionId = &v
  13814. return s
  13815. }
  13816. // Describes the location where the restore job's output is stored.
  13817. type OutputLocation struct {
  13818. _ struct{} `type:"structure"`
  13819. // Describes an S3 location that will receive the results of the restore request.
  13820. S3 *Location `type:"structure"`
  13821. }
  13822. // String returns the string representation
  13823. func (s OutputLocation) String() string {
  13824. return awsutil.Prettify(s)
  13825. }
  13826. // GoString returns the string representation
  13827. func (s OutputLocation) GoString() string {
  13828. return s.String()
  13829. }
  13830. // Validate inspects the fields of the type to determine if they are valid.
  13831. func (s *OutputLocation) Validate() error {
  13832. invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
  13833. if s.S3 != nil {
  13834. if err := s.S3.Validate(); err != nil {
  13835. invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
  13836. }
  13837. }
  13838. if invalidParams.Len() > 0 {
  13839. return invalidParams
  13840. }
  13841. return nil
  13842. }
  13843. // SetS3 sets the S3 field's value.
  13844. func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
  13845. s.S3 = v
  13846. return s
  13847. }
  13848. // Describes how results of the Select job are serialized.
  13849. type OutputSerialization struct {
  13850. _ struct{} `type:"structure"`
  13851. // Describes the serialization of CSV-encoded Select results.
  13852. CSV *CSVOutput `type:"structure"`
  13853. // Specifies JSON as request's output serialization format.
  13854. JSON *JSONOutput `type:"structure"`
  13855. }
  13856. // String returns the string representation
  13857. func (s OutputSerialization) String() string {
  13858. return awsutil.Prettify(s)
  13859. }
  13860. // GoString returns the string representation
  13861. func (s OutputSerialization) GoString() string {
  13862. return s.String()
  13863. }
  13864. // SetCSV sets the CSV field's value.
  13865. func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
  13866. s.CSV = v
  13867. return s
  13868. }
  13869. // SetJSON sets the JSON field's value.
  13870. func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
  13871. s.JSON = v
  13872. return s
  13873. }
  13874. type Owner struct {
  13875. _ struct{} `type:"structure"`
  13876. DisplayName *string `type:"string"`
  13877. ID *string `type:"string"`
  13878. }
  13879. // String returns the string representation
  13880. func (s Owner) String() string {
  13881. return awsutil.Prettify(s)
  13882. }
  13883. // GoString returns the string representation
  13884. func (s Owner) GoString() string {
  13885. return s.String()
  13886. }
  13887. // SetDisplayName sets the DisplayName field's value.
  13888. func (s *Owner) SetDisplayName(v string) *Owner {
  13889. s.DisplayName = &v
  13890. return s
  13891. }
  13892. // SetID sets the ID field's value.
  13893. func (s *Owner) SetID(v string) *Owner {
  13894. s.ID = &v
  13895. return s
  13896. }
  13897. type Part struct {
  13898. _ struct{} `type:"structure"`
  13899. // Entity tag returned when the part was uploaded.
  13900. ETag *string `type:"string"`
  13901. // Date and time at which the part was uploaded.
  13902. LastModified *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  13903. // Part number identifying the part. This is a positive integer between 1 and
  13904. // 10,000.
  13905. PartNumber *int64 `type:"integer"`
  13906. // Size of the uploaded part data.
  13907. Size *int64 `type:"integer"`
  13908. }
  13909. // String returns the string representation
  13910. func (s Part) String() string {
  13911. return awsutil.Prettify(s)
  13912. }
  13913. // GoString returns the string representation
  13914. func (s Part) GoString() string {
  13915. return s.String()
  13916. }
  13917. // SetETag sets the ETag field's value.
  13918. func (s *Part) SetETag(v string) *Part {
  13919. s.ETag = &v
  13920. return s
  13921. }
  13922. // SetLastModified sets the LastModified field's value.
  13923. func (s *Part) SetLastModified(v time.Time) *Part {
  13924. s.LastModified = &v
  13925. return s
  13926. }
  13927. // SetPartNumber sets the PartNumber field's value.
  13928. func (s *Part) SetPartNumber(v int64) *Part {
  13929. s.PartNumber = &v
  13930. return s
  13931. }
  13932. // SetSize sets the Size field's value.
  13933. func (s *Part) SetSize(v int64) *Part {
  13934. s.Size = &v
  13935. return s
  13936. }
  13937. type PutBucketAccelerateConfigurationInput struct {
  13938. _ struct{} `type:"structure" payload:"AccelerateConfiguration"`
  13939. // Specifies the Accelerate Configuration you want to set for the bucket.
  13940. //
  13941. // AccelerateConfiguration is a required field
  13942. AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  13943. // Name of the bucket for which the accelerate configuration is set.
  13944. //
  13945. // Bucket is a required field
  13946. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  13947. }
  13948. // String returns the string representation
  13949. func (s PutBucketAccelerateConfigurationInput) String() string {
  13950. return awsutil.Prettify(s)
  13951. }
  13952. // GoString returns the string representation
  13953. func (s PutBucketAccelerateConfigurationInput) GoString() string {
  13954. return s.String()
  13955. }
  13956. // Validate inspects the fields of the type to determine if they are valid.
  13957. func (s *PutBucketAccelerateConfigurationInput) Validate() error {
  13958. invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
  13959. if s.AccelerateConfiguration == nil {
  13960. invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
  13961. }
  13962. if s.Bucket == nil {
  13963. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  13964. }
  13965. if invalidParams.Len() > 0 {
  13966. return invalidParams
  13967. }
  13968. return nil
  13969. }
  13970. // SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
  13971. func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
  13972. s.AccelerateConfiguration = v
  13973. return s
  13974. }
  13975. // SetBucket sets the Bucket field's value.
  13976. func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
  13977. s.Bucket = &v
  13978. return s
  13979. }
  13980. func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
  13981. if s.Bucket == nil {
  13982. return v
  13983. }
  13984. return *s.Bucket
  13985. }
  13986. type PutBucketAccelerateConfigurationOutput struct {
  13987. _ struct{} `type:"structure"`
  13988. }
  13989. // String returns the string representation
  13990. func (s PutBucketAccelerateConfigurationOutput) String() string {
  13991. return awsutil.Prettify(s)
  13992. }
  13993. // GoString returns the string representation
  13994. func (s PutBucketAccelerateConfigurationOutput) GoString() string {
  13995. return s.String()
  13996. }
  13997. type PutBucketAclInput struct {
  13998. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  13999. // The canned ACL to apply to the bucket.
  14000. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
  14001. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14002. // Bucket is a required field
  14003. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14004. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  14005. // bucket.
  14006. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  14007. // Allows grantee to list the objects in the bucket.
  14008. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  14009. // Allows grantee to read the bucket ACL.
  14010. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  14011. // Allows grantee to create, overwrite, and delete any object in the bucket.
  14012. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  14013. // Allows grantee to write the ACL for the applicable bucket.
  14014. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  14015. }
  14016. // String returns the string representation
  14017. func (s PutBucketAclInput) String() string {
  14018. return awsutil.Prettify(s)
  14019. }
  14020. // GoString returns the string representation
  14021. func (s PutBucketAclInput) GoString() string {
  14022. return s.String()
  14023. }
  14024. // Validate inspects the fields of the type to determine if they are valid.
  14025. func (s *PutBucketAclInput) Validate() error {
  14026. invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
  14027. if s.Bucket == nil {
  14028. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14029. }
  14030. if s.AccessControlPolicy != nil {
  14031. if err := s.AccessControlPolicy.Validate(); err != nil {
  14032. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  14033. }
  14034. }
  14035. if invalidParams.Len() > 0 {
  14036. return invalidParams
  14037. }
  14038. return nil
  14039. }
  14040. // SetACL sets the ACL field's value.
  14041. func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
  14042. s.ACL = &v
  14043. return s
  14044. }
  14045. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  14046. func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
  14047. s.AccessControlPolicy = v
  14048. return s
  14049. }
  14050. // SetBucket sets the Bucket field's value.
  14051. func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
  14052. s.Bucket = &v
  14053. return s
  14054. }
  14055. func (s *PutBucketAclInput) getBucket() (v string) {
  14056. if s.Bucket == nil {
  14057. return v
  14058. }
  14059. return *s.Bucket
  14060. }
  14061. // SetGrantFullControl sets the GrantFullControl field's value.
  14062. func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
  14063. s.GrantFullControl = &v
  14064. return s
  14065. }
  14066. // SetGrantRead sets the GrantRead field's value.
  14067. func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
  14068. s.GrantRead = &v
  14069. return s
  14070. }
  14071. // SetGrantReadACP sets the GrantReadACP field's value.
  14072. func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
  14073. s.GrantReadACP = &v
  14074. return s
  14075. }
  14076. // SetGrantWrite sets the GrantWrite field's value.
  14077. func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
  14078. s.GrantWrite = &v
  14079. return s
  14080. }
  14081. // SetGrantWriteACP sets the GrantWriteACP field's value.
  14082. func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
  14083. s.GrantWriteACP = &v
  14084. return s
  14085. }
  14086. type PutBucketAclOutput struct {
  14087. _ struct{} `type:"structure"`
  14088. }
  14089. // String returns the string representation
  14090. func (s PutBucketAclOutput) String() string {
  14091. return awsutil.Prettify(s)
  14092. }
  14093. // GoString returns the string representation
  14094. func (s PutBucketAclOutput) GoString() string {
  14095. return s.String()
  14096. }
  14097. type PutBucketAnalyticsConfigurationInput struct {
  14098. _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
  14099. // The configuration and any analyses for the analytics filter.
  14100. //
  14101. // AnalyticsConfiguration is a required field
  14102. AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14103. // The name of the bucket to which an analytics configuration is stored.
  14104. //
  14105. // Bucket is a required field
  14106. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14107. // The identifier used to represent an analytics configuration.
  14108. //
  14109. // Id is a required field
  14110. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14111. }
  14112. // String returns the string representation
  14113. func (s PutBucketAnalyticsConfigurationInput) String() string {
  14114. return awsutil.Prettify(s)
  14115. }
  14116. // GoString returns the string representation
  14117. func (s PutBucketAnalyticsConfigurationInput) GoString() string {
  14118. return s.String()
  14119. }
  14120. // Validate inspects the fields of the type to determine if they are valid.
  14121. func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
  14122. invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
  14123. if s.AnalyticsConfiguration == nil {
  14124. invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
  14125. }
  14126. if s.Bucket == nil {
  14127. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14128. }
  14129. if s.Id == nil {
  14130. invalidParams.Add(request.NewErrParamRequired("Id"))
  14131. }
  14132. if s.AnalyticsConfiguration != nil {
  14133. if err := s.AnalyticsConfiguration.Validate(); err != nil {
  14134. invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
  14135. }
  14136. }
  14137. if invalidParams.Len() > 0 {
  14138. return invalidParams
  14139. }
  14140. return nil
  14141. }
  14142. // SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
  14143. func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
  14144. s.AnalyticsConfiguration = v
  14145. return s
  14146. }
  14147. // SetBucket sets the Bucket field's value.
  14148. func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
  14149. s.Bucket = &v
  14150. return s
  14151. }
  14152. func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
  14153. if s.Bucket == nil {
  14154. return v
  14155. }
  14156. return *s.Bucket
  14157. }
  14158. // SetId sets the Id field's value.
  14159. func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
  14160. s.Id = &v
  14161. return s
  14162. }
  14163. type PutBucketAnalyticsConfigurationOutput struct {
  14164. _ struct{} `type:"structure"`
  14165. }
  14166. // String returns the string representation
  14167. func (s PutBucketAnalyticsConfigurationOutput) String() string {
  14168. return awsutil.Prettify(s)
  14169. }
  14170. // GoString returns the string representation
  14171. func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
  14172. return s.String()
  14173. }
  14174. type PutBucketCorsInput struct {
  14175. _ struct{} `type:"structure" payload:"CORSConfiguration"`
  14176. // Bucket is a required field
  14177. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14178. // CORSConfiguration is a required field
  14179. CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14180. }
  14181. // String returns the string representation
  14182. func (s PutBucketCorsInput) String() string {
  14183. return awsutil.Prettify(s)
  14184. }
  14185. // GoString returns the string representation
  14186. func (s PutBucketCorsInput) GoString() string {
  14187. return s.String()
  14188. }
  14189. // Validate inspects the fields of the type to determine if they are valid.
  14190. func (s *PutBucketCorsInput) Validate() error {
  14191. invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
  14192. if s.Bucket == nil {
  14193. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14194. }
  14195. if s.CORSConfiguration == nil {
  14196. invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
  14197. }
  14198. if s.CORSConfiguration != nil {
  14199. if err := s.CORSConfiguration.Validate(); err != nil {
  14200. invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
  14201. }
  14202. }
  14203. if invalidParams.Len() > 0 {
  14204. return invalidParams
  14205. }
  14206. return nil
  14207. }
  14208. // SetBucket sets the Bucket field's value.
  14209. func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
  14210. s.Bucket = &v
  14211. return s
  14212. }
  14213. func (s *PutBucketCorsInput) getBucket() (v string) {
  14214. if s.Bucket == nil {
  14215. return v
  14216. }
  14217. return *s.Bucket
  14218. }
  14219. // SetCORSConfiguration sets the CORSConfiguration field's value.
  14220. func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
  14221. s.CORSConfiguration = v
  14222. return s
  14223. }
  14224. type PutBucketCorsOutput struct {
  14225. _ struct{} `type:"structure"`
  14226. }
  14227. // String returns the string representation
  14228. func (s PutBucketCorsOutput) String() string {
  14229. return awsutil.Prettify(s)
  14230. }
  14231. // GoString returns the string representation
  14232. func (s PutBucketCorsOutput) GoString() string {
  14233. return s.String()
  14234. }
  14235. type PutBucketEncryptionInput struct {
  14236. _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
  14237. // The name of the bucket for which the server-side encryption configuration
  14238. // is set.
  14239. //
  14240. // Bucket is a required field
  14241. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14242. // Container for server-side encryption configuration rules. Currently S3 supports
  14243. // one rule only.
  14244. //
  14245. // ServerSideEncryptionConfiguration is a required field
  14246. ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14247. }
  14248. // String returns the string representation
  14249. func (s PutBucketEncryptionInput) String() string {
  14250. return awsutil.Prettify(s)
  14251. }
  14252. // GoString returns the string representation
  14253. func (s PutBucketEncryptionInput) GoString() string {
  14254. return s.String()
  14255. }
  14256. // Validate inspects the fields of the type to determine if they are valid.
  14257. func (s *PutBucketEncryptionInput) Validate() error {
  14258. invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
  14259. if s.Bucket == nil {
  14260. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14261. }
  14262. if s.ServerSideEncryptionConfiguration == nil {
  14263. invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
  14264. }
  14265. if s.ServerSideEncryptionConfiguration != nil {
  14266. if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
  14267. invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
  14268. }
  14269. }
  14270. if invalidParams.Len() > 0 {
  14271. return invalidParams
  14272. }
  14273. return nil
  14274. }
  14275. // SetBucket sets the Bucket field's value.
  14276. func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
  14277. s.Bucket = &v
  14278. return s
  14279. }
  14280. func (s *PutBucketEncryptionInput) getBucket() (v string) {
  14281. if s.Bucket == nil {
  14282. return v
  14283. }
  14284. return *s.Bucket
  14285. }
  14286. // SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
  14287. func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
  14288. s.ServerSideEncryptionConfiguration = v
  14289. return s
  14290. }
  14291. type PutBucketEncryptionOutput struct {
  14292. _ struct{} `type:"structure"`
  14293. }
  14294. // String returns the string representation
  14295. func (s PutBucketEncryptionOutput) String() string {
  14296. return awsutil.Prettify(s)
  14297. }
  14298. // GoString returns the string representation
  14299. func (s PutBucketEncryptionOutput) GoString() string {
  14300. return s.String()
  14301. }
  14302. type PutBucketInventoryConfigurationInput struct {
  14303. _ struct{} `type:"structure" payload:"InventoryConfiguration"`
  14304. // The name of the bucket where the inventory configuration will be stored.
  14305. //
  14306. // Bucket is a required field
  14307. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14308. // The ID used to identify the inventory configuration.
  14309. //
  14310. // Id is a required field
  14311. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14312. // Specifies the inventory configuration.
  14313. //
  14314. // InventoryConfiguration is a required field
  14315. InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14316. }
  14317. // String returns the string representation
  14318. func (s PutBucketInventoryConfigurationInput) String() string {
  14319. return awsutil.Prettify(s)
  14320. }
  14321. // GoString returns the string representation
  14322. func (s PutBucketInventoryConfigurationInput) GoString() string {
  14323. return s.String()
  14324. }
  14325. // Validate inspects the fields of the type to determine if they are valid.
  14326. func (s *PutBucketInventoryConfigurationInput) Validate() error {
  14327. invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
  14328. if s.Bucket == nil {
  14329. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14330. }
  14331. if s.Id == nil {
  14332. invalidParams.Add(request.NewErrParamRequired("Id"))
  14333. }
  14334. if s.InventoryConfiguration == nil {
  14335. invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
  14336. }
  14337. if s.InventoryConfiguration != nil {
  14338. if err := s.InventoryConfiguration.Validate(); err != nil {
  14339. invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
  14340. }
  14341. }
  14342. if invalidParams.Len() > 0 {
  14343. return invalidParams
  14344. }
  14345. return nil
  14346. }
  14347. // SetBucket sets the Bucket field's value.
  14348. func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
  14349. s.Bucket = &v
  14350. return s
  14351. }
  14352. func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
  14353. if s.Bucket == nil {
  14354. return v
  14355. }
  14356. return *s.Bucket
  14357. }
  14358. // SetId sets the Id field's value.
  14359. func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
  14360. s.Id = &v
  14361. return s
  14362. }
  14363. // SetInventoryConfiguration sets the InventoryConfiguration field's value.
  14364. func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
  14365. s.InventoryConfiguration = v
  14366. return s
  14367. }
  14368. type PutBucketInventoryConfigurationOutput struct {
  14369. _ struct{} `type:"structure"`
  14370. }
  14371. // String returns the string representation
  14372. func (s PutBucketInventoryConfigurationOutput) String() string {
  14373. return awsutil.Prettify(s)
  14374. }
  14375. // GoString returns the string representation
  14376. func (s PutBucketInventoryConfigurationOutput) GoString() string {
  14377. return s.String()
  14378. }
  14379. type PutBucketLifecycleConfigurationInput struct {
  14380. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  14381. // Bucket is a required field
  14382. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14383. LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14384. }
  14385. // String returns the string representation
  14386. func (s PutBucketLifecycleConfigurationInput) String() string {
  14387. return awsutil.Prettify(s)
  14388. }
  14389. // GoString returns the string representation
  14390. func (s PutBucketLifecycleConfigurationInput) GoString() string {
  14391. return s.String()
  14392. }
  14393. // Validate inspects the fields of the type to determine if they are valid.
  14394. func (s *PutBucketLifecycleConfigurationInput) Validate() error {
  14395. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
  14396. if s.Bucket == nil {
  14397. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14398. }
  14399. if s.LifecycleConfiguration != nil {
  14400. if err := s.LifecycleConfiguration.Validate(); err != nil {
  14401. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  14402. }
  14403. }
  14404. if invalidParams.Len() > 0 {
  14405. return invalidParams
  14406. }
  14407. return nil
  14408. }
  14409. // SetBucket sets the Bucket field's value.
  14410. func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
  14411. s.Bucket = &v
  14412. return s
  14413. }
  14414. func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
  14415. if s.Bucket == nil {
  14416. return v
  14417. }
  14418. return *s.Bucket
  14419. }
  14420. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  14421. func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
  14422. s.LifecycleConfiguration = v
  14423. return s
  14424. }
  14425. type PutBucketLifecycleConfigurationOutput struct {
  14426. _ struct{} `type:"structure"`
  14427. }
  14428. // String returns the string representation
  14429. func (s PutBucketLifecycleConfigurationOutput) String() string {
  14430. return awsutil.Prettify(s)
  14431. }
  14432. // GoString returns the string representation
  14433. func (s PutBucketLifecycleConfigurationOutput) GoString() string {
  14434. return s.String()
  14435. }
  14436. type PutBucketLifecycleInput struct {
  14437. _ struct{} `type:"structure" payload:"LifecycleConfiguration"`
  14438. // Bucket is a required field
  14439. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14440. LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14441. }
  14442. // String returns the string representation
  14443. func (s PutBucketLifecycleInput) String() string {
  14444. return awsutil.Prettify(s)
  14445. }
  14446. // GoString returns the string representation
  14447. func (s PutBucketLifecycleInput) GoString() string {
  14448. return s.String()
  14449. }
  14450. // Validate inspects the fields of the type to determine if they are valid.
  14451. func (s *PutBucketLifecycleInput) Validate() error {
  14452. invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
  14453. if s.Bucket == nil {
  14454. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14455. }
  14456. if s.LifecycleConfiguration != nil {
  14457. if err := s.LifecycleConfiguration.Validate(); err != nil {
  14458. invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
  14459. }
  14460. }
  14461. if invalidParams.Len() > 0 {
  14462. return invalidParams
  14463. }
  14464. return nil
  14465. }
  14466. // SetBucket sets the Bucket field's value.
  14467. func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
  14468. s.Bucket = &v
  14469. return s
  14470. }
  14471. func (s *PutBucketLifecycleInput) getBucket() (v string) {
  14472. if s.Bucket == nil {
  14473. return v
  14474. }
  14475. return *s.Bucket
  14476. }
  14477. // SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
  14478. func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
  14479. s.LifecycleConfiguration = v
  14480. return s
  14481. }
  14482. type PutBucketLifecycleOutput struct {
  14483. _ struct{} `type:"structure"`
  14484. }
  14485. // String returns the string representation
  14486. func (s PutBucketLifecycleOutput) String() string {
  14487. return awsutil.Prettify(s)
  14488. }
  14489. // GoString returns the string representation
  14490. func (s PutBucketLifecycleOutput) GoString() string {
  14491. return s.String()
  14492. }
  14493. type PutBucketLoggingInput struct {
  14494. _ struct{} `type:"structure" payload:"BucketLoggingStatus"`
  14495. // Bucket is a required field
  14496. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14497. // BucketLoggingStatus is a required field
  14498. BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14499. }
  14500. // String returns the string representation
  14501. func (s PutBucketLoggingInput) String() string {
  14502. return awsutil.Prettify(s)
  14503. }
  14504. // GoString returns the string representation
  14505. func (s PutBucketLoggingInput) GoString() string {
  14506. return s.String()
  14507. }
  14508. // Validate inspects the fields of the type to determine if they are valid.
  14509. func (s *PutBucketLoggingInput) Validate() error {
  14510. invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
  14511. if s.Bucket == nil {
  14512. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14513. }
  14514. if s.BucketLoggingStatus == nil {
  14515. invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
  14516. }
  14517. if s.BucketLoggingStatus != nil {
  14518. if err := s.BucketLoggingStatus.Validate(); err != nil {
  14519. invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
  14520. }
  14521. }
  14522. if invalidParams.Len() > 0 {
  14523. return invalidParams
  14524. }
  14525. return nil
  14526. }
  14527. // SetBucket sets the Bucket field's value.
  14528. func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
  14529. s.Bucket = &v
  14530. return s
  14531. }
  14532. func (s *PutBucketLoggingInput) getBucket() (v string) {
  14533. if s.Bucket == nil {
  14534. return v
  14535. }
  14536. return *s.Bucket
  14537. }
  14538. // SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
  14539. func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
  14540. s.BucketLoggingStatus = v
  14541. return s
  14542. }
  14543. type PutBucketLoggingOutput struct {
  14544. _ struct{} `type:"structure"`
  14545. }
  14546. // String returns the string representation
  14547. func (s PutBucketLoggingOutput) String() string {
  14548. return awsutil.Prettify(s)
  14549. }
  14550. // GoString returns the string representation
  14551. func (s PutBucketLoggingOutput) GoString() string {
  14552. return s.String()
  14553. }
  14554. type PutBucketMetricsConfigurationInput struct {
  14555. _ struct{} `type:"structure" payload:"MetricsConfiguration"`
  14556. // The name of the bucket for which the metrics configuration is set.
  14557. //
  14558. // Bucket is a required field
  14559. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14560. // The ID used to identify the metrics configuration.
  14561. //
  14562. // Id is a required field
  14563. Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
  14564. // Specifies the metrics configuration.
  14565. //
  14566. // MetricsConfiguration is a required field
  14567. MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14568. }
  14569. // String returns the string representation
  14570. func (s PutBucketMetricsConfigurationInput) String() string {
  14571. return awsutil.Prettify(s)
  14572. }
  14573. // GoString returns the string representation
  14574. func (s PutBucketMetricsConfigurationInput) GoString() string {
  14575. return s.String()
  14576. }
  14577. // Validate inspects the fields of the type to determine if they are valid.
  14578. func (s *PutBucketMetricsConfigurationInput) Validate() error {
  14579. invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
  14580. if s.Bucket == nil {
  14581. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14582. }
  14583. if s.Id == nil {
  14584. invalidParams.Add(request.NewErrParamRequired("Id"))
  14585. }
  14586. if s.MetricsConfiguration == nil {
  14587. invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
  14588. }
  14589. if s.MetricsConfiguration != nil {
  14590. if err := s.MetricsConfiguration.Validate(); err != nil {
  14591. invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
  14592. }
  14593. }
  14594. if invalidParams.Len() > 0 {
  14595. return invalidParams
  14596. }
  14597. return nil
  14598. }
  14599. // SetBucket sets the Bucket field's value.
  14600. func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
  14601. s.Bucket = &v
  14602. return s
  14603. }
  14604. func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
  14605. if s.Bucket == nil {
  14606. return v
  14607. }
  14608. return *s.Bucket
  14609. }
  14610. // SetId sets the Id field's value.
  14611. func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
  14612. s.Id = &v
  14613. return s
  14614. }
  14615. // SetMetricsConfiguration sets the MetricsConfiguration field's value.
  14616. func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
  14617. s.MetricsConfiguration = v
  14618. return s
  14619. }
  14620. type PutBucketMetricsConfigurationOutput struct {
  14621. _ struct{} `type:"structure"`
  14622. }
  14623. // String returns the string representation
  14624. func (s PutBucketMetricsConfigurationOutput) String() string {
  14625. return awsutil.Prettify(s)
  14626. }
  14627. // GoString returns the string representation
  14628. func (s PutBucketMetricsConfigurationOutput) GoString() string {
  14629. return s.String()
  14630. }
  14631. type PutBucketNotificationConfigurationInput struct {
  14632. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14633. // Bucket is a required field
  14634. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14635. // Container for specifying the notification configuration of the bucket. If
  14636. // this element is empty, notifications are turned off on the bucket.
  14637. //
  14638. // NotificationConfiguration is a required field
  14639. NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14640. }
  14641. // String returns the string representation
  14642. func (s PutBucketNotificationConfigurationInput) String() string {
  14643. return awsutil.Prettify(s)
  14644. }
  14645. // GoString returns the string representation
  14646. func (s PutBucketNotificationConfigurationInput) GoString() string {
  14647. return s.String()
  14648. }
  14649. // Validate inspects the fields of the type to determine if they are valid.
  14650. func (s *PutBucketNotificationConfigurationInput) Validate() error {
  14651. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
  14652. if s.Bucket == nil {
  14653. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14654. }
  14655. if s.NotificationConfiguration == nil {
  14656. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  14657. }
  14658. if s.NotificationConfiguration != nil {
  14659. if err := s.NotificationConfiguration.Validate(); err != nil {
  14660. invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
  14661. }
  14662. }
  14663. if invalidParams.Len() > 0 {
  14664. return invalidParams
  14665. }
  14666. return nil
  14667. }
  14668. // SetBucket sets the Bucket field's value.
  14669. func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
  14670. s.Bucket = &v
  14671. return s
  14672. }
  14673. func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
  14674. if s.Bucket == nil {
  14675. return v
  14676. }
  14677. return *s.Bucket
  14678. }
  14679. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  14680. func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
  14681. s.NotificationConfiguration = v
  14682. return s
  14683. }
  14684. type PutBucketNotificationConfigurationOutput struct {
  14685. _ struct{} `type:"structure"`
  14686. }
  14687. // String returns the string representation
  14688. func (s PutBucketNotificationConfigurationOutput) String() string {
  14689. return awsutil.Prettify(s)
  14690. }
  14691. // GoString returns the string representation
  14692. func (s PutBucketNotificationConfigurationOutput) GoString() string {
  14693. return s.String()
  14694. }
  14695. type PutBucketNotificationInput struct {
  14696. _ struct{} `type:"structure" payload:"NotificationConfiguration"`
  14697. // Bucket is a required field
  14698. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14699. // NotificationConfiguration is a required field
  14700. NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14701. }
  14702. // String returns the string representation
  14703. func (s PutBucketNotificationInput) String() string {
  14704. return awsutil.Prettify(s)
  14705. }
  14706. // GoString returns the string representation
  14707. func (s PutBucketNotificationInput) GoString() string {
  14708. return s.String()
  14709. }
  14710. // Validate inspects the fields of the type to determine if they are valid.
  14711. func (s *PutBucketNotificationInput) Validate() error {
  14712. invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
  14713. if s.Bucket == nil {
  14714. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14715. }
  14716. if s.NotificationConfiguration == nil {
  14717. invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
  14718. }
  14719. if invalidParams.Len() > 0 {
  14720. return invalidParams
  14721. }
  14722. return nil
  14723. }
  14724. // SetBucket sets the Bucket field's value.
  14725. func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
  14726. s.Bucket = &v
  14727. return s
  14728. }
  14729. func (s *PutBucketNotificationInput) getBucket() (v string) {
  14730. if s.Bucket == nil {
  14731. return v
  14732. }
  14733. return *s.Bucket
  14734. }
  14735. // SetNotificationConfiguration sets the NotificationConfiguration field's value.
  14736. func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
  14737. s.NotificationConfiguration = v
  14738. return s
  14739. }
  14740. type PutBucketNotificationOutput struct {
  14741. _ struct{} `type:"structure"`
  14742. }
  14743. // String returns the string representation
  14744. func (s PutBucketNotificationOutput) String() string {
  14745. return awsutil.Prettify(s)
  14746. }
  14747. // GoString returns the string representation
  14748. func (s PutBucketNotificationOutput) GoString() string {
  14749. return s.String()
  14750. }
  14751. type PutBucketPolicyInput struct {
  14752. _ struct{} `type:"structure" payload:"Policy"`
  14753. // Bucket is a required field
  14754. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14755. // Set this parameter to true to confirm that you want to remove your permissions
  14756. // to change this bucket policy in the future.
  14757. ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
  14758. // The bucket policy as a JSON document.
  14759. //
  14760. // Policy is a required field
  14761. Policy *string `type:"string" required:"true"`
  14762. }
  14763. // String returns the string representation
  14764. func (s PutBucketPolicyInput) String() string {
  14765. return awsutil.Prettify(s)
  14766. }
  14767. // GoString returns the string representation
  14768. func (s PutBucketPolicyInput) GoString() string {
  14769. return s.String()
  14770. }
  14771. // Validate inspects the fields of the type to determine if they are valid.
  14772. func (s *PutBucketPolicyInput) Validate() error {
  14773. invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
  14774. if s.Bucket == nil {
  14775. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14776. }
  14777. if s.Policy == nil {
  14778. invalidParams.Add(request.NewErrParamRequired("Policy"))
  14779. }
  14780. if invalidParams.Len() > 0 {
  14781. return invalidParams
  14782. }
  14783. return nil
  14784. }
  14785. // SetBucket sets the Bucket field's value.
  14786. func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
  14787. s.Bucket = &v
  14788. return s
  14789. }
  14790. func (s *PutBucketPolicyInput) getBucket() (v string) {
  14791. if s.Bucket == nil {
  14792. return v
  14793. }
  14794. return *s.Bucket
  14795. }
  14796. // SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
  14797. func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
  14798. s.ConfirmRemoveSelfBucketAccess = &v
  14799. return s
  14800. }
  14801. // SetPolicy sets the Policy field's value.
  14802. func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
  14803. s.Policy = &v
  14804. return s
  14805. }
  14806. type PutBucketPolicyOutput struct {
  14807. _ struct{} `type:"structure"`
  14808. }
  14809. // String returns the string representation
  14810. func (s PutBucketPolicyOutput) String() string {
  14811. return awsutil.Prettify(s)
  14812. }
  14813. // GoString returns the string representation
  14814. func (s PutBucketPolicyOutput) GoString() string {
  14815. return s.String()
  14816. }
  14817. type PutBucketReplicationInput struct {
  14818. _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
  14819. // Bucket is a required field
  14820. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14821. // Container for replication rules. You can add as many as 1,000 rules. Total
  14822. // replication configuration size can be up to 2 MB.
  14823. //
  14824. // ReplicationConfiguration is a required field
  14825. ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14826. }
  14827. // String returns the string representation
  14828. func (s PutBucketReplicationInput) String() string {
  14829. return awsutil.Prettify(s)
  14830. }
  14831. // GoString returns the string representation
  14832. func (s PutBucketReplicationInput) GoString() string {
  14833. return s.String()
  14834. }
  14835. // Validate inspects the fields of the type to determine if they are valid.
  14836. func (s *PutBucketReplicationInput) Validate() error {
  14837. invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
  14838. if s.Bucket == nil {
  14839. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14840. }
  14841. if s.ReplicationConfiguration == nil {
  14842. invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
  14843. }
  14844. if s.ReplicationConfiguration != nil {
  14845. if err := s.ReplicationConfiguration.Validate(); err != nil {
  14846. invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
  14847. }
  14848. }
  14849. if invalidParams.Len() > 0 {
  14850. return invalidParams
  14851. }
  14852. return nil
  14853. }
  14854. // SetBucket sets the Bucket field's value.
  14855. func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
  14856. s.Bucket = &v
  14857. return s
  14858. }
  14859. func (s *PutBucketReplicationInput) getBucket() (v string) {
  14860. if s.Bucket == nil {
  14861. return v
  14862. }
  14863. return *s.Bucket
  14864. }
  14865. // SetReplicationConfiguration sets the ReplicationConfiguration field's value.
  14866. func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
  14867. s.ReplicationConfiguration = v
  14868. return s
  14869. }
  14870. type PutBucketReplicationOutput struct {
  14871. _ struct{} `type:"structure"`
  14872. }
  14873. // String returns the string representation
  14874. func (s PutBucketReplicationOutput) String() string {
  14875. return awsutil.Prettify(s)
  14876. }
  14877. // GoString returns the string representation
  14878. func (s PutBucketReplicationOutput) GoString() string {
  14879. return s.String()
  14880. }
  14881. type PutBucketRequestPaymentInput struct {
  14882. _ struct{} `type:"structure" payload:"RequestPaymentConfiguration"`
  14883. // Bucket is a required field
  14884. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14885. // RequestPaymentConfiguration is a required field
  14886. RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14887. }
  14888. // String returns the string representation
  14889. func (s PutBucketRequestPaymentInput) String() string {
  14890. return awsutil.Prettify(s)
  14891. }
  14892. // GoString returns the string representation
  14893. func (s PutBucketRequestPaymentInput) GoString() string {
  14894. return s.String()
  14895. }
  14896. // Validate inspects the fields of the type to determine if they are valid.
  14897. func (s *PutBucketRequestPaymentInput) Validate() error {
  14898. invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
  14899. if s.Bucket == nil {
  14900. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14901. }
  14902. if s.RequestPaymentConfiguration == nil {
  14903. invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
  14904. }
  14905. if s.RequestPaymentConfiguration != nil {
  14906. if err := s.RequestPaymentConfiguration.Validate(); err != nil {
  14907. invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
  14908. }
  14909. }
  14910. if invalidParams.Len() > 0 {
  14911. return invalidParams
  14912. }
  14913. return nil
  14914. }
  14915. // SetBucket sets the Bucket field's value.
  14916. func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
  14917. s.Bucket = &v
  14918. return s
  14919. }
  14920. func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
  14921. if s.Bucket == nil {
  14922. return v
  14923. }
  14924. return *s.Bucket
  14925. }
  14926. // SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
  14927. func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
  14928. s.RequestPaymentConfiguration = v
  14929. return s
  14930. }
  14931. type PutBucketRequestPaymentOutput struct {
  14932. _ struct{} `type:"structure"`
  14933. }
  14934. // String returns the string representation
  14935. func (s PutBucketRequestPaymentOutput) String() string {
  14936. return awsutil.Prettify(s)
  14937. }
  14938. // GoString returns the string representation
  14939. func (s PutBucketRequestPaymentOutput) GoString() string {
  14940. return s.String()
  14941. }
  14942. type PutBucketTaggingInput struct {
  14943. _ struct{} `type:"structure" payload:"Tagging"`
  14944. // Bucket is a required field
  14945. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  14946. // Tagging is a required field
  14947. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  14948. }
  14949. // String returns the string representation
  14950. func (s PutBucketTaggingInput) String() string {
  14951. return awsutil.Prettify(s)
  14952. }
  14953. // GoString returns the string representation
  14954. func (s PutBucketTaggingInput) GoString() string {
  14955. return s.String()
  14956. }
  14957. // Validate inspects the fields of the type to determine if they are valid.
  14958. func (s *PutBucketTaggingInput) Validate() error {
  14959. invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
  14960. if s.Bucket == nil {
  14961. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  14962. }
  14963. if s.Tagging == nil {
  14964. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  14965. }
  14966. if s.Tagging != nil {
  14967. if err := s.Tagging.Validate(); err != nil {
  14968. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  14969. }
  14970. }
  14971. if invalidParams.Len() > 0 {
  14972. return invalidParams
  14973. }
  14974. return nil
  14975. }
  14976. // SetBucket sets the Bucket field's value.
  14977. func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
  14978. s.Bucket = &v
  14979. return s
  14980. }
  14981. func (s *PutBucketTaggingInput) getBucket() (v string) {
  14982. if s.Bucket == nil {
  14983. return v
  14984. }
  14985. return *s.Bucket
  14986. }
  14987. // SetTagging sets the Tagging field's value.
  14988. func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
  14989. s.Tagging = v
  14990. return s
  14991. }
  14992. type PutBucketTaggingOutput struct {
  14993. _ struct{} `type:"structure"`
  14994. }
  14995. // String returns the string representation
  14996. func (s PutBucketTaggingOutput) String() string {
  14997. return awsutil.Prettify(s)
  14998. }
  14999. // GoString returns the string representation
  15000. func (s PutBucketTaggingOutput) GoString() string {
  15001. return s.String()
  15002. }
  15003. type PutBucketVersioningInput struct {
  15004. _ struct{} `type:"structure" payload:"VersioningConfiguration"`
  15005. // Bucket is a required field
  15006. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15007. // The concatenation of the authentication device's serial number, a space,
  15008. // and the value that is displayed on your authentication device.
  15009. MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
  15010. // VersioningConfiguration is a required field
  15011. VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15012. }
  15013. // String returns the string representation
  15014. func (s PutBucketVersioningInput) String() string {
  15015. return awsutil.Prettify(s)
  15016. }
  15017. // GoString returns the string representation
  15018. func (s PutBucketVersioningInput) GoString() string {
  15019. return s.String()
  15020. }
  15021. // Validate inspects the fields of the type to determine if they are valid.
  15022. func (s *PutBucketVersioningInput) Validate() error {
  15023. invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
  15024. if s.Bucket == nil {
  15025. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15026. }
  15027. if s.VersioningConfiguration == nil {
  15028. invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
  15029. }
  15030. if invalidParams.Len() > 0 {
  15031. return invalidParams
  15032. }
  15033. return nil
  15034. }
  15035. // SetBucket sets the Bucket field's value.
  15036. func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
  15037. s.Bucket = &v
  15038. return s
  15039. }
  15040. func (s *PutBucketVersioningInput) getBucket() (v string) {
  15041. if s.Bucket == nil {
  15042. return v
  15043. }
  15044. return *s.Bucket
  15045. }
  15046. // SetMFA sets the MFA field's value.
  15047. func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
  15048. s.MFA = &v
  15049. return s
  15050. }
  15051. // SetVersioningConfiguration sets the VersioningConfiguration field's value.
  15052. func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
  15053. s.VersioningConfiguration = v
  15054. return s
  15055. }
  15056. type PutBucketVersioningOutput struct {
  15057. _ struct{} `type:"structure"`
  15058. }
  15059. // String returns the string representation
  15060. func (s PutBucketVersioningOutput) String() string {
  15061. return awsutil.Prettify(s)
  15062. }
  15063. // GoString returns the string representation
  15064. func (s PutBucketVersioningOutput) GoString() string {
  15065. return s.String()
  15066. }
  15067. type PutBucketWebsiteInput struct {
  15068. _ struct{} `type:"structure" payload:"WebsiteConfiguration"`
  15069. // Bucket is a required field
  15070. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15071. // WebsiteConfiguration is a required field
  15072. WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15073. }
  15074. // String returns the string representation
  15075. func (s PutBucketWebsiteInput) String() string {
  15076. return awsutil.Prettify(s)
  15077. }
  15078. // GoString returns the string representation
  15079. func (s PutBucketWebsiteInput) GoString() string {
  15080. return s.String()
  15081. }
  15082. // Validate inspects the fields of the type to determine if they are valid.
  15083. func (s *PutBucketWebsiteInput) Validate() error {
  15084. invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
  15085. if s.Bucket == nil {
  15086. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15087. }
  15088. if s.WebsiteConfiguration == nil {
  15089. invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
  15090. }
  15091. if s.WebsiteConfiguration != nil {
  15092. if err := s.WebsiteConfiguration.Validate(); err != nil {
  15093. invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
  15094. }
  15095. }
  15096. if invalidParams.Len() > 0 {
  15097. return invalidParams
  15098. }
  15099. return nil
  15100. }
  15101. // SetBucket sets the Bucket field's value.
  15102. func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
  15103. s.Bucket = &v
  15104. return s
  15105. }
  15106. func (s *PutBucketWebsiteInput) getBucket() (v string) {
  15107. if s.Bucket == nil {
  15108. return v
  15109. }
  15110. return *s.Bucket
  15111. }
  15112. // SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
  15113. func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
  15114. s.WebsiteConfiguration = v
  15115. return s
  15116. }
  15117. type PutBucketWebsiteOutput struct {
  15118. _ struct{} `type:"structure"`
  15119. }
  15120. // String returns the string representation
  15121. func (s PutBucketWebsiteOutput) String() string {
  15122. return awsutil.Prettify(s)
  15123. }
  15124. // GoString returns the string representation
  15125. func (s PutBucketWebsiteOutput) GoString() string {
  15126. return s.String()
  15127. }
  15128. type PutObjectAclInput struct {
  15129. _ struct{} `type:"structure" payload:"AccessControlPolicy"`
  15130. // The canned ACL to apply to the object.
  15131. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  15132. AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15133. // Bucket is a required field
  15134. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15135. // Allows grantee the read, write, read ACP, and write ACP permissions on the
  15136. // bucket.
  15137. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15138. // Allows grantee to list the objects in the bucket.
  15139. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15140. // Allows grantee to read the bucket ACL.
  15141. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15142. // Allows grantee to create, overwrite, and delete any object in the bucket.
  15143. GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
  15144. // Allows grantee to write the ACL for the applicable bucket.
  15145. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15146. // Key is a required field
  15147. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15148. // Confirms that the requester knows that she or he will be charged for the
  15149. // request. Bucket owners need not specify this parameter in their requests.
  15150. // Documentation on downloading objects from requester pays buckets can be found
  15151. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15152. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15153. // VersionId used to reference a specific version of the object.
  15154. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15155. }
  15156. // String returns the string representation
  15157. func (s PutObjectAclInput) String() string {
  15158. return awsutil.Prettify(s)
  15159. }
  15160. // GoString returns the string representation
  15161. func (s PutObjectAclInput) GoString() string {
  15162. return s.String()
  15163. }
  15164. // Validate inspects the fields of the type to determine if they are valid.
  15165. func (s *PutObjectAclInput) Validate() error {
  15166. invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
  15167. if s.Bucket == nil {
  15168. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15169. }
  15170. if s.Key == nil {
  15171. invalidParams.Add(request.NewErrParamRequired("Key"))
  15172. }
  15173. if s.Key != nil && len(*s.Key) < 1 {
  15174. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15175. }
  15176. if s.AccessControlPolicy != nil {
  15177. if err := s.AccessControlPolicy.Validate(); err != nil {
  15178. invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
  15179. }
  15180. }
  15181. if invalidParams.Len() > 0 {
  15182. return invalidParams
  15183. }
  15184. return nil
  15185. }
  15186. // SetACL sets the ACL field's value.
  15187. func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
  15188. s.ACL = &v
  15189. return s
  15190. }
  15191. // SetAccessControlPolicy sets the AccessControlPolicy field's value.
  15192. func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
  15193. s.AccessControlPolicy = v
  15194. return s
  15195. }
  15196. // SetBucket sets the Bucket field's value.
  15197. func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
  15198. s.Bucket = &v
  15199. return s
  15200. }
  15201. func (s *PutObjectAclInput) getBucket() (v string) {
  15202. if s.Bucket == nil {
  15203. return v
  15204. }
  15205. return *s.Bucket
  15206. }
  15207. // SetGrantFullControl sets the GrantFullControl field's value.
  15208. func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
  15209. s.GrantFullControl = &v
  15210. return s
  15211. }
  15212. // SetGrantRead sets the GrantRead field's value.
  15213. func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
  15214. s.GrantRead = &v
  15215. return s
  15216. }
  15217. // SetGrantReadACP sets the GrantReadACP field's value.
  15218. func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
  15219. s.GrantReadACP = &v
  15220. return s
  15221. }
  15222. // SetGrantWrite sets the GrantWrite field's value.
  15223. func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
  15224. s.GrantWrite = &v
  15225. return s
  15226. }
  15227. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15228. func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
  15229. s.GrantWriteACP = &v
  15230. return s
  15231. }
  15232. // SetKey sets the Key field's value.
  15233. func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
  15234. s.Key = &v
  15235. return s
  15236. }
  15237. // SetRequestPayer sets the RequestPayer field's value.
  15238. func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
  15239. s.RequestPayer = &v
  15240. return s
  15241. }
  15242. // SetVersionId sets the VersionId field's value.
  15243. func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
  15244. s.VersionId = &v
  15245. return s
  15246. }
  15247. type PutObjectAclOutput struct {
  15248. _ struct{} `type:"structure"`
  15249. // If present, indicates that the requester was successfully charged for the
  15250. // request.
  15251. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15252. }
  15253. // String returns the string representation
  15254. func (s PutObjectAclOutput) String() string {
  15255. return awsutil.Prettify(s)
  15256. }
  15257. // GoString returns the string representation
  15258. func (s PutObjectAclOutput) GoString() string {
  15259. return s.String()
  15260. }
  15261. // SetRequestCharged sets the RequestCharged field's value.
  15262. func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
  15263. s.RequestCharged = &v
  15264. return s
  15265. }
  15266. type PutObjectInput struct {
  15267. _ struct{} `type:"structure" payload:"Body"`
  15268. // The canned ACL to apply to the object.
  15269. ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
  15270. // Object data.
  15271. Body io.ReadSeeker `type:"blob"`
  15272. // Name of the bucket to which the PUT operation was initiated.
  15273. //
  15274. // Bucket is a required field
  15275. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15276. // Specifies caching behavior along the request/reply chain.
  15277. CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
  15278. // Specifies presentational information for the object.
  15279. ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
  15280. // Specifies what content encodings have been applied to the object and thus
  15281. // what decoding mechanisms must be applied to obtain the media-type referenced
  15282. // by the Content-Type header field.
  15283. ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
  15284. // The language the content is in.
  15285. ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
  15286. // Size of the body in bytes. This parameter is useful when the size of the
  15287. // body cannot be determined automatically.
  15288. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  15289. // The base64-encoded 128-bit MD5 digest of the part data.
  15290. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  15291. // A standard MIME type describing the format of the object data.
  15292. ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
  15293. // The date and time at which the object is no longer cacheable.
  15294. Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp" timestampFormat:"rfc822"`
  15295. // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
  15296. GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
  15297. // Allows grantee to read the object data and its metadata.
  15298. GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
  15299. // Allows grantee to read the object ACL.
  15300. GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
  15301. // Allows grantee to write the ACL for the applicable object.
  15302. GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
  15303. // Object key for which the PUT operation was initiated.
  15304. //
  15305. // Key is a required field
  15306. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15307. // A map of metadata to store with the object in S3.
  15308. Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
  15309. // Confirms that the requester knows that she or he will be charged for the
  15310. // request. Bucket owners need not specify this parameter in their requests.
  15311. // Documentation on downloading objects from requester pays buckets can be found
  15312. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  15313. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  15314. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  15315. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15316. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  15317. // data. This value is used to store the object and then it is discarded; Amazon
  15318. // does not store the encryption key. The key must be appropriate for use with
  15319. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  15320. // header.
  15321. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  15322. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  15323. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  15324. // key was transmitted without error.
  15325. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15326. // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
  15327. // requests for an object protected by AWS KMS will fail if not made via SSL
  15328. // or using SigV4. Documentation on configuring any of the officially supported
  15329. // AWS SDKs and CLI can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
  15330. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15331. // The Server-side encryption algorithm used when storing this object in S3
  15332. // (e.g., AES256, aws:kms).
  15333. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15334. // The type of storage to use for the object. Defaults to 'STANDARD'.
  15335. StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
  15336. // The tag-set for the object. The tag-set must be encoded as URL Query parameters
  15337. Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
  15338. // If the bucket is configured as a website, redirects requests for this object
  15339. // to another object in the same bucket or to an external URL. Amazon S3 stores
  15340. // the value of this header in the object metadata.
  15341. WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
  15342. }
  15343. // String returns the string representation
  15344. func (s PutObjectInput) String() string {
  15345. return awsutil.Prettify(s)
  15346. }
  15347. // GoString returns the string representation
  15348. func (s PutObjectInput) GoString() string {
  15349. return s.String()
  15350. }
  15351. // Validate inspects the fields of the type to determine if they are valid.
  15352. func (s *PutObjectInput) Validate() error {
  15353. invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
  15354. if s.Bucket == nil {
  15355. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15356. }
  15357. if s.Key == nil {
  15358. invalidParams.Add(request.NewErrParamRequired("Key"))
  15359. }
  15360. if s.Key != nil && len(*s.Key) < 1 {
  15361. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15362. }
  15363. if invalidParams.Len() > 0 {
  15364. return invalidParams
  15365. }
  15366. return nil
  15367. }
  15368. // SetACL sets the ACL field's value.
  15369. func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
  15370. s.ACL = &v
  15371. return s
  15372. }
  15373. // SetBody sets the Body field's value.
  15374. func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
  15375. s.Body = v
  15376. return s
  15377. }
  15378. // SetBucket sets the Bucket field's value.
  15379. func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
  15380. s.Bucket = &v
  15381. return s
  15382. }
  15383. func (s *PutObjectInput) getBucket() (v string) {
  15384. if s.Bucket == nil {
  15385. return v
  15386. }
  15387. return *s.Bucket
  15388. }
  15389. // SetCacheControl sets the CacheControl field's value.
  15390. func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
  15391. s.CacheControl = &v
  15392. return s
  15393. }
  15394. // SetContentDisposition sets the ContentDisposition field's value.
  15395. func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
  15396. s.ContentDisposition = &v
  15397. return s
  15398. }
  15399. // SetContentEncoding sets the ContentEncoding field's value.
  15400. func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
  15401. s.ContentEncoding = &v
  15402. return s
  15403. }
  15404. // SetContentLanguage sets the ContentLanguage field's value.
  15405. func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
  15406. s.ContentLanguage = &v
  15407. return s
  15408. }
  15409. // SetContentLength sets the ContentLength field's value.
  15410. func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
  15411. s.ContentLength = &v
  15412. return s
  15413. }
  15414. // SetContentMD5 sets the ContentMD5 field's value.
  15415. func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
  15416. s.ContentMD5 = &v
  15417. return s
  15418. }
  15419. // SetContentType sets the ContentType field's value.
  15420. func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
  15421. s.ContentType = &v
  15422. return s
  15423. }
  15424. // SetExpires sets the Expires field's value.
  15425. func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
  15426. s.Expires = &v
  15427. return s
  15428. }
  15429. // SetGrantFullControl sets the GrantFullControl field's value.
  15430. func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
  15431. s.GrantFullControl = &v
  15432. return s
  15433. }
  15434. // SetGrantRead sets the GrantRead field's value.
  15435. func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
  15436. s.GrantRead = &v
  15437. return s
  15438. }
  15439. // SetGrantReadACP sets the GrantReadACP field's value.
  15440. func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
  15441. s.GrantReadACP = &v
  15442. return s
  15443. }
  15444. // SetGrantWriteACP sets the GrantWriteACP field's value.
  15445. func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
  15446. s.GrantWriteACP = &v
  15447. return s
  15448. }
  15449. // SetKey sets the Key field's value.
  15450. func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
  15451. s.Key = &v
  15452. return s
  15453. }
  15454. // SetMetadata sets the Metadata field's value.
  15455. func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
  15456. s.Metadata = v
  15457. return s
  15458. }
  15459. // SetRequestPayer sets the RequestPayer field's value.
  15460. func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
  15461. s.RequestPayer = &v
  15462. return s
  15463. }
  15464. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15465. func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
  15466. s.SSECustomerAlgorithm = &v
  15467. return s
  15468. }
  15469. // SetSSECustomerKey sets the SSECustomerKey field's value.
  15470. func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
  15471. s.SSECustomerKey = &v
  15472. return s
  15473. }
  15474. func (s *PutObjectInput) getSSECustomerKey() (v string) {
  15475. if s.SSECustomerKey == nil {
  15476. return v
  15477. }
  15478. return *s.SSECustomerKey
  15479. }
  15480. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15481. func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
  15482. s.SSECustomerKeyMD5 = &v
  15483. return s
  15484. }
  15485. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15486. func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
  15487. s.SSEKMSKeyId = &v
  15488. return s
  15489. }
  15490. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15491. func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
  15492. s.ServerSideEncryption = &v
  15493. return s
  15494. }
  15495. // SetStorageClass sets the StorageClass field's value.
  15496. func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
  15497. s.StorageClass = &v
  15498. return s
  15499. }
  15500. // SetTagging sets the Tagging field's value.
  15501. func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
  15502. s.Tagging = &v
  15503. return s
  15504. }
  15505. // SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
  15506. func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
  15507. s.WebsiteRedirectLocation = &v
  15508. return s
  15509. }
  15510. type PutObjectOutput struct {
  15511. _ struct{} `type:"structure"`
  15512. // Entity tag for the uploaded object.
  15513. ETag *string `location:"header" locationName:"ETag" type:"string"`
  15514. // If the object expiration is configured, this will contain the expiration
  15515. // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
  15516. Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
  15517. // If present, indicates that the requester was successfully charged for the
  15518. // request.
  15519. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  15520. // If server-side encryption with a customer-provided encryption key was requested,
  15521. // the response will include this header confirming the encryption algorithm
  15522. // used.
  15523. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  15524. // If server-side encryption with a customer-provided encryption key was requested,
  15525. // the response will include this header to provide round trip message integrity
  15526. // verification of the customer-provided encryption key.
  15527. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  15528. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  15529. // encryption key that was used for the object.
  15530. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  15531. // The Server-side encryption algorithm used when storing this object in S3
  15532. // (e.g., AES256, aws:kms).
  15533. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  15534. // Version of the object.
  15535. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15536. }
  15537. // String returns the string representation
  15538. func (s PutObjectOutput) String() string {
  15539. return awsutil.Prettify(s)
  15540. }
  15541. // GoString returns the string representation
  15542. func (s PutObjectOutput) GoString() string {
  15543. return s.String()
  15544. }
  15545. // SetETag sets the ETag field's value.
  15546. func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
  15547. s.ETag = &v
  15548. return s
  15549. }
  15550. // SetExpiration sets the Expiration field's value.
  15551. func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
  15552. s.Expiration = &v
  15553. return s
  15554. }
  15555. // SetRequestCharged sets the RequestCharged field's value.
  15556. func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
  15557. s.RequestCharged = &v
  15558. return s
  15559. }
  15560. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  15561. func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
  15562. s.SSECustomerAlgorithm = &v
  15563. return s
  15564. }
  15565. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  15566. func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
  15567. s.SSECustomerKeyMD5 = &v
  15568. return s
  15569. }
  15570. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  15571. func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
  15572. s.SSEKMSKeyId = &v
  15573. return s
  15574. }
  15575. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  15576. func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
  15577. s.ServerSideEncryption = &v
  15578. return s
  15579. }
  15580. // SetVersionId sets the VersionId field's value.
  15581. func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
  15582. s.VersionId = &v
  15583. return s
  15584. }
  15585. type PutObjectTaggingInput struct {
  15586. _ struct{} `type:"structure" payload:"Tagging"`
  15587. // Bucket is a required field
  15588. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  15589. // Key is a required field
  15590. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  15591. // Tagging is a required field
  15592. Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  15593. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  15594. }
  15595. // String returns the string representation
  15596. func (s PutObjectTaggingInput) String() string {
  15597. return awsutil.Prettify(s)
  15598. }
  15599. // GoString returns the string representation
  15600. func (s PutObjectTaggingInput) GoString() string {
  15601. return s.String()
  15602. }
  15603. // Validate inspects the fields of the type to determine if they are valid.
  15604. func (s *PutObjectTaggingInput) Validate() error {
  15605. invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
  15606. if s.Bucket == nil {
  15607. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  15608. }
  15609. if s.Key == nil {
  15610. invalidParams.Add(request.NewErrParamRequired("Key"))
  15611. }
  15612. if s.Key != nil && len(*s.Key) < 1 {
  15613. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  15614. }
  15615. if s.Tagging == nil {
  15616. invalidParams.Add(request.NewErrParamRequired("Tagging"))
  15617. }
  15618. if s.Tagging != nil {
  15619. if err := s.Tagging.Validate(); err != nil {
  15620. invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
  15621. }
  15622. }
  15623. if invalidParams.Len() > 0 {
  15624. return invalidParams
  15625. }
  15626. return nil
  15627. }
  15628. // SetBucket sets the Bucket field's value.
  15629. func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
  15630. s.Bucket = &v
  15631. return s
  15632. }
  15633. func (s *PutObjectTaggingInput) getBucket() (v string) {
  15634. if s.Bucket == nil {
  15635. return v
  15636. }
  15637. return *s.Bucket
  15638. }
  15639. // SetKey sets the Key field's value.
  15640. func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
  15641. s.Key = &v
  15642. return s
  15643. }
  15644. // SetTagging sets the Tagging field's value.
  15645. func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
  15646. s.Tagging = v
  15647. return s
  15648. }
  15649. // SetVersionId sets the VersionId field's value.
  15650. func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
  15651. s.VersionId = &v
  15652. return s
  15653. }
  15654. type PutObjectTaggingOutput struct {
  15655. _ struct{} `type:"structure"`
  15656. VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
  15657. }
  15658. // String returns the string representation
  15659. func (s PutObjectTaggingOutput) String() string {
  15660. return awsutil.Prettify(s)
  15661. }
  15662. // GoString returns the string representation
  15663. func (s PutObjectTaggingOutput) GoString() string {
  15664. return s.String()
  15665. }
  15666. // SetVersionId sets the VersionId field's value.
  15667. func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
  15668. s.VersionId = &v
  15669. return s
  15670. }
  15671. // Container for specifying an configuration when you want Amazon S3 to publish
  15672. // events to an Amazon Simple Queue Service (Amazon SQS) queue.
  15673. type QueueConfiguration struct {
  15674. _ struct{} `type:"structure"`
  15675. // Events is a required field
  15676. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  15677. // Container for object key name filtering rules. For information about key
  15678. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  15679. Filter *NotificationConfigurationFilter `type:"structure"`
  15680. // Optional unique identifier for configurations in a notification configuration.
  15681. // If you don't provide one, Amazon S3 will assign an ID.
  15682. Id *string `type:"string"`
  15683. // Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects
  15684. // events of specified type.
  15685. //
  15686. // QueueArn is a required field
  15687. QueueArn *string `locationName:"Queue" type:"string" required:"true"`
  15688. }
  15689. // String returns the string representation
  15690. func (s QueueConfiguration) String() string {
  15691. return awsutil.Prettify(s)
  15692. }
  15693. // GoString returns the string representation
  15694. func (s QueueConfiguration) GoString() string {
  15695. return s.String()
  15696. }
  15697. // Validate inspects the fields of the type to determine if they are valid.
  15698. func (s *QueueConfiguration) Validate() error {
  15699. invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
  15700. if s.Events == nil {
  15701. invalidParams.Add(request.NewErrParamRequired("Events"))
  15702. }
  15703. if s.QueueArn == nil {
  15704. invalidParams.Add(request.NewErrParamRequired("QueueArn"))
  15705. }
  15706. if invalidParams.Len() > 0 {
  15707. return invalidParams
  15708. }
  15709. return nil
  15710. }
  15711. // SetEvents sets the Events field's value.
  15712. func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
  15713. s.Events = v
  15714. return s
  15715. }
  15716. // SetFilter sets the Filter field's value.
  15717. func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
  15718. s.Filter = v
  15719. return s
  15720. }
  15721. // SetId sets the Id field's value.
  15722. func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
  15723. s.Id = &v
  15724. return s
  15725. }
  15726. // SetQueueArn sets the QueueArn field's value.
  15727. func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
  15728. s.QueueArn = &v
  15729. return s
  15730. }
  15731. type QueueConfigurationDeprecated struct {
  15732. _ struct{} `type:"structure"`
  15733. // Bucket event for which to send notifications.
  15734. Event *string `deprecated:"true" type:"string" enum:"Event"`
  15735. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  15736. // Optional unique identifier for configurations in a notification configuration.
  15737. // If you don't provide one, Amazon S3 will assign an ID.
  15738. Id *string `type:"string"`
  15739. Queue *string `type:"string"`
  15740. }
  15741. // String returns the string representation
  15742. func (s QueueConfigurationDeprecated) String() string {
  15743. return awsutil.Prettify(s)
  15744. }
  15745. // GoString returns the string representation
  15746. func (s QueueConfigurationDeprecated) GoString() string {
  15747. return s.String()
  15748. }
  15749. // SetEvent sets the Event field's value.
  15750. func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
  15751. s.Event = &v
  15752. return s
  15753. }
  15754. // SetEvents sets the Events field's value.
  15755. func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
  15756. s.Events = v
  15757. return s
  15758. }
  15759. // SetId sets the Id field's value.
  15760. func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
  15761. s.Id = &v
  15762. return s
  15763. }
  15764. // SetQueue sets the Queue field's value.
  15765. func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
  15766. s.Queue = &v
  15767. return s
  15768. }
  15769. type Redirect struct {
  15770. _ struct{} `type:"structure"`
  15771. // The host name to use in the redirect request.
  15772. HostName *string `type:"string"`
  15773. // The HTTP redirect code to use on the response. Not required if one of the
  15774. // siblings is present.
  15775. HttpRedirectCode *string `type:"string"`
  15776. // Protocol to use (http, https) when redirecting requests. The default is the
  15777. // protocol that is used in the original request.
  15778. Protocol *string `type:"string" enum:"Protocol"`
  15779. // The object key prefix to use in the redirect request. For example, to redirect
  15780. // requests for all pages with prefix docs/ (objects in the docs/ folder) to
  15781. // documents/, you can set a condition block with KeyPrefixEquals set to docs/
  15782. // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
  15783. // if one of the siblings is present. Can be present only if ReplaceKeyWith
  15784. // is not provided.
  15785. ReplaceKeyPrefixWith *string `type:"string"`
  15786. // The specific object key to use in the redirect request. For example, redirect
  15787. // request to error.html. Not required if one of the sibling is present. Can
  15788. // be present only if ReplaceKeyPrefixWith is not provided.
  15789. ReplaceKeyWith *string `type:"string"`
  15790. }
  15791. // String returns the string representation
  15792. func (s Redirect) String() string {
  15793. return awsutil.Prettify(s)
  15794. }
  15795. // GoString returns the string representation
  15796. func (s Redirect) GoString() string {
  15797. return s.String()
  15798. }
  15799. // SetHostName sets the HostName field's value.
  15800. func (s *Redirect) SetHostName(v string) *Redirect {
  15801. s.HostName = &v
  15802. return s
  15803. }
  15804. // SetHttpRedirectCode sets the HttpRedirectCode field's value.
  15805. func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
  15806. s.HttpRedirectCode = &v
  15807. return s
  15808. }
  15809. // SetProtocol sets the Protocol field's value.
  15810. func (s *Redirect) SetProtocol(v string) *Redirect {
  15811. s.Protocol = &v
  15812. return s
  15813. }
  15814. // SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
  15815. func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
  15816. s.ReplaceKeyPrefixWith = &v
  15817. return s
  15818. }
  15819. // SetReplaceKeyWith sets the ReplaceKeyWith field's value.
  15820. func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
  15821. s.ReplaceKeyWith = &v
  15822. return s
  15823. }
  15824. type RedirectAllRequestsTo struct {
  15825. _ struct{} `type:"structure"`
  15826. // Name of the host where requests will be redirected.
  15827. //
  15828. // HostName is a required field
  15829. HostName *string `type:"string" required:"true"`
  15830. // Protocol to use (http, https) when redirecting requests. The default is the
  15831. // protocol that is used in the original request.
  15832. Protocol *string `type:"string" enum:"Protocol"`
  15833. }
  15834. // String returns the string representation
  15835. func (s RedirectAllRequestsTo) String() string {
  15836. return awsutil.Prettify(s)
  15837. }
  15838. // GoString returns the string representation
  15839. func (s RedirectAllRequestsTo) GoString() string {
  15840. return s.String()
  15841. }
  15842. // Validate inspects the fields of the type to determine if they are valid.
  15843. func (s *RedirectAllRequestsTo) Validate() error {
  15844. invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
  15845. if s.HostName == nil {
  15846. invalidParams.Add(request.NewErrParamRequired("HostName"))
  15847. }
  15848. if invalidParams.Len() > 0 {
  15849. return invalidParams
  15850. }
  15851. return nil
  15852. }
  15853. // SetHostName sets the HostName field's value.
  15854. func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
  15855. s.HostName = &v
  15856. return s
  15857. }
  15858. // SetProtocol sets the Protocol field's value.
  15859. func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
  15860. s.Protocol = &v
  15861. return s
  15862. }
  15863. // Container for replication rules. You can add as many as 1,000 rules. Total
  15864. // replication configuration size can be up to 2 MB.
  15865. type ReplicationConfiguration struct {
  15866. _ struct{} `type:"structure"`
  15867. // Amazon Resource Name (ARN) of an IAM role for Amazon S3 to assume when replicating
  15868. // the objects.
  15869. //
  15870. // Role is a required field
  15871. Role *string `type:"string" required:"true"`
  15872. // Container for information about a particular replication rule. Replication
  15873. // configuration must have at least one rule and can contain up to 1,000 rules.
  15874. //
  15875. // Rules is a required field
  15876. Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  15877. }
  15878. // String returns the string representation
  15879. func (s ReplicationConfiguration) String() string {
  15880. return awsutil.Prettify(s)
  15881. }
  15882. // GoString returns the string representation
  15883. func (s ReplicationConfiguration) GoString() string {
  15884. return s.String()
  15885. }
  15886. // Validate inspects the fields of the type to determine if they are valid.
  15887. func (s *ReplicationConfiguration) Validate() error {
  15888. invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
  15889. if s.Role == nil {
  15890. invalidParams.Add(request.NewErrParamRequired("Role"))
  15891. }
  15892. if s.Rules == nil {
  15893. invalidParams.Add(request.NewErrParamRequired("Rules"))
  15894. }
  15895. if s.Rules != nil {
  15896. for i, v := range s.Rules {
  15897. if v == nil {
  15898. continue
  15899. }
  15900. if err := v.Validate(); err != nil {
  15901. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  15902. }
  15903. }
  15904. }
  15905. if invalidParams.Len() > 0 {
  15906. return invalidParams
  15907. }
  15908. return nil
  15909. }
  15910. // SetRole sets the Role field's value.
  15911. func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
  15912. s.Role = &v
  15913. return s
  15914. }
  15915. // SetRules sets the Rules field's value.
  15916. func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
  15917. s.Rules = v
  15918. return s
  15919. }
  15920. // Container for information about a particular replication rule.
  15921. type ReplicationRule struct {
  15922. _ struct{} `type:"structure"`
  15923. // Container for replication destination information.
  15924. //
  15925. // Destination is a required field
  15926. Destination *Destination `type:"structure" required:"true"`
  15927. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  15928. ID *string `type:"string"`
  15929. // Object keyname prefix identifying one or more objects to which the rule applies.
  15930. // Maximum prefix length can be up to 1,024 characters. Overlapping prefixes
  15931. // are not supported.
  15932. //
  15933. // Prefix is a required field
  15934. Prefix *string `type:"string" required:"true"`
  15935. // Container for filters that define which source objects should be replicated.
  15936. SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
  15937. // The rule is ignored if status is not Enabled.
  15938. //
  15939. // Status is a required field
  15940. Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
  15941. }
  15942. // String returns the string representation
  15943. func (s ReplicationRule) String() string {
  15944. return awsutil.Prettify(s)
  15945. }
  15946. // GoString returns the string representation
  15947. func (s ReplicationRule) GoString() string {
  15948. return s.String()
  15949. }
  15950. // Validate inspects the fields of the type to determine if they are valid.
  15951. func (s *ReplicationRule) Validate() error {
  15952. invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
  15953. if s.Destination == nil {
  15954. invalidParams.Add(request.NewErrParamRequired("Destination"))
  15955. }
  15956. if s.Prefix == nil {
  15957. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  15958. }
  15959. if s.Status == nil {
  15960. invalidParams.Add(request.NewErrParamRequired("Status"))
  15961. }
  15962. if s.Destination != nil {
  15963. if err := s.Destination.Validate(); err != nil {
  15964. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  15965. }
  15966. }
  15967. if s.SourceSelectionCriteria != nil {
  15968. if err := s.SourceSelectionCriteria.Validate(); err != nil {
  15969. invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
  15970. }
  15971. }
  15972. if invalidParams.Len() > 0 {
  15973. return invalidParams
  15974. }
  15975. return nil
  15976. }
  15977. // SetDestination sets the Destination field's value.
  15978. func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
  15979. s.Destination = v
  15980. return s
  15981. }
  15982. // SetID sets the ID field's value.
  15983. func (s *ReplicationRule) SetID(v string) *ReplicationRule {
  15984. s.ID = &v
  15985. return s
  15986. }
  15987. // SetPrefix sets the Prefix field's value.
  15988. func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
  15989. s.Prefix = &v
  15990. return s
  15991. }
  15992. // SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
  15993. func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
  15994. s.SourceSelectionCriteria = v
  15995. return s
  15996. }
  15997. // SetStatus sets the Status field's value.
  15998. func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
  15999. s.Status = &v
  16000. return s
  16001. }
  16002. type RequestPaymentConfiguration struct {
  16003. _ struct{} `type:"structure"`
  16004. // Specifies who pays for the download and request fees.
  16005. //
  16006. // Payer is a required field
  16007. Payer *string `type:"string" required:"true" enum:"Payer"`
  16008. }
  16009. // String returns the string representation
  16010. func (s RequestPaymentConfiguration) String() string {
  16011. return awsutil.Prettify(s)
  16012. }
  16013. // GoString returns the string representation
  16014. func (s RequestPaymentConfiguration) GoString() string {
  16015. return s.String()
  16016. }
  16017. // Validate inspects the fields of the type to determine if they are valid.
  16018. func (s *RequestPaymentConfiguration) Validate() error {
  16019. invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
  16020. if s.Payer == nil {
  16021. invalidParams.Add(request.NewErrParamRequired("Payer"))
  16022. }
  16023. if invalidParams.Len() > 0 {
  16024. return invalidParams
  16025. }
  16026. return nil
  16027. }
  16028. // SetPayer sets the Payer field's value.
  16029. func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
  16030. s.Payer = &v
  16031. return s
  16032. }
  16033. type RestoreObjectInput struct {
  16034. _ struct{} `type:"structure" payload:"RestoreRequest"`
  16035. // Bucket is a required field
  16036. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16037. // Key is a required field
  16038. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  16039. // Confirms that the requester knows that she or he will be charged for the
  16040. // request. Bucket owners need not specify this parameter in their requests.
  16041. // Documentation on downloading objects from requester pays buckets can be found
  16042. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  16043. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  16044. // Container for restore job parameters.
  16045. RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
  16046. VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
  16047. }
  16048. // String returns the string representation
  16049. func (s RestoreObjectInput) String() string {
  16050. return awsutil.Prettify(s)
  16051. }
  16052. // GoString returns the string representation
  16053. func (s RestoreObjectInput) GoString() string {
  16054. return s.String()
  16055. }
  16056. // Validate inspects the fields of the type to determine if they are valid.
  16057. func (s *RestoreObjectInput) Validate() error {
  16058. invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
  16059. if s.Bucket == nil {
  16060. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  16061. }
  16062. if s.Key == nil {
  16063. invalidParams.Add(request.NewErrParamRequired("Key"))
  16064. }
  16065. if s.Key != nil && len(*s.Key) < 1 {
  16066. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16067. }
  16068. if s.RestoreRequest != nil {
  16069. if err := s.RestoreRequest.Validate(); err != nil {
  16070. invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
  16071. }
  16072. }
  16073. if invalidParams.Len() > 0 {
  16074. return invalidParams
  16075. }
  16076. return nil
  16077. }
  16078. // SetBucket sets the Bucket field's value.
  16079. func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
  16080. s.Bucket = &v
  16081. return s
  16082. }
  16083. func (s *RestoreObjectInput) getBucket() (v string) {
  16084. if s.Bucket == nil {
  16085. return v
  16086. }
  16087. return *s.Bucket
  16088. }
  16089. // SetKey sets the Key field's value.
  16090. func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
  16091. s.Key = &v
  16092. return s
  16093. }
  16094. // SetRequestPayer sets the RequestPayer field's value.
  16095. func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
  16096. s.RequestPayer = &v
  16097. return s
  16098. }
  16099. // SetRestoreRequest sets the RestoreRequest field's value.
  16100. func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
  16101. s.RestoreRequest = v
  16102. return s
  16103. }
  16104. // SetVersionId sets the VersionId field's value.
  16105. func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
  16106. s.VersionId = &v
  16107. return s
  16108. }
  16109. type RestoreObjectOutput struct {
  16110. _ struct{} `type:"structure"`
  16111. // If present, indicates that the requester was successfully charged for the
  16112. // request.
  16113. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  16114. // Indicates the path in the provided S3 output location where Select results
  16115. // will be restored to.
  16116. RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
  16117. }
  16118. // String returns the string representation
  16119. func (s RestoreObjectOutput) String() string {
  16120. return awsutil.Prettify(s)
  16121. }
  16122. // GoString returns the string representation
  16123. func (s RestoreObjectOutput) GoString() string {
  16124. return s.String()
  16125. }
  16126. // SetRequestCharged sets the RequestCharged field's value.
  16127. func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
  16128. s.RequestCharged = &v
  16129. return s
  16130. }
  16131. // SetRestoreOutputPath sets the RestoreOutputPath field's value.
  16132. func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
  16133. s.RestoreOutputPath = &v
  16134. return s
  16135. }
  16136. // Container for restore job parameters.
  16137. type RestoreRequest struct {
  16138. _ struct{} `type:"structure"`
  16139. // Lifetime of the active copy in days. Do not use with restores that specify
  16140. // OutputLocation.
  16141. Days *int64 `type:"integer"`
  16142. // The optional description for the job.
  16143. Description *string `type:"string"`
  16144. // Glacier related parameters pertaining to this job. Do not use with restores
  16145. // that specify OutputLocation.
  16146. GlacierJobParameters *GlacierJobParameters `type:"structure"`
  16147. // Describes the location where the restore job's output is stored.
  16148. OutputLocation *OutputLocation `type:"structure"`
  16149. // Describes the parameters for Select job types.
  16150. SelectParameters *SelectParameters `type:"structure"`
  16151. // Glacier retrieval tier at which the restore will be processed.
  16152. Tier *string `type:"string" enum:"Tier"`
  16153. // Type of restore request.
  16154. Type *string `type:"string" enum:"RestoreRequestType"`
  16155. }
  16156. // String returns the string representation
  16157. func (s RestoreRequest) String() string {
  16158. return awsutil.Prettify(s)
  16159. }
  16160. // GoString returns the string representation
  16161. func (s RestoreRequest) GoString() string {
  16162. return s.String()
  16163. }
  16164. // Validate inspects the fields of the type to determine if they are valid.
  16165. func (s *RestoreRequest) Validate() error {
  16166. invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
  16167. if s.GlacierJobParameters != nil {
  16168. if err := s.GlacierJobParameters.Validate(); err != nil {
  16169. invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
  16170. }
  16171. }
  16172. if s.OutputLocation != nil {
  16173. if err := s.OutputLocation.Validate(); err != nil {
  16174. invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
  16175. }
  16176. }
  16177. if s.SelectParameters != nil {
  16178. if err := s.SelectParameters.Validate(); err != nil {
  16179. invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
  16180. }
  16181. }
  16182. if invalidParams.Len() > 0 {
  16183. return invalidParams
  16184. }
  16185. return nil
  16186. }
  16187. // SetDays sets the Days field's value.
  16188. func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
  16189. s.Days = &v
  16190. return s
  16191. }
  16192. // SetDescription sets the Description field's value.
  16193. func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
  16194. s.Description = &v
  16195. return s
  16196. }
  16197. // SetGlacierJobParameters sets the GlacierJobParameters field's value.
  16198. func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
  16199. s.GlacierJobParameters = v
  16200. return s
  16201. }
  16202. // SetOutputLocation sets the OutputLocation field's value.
  16203. func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
  16204. s.OutputLocation = v
  16205. return s
  16206. }
  16207. // SetSelectParameters sets the SelectParameters field's value.
  16208. func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
  16209. s.SelectParameters = v
  16210. return s
  16211. }
  16212. // SetTier sets the Tier field's value.
  16213. func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
  16214. s.Tier = &v
  16215. return s
  16216. }
  16217. // SetType sets the Type field's value.
  16218. func (s *RestoreRequest) SetType(v string) *RestoreRequest {
  16219. s.Type = &v
  16220. return s
  16221. }
  16222. type RoutingRule struct {
  16223. _ struct{} `type:"structure"`
  16224. // A container for describing a condition that must be met for the specified
  16225. // redirect to apply. For example, 1. If request is for pages in the /docs folder,
  16226. // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
  16227. // redirect request to another host where you might process the error.
  16228. Condition *Condition `type:"structure"`
  16229. // Container for redirect information. You can redirect requests to another
  16230. // host, to another page, or with another protocol. In the event of an error,
  16231. // you can can specify a different error code to return.
  16232. //
  16233. // Redirect is a required field
  16234. Redirect *Redirect `type:"structure" required:"true"`
  16235. }
  16236. // String returns the string representation
  16237. func (s RoutingRule) String() string {
  16238. return awsutil.Prettify(s)
  16239. }
  16240. // GoString returns the string representation
  16241. func (s RoutingRule) GoString() string {
  16242. return s.String()
  16243. }
  16244. // Validate inspects the fields of the type to determine if they are valid.
  16245. func (s *RoutingRule) Validate() error {
  16246. invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
  16247. if s.Redirect == nil {
  16248. invalidParams.Add(request.NewErrParamRequired("Redirect"))
  16249. }
  16250. if invalidParams.Len() > 0 {
  16251. return invalidParams
  16252. }
  16253. return nil
  16254. }
  16255. // SetCondition sets the Condition field's value.
  16256. func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
  16257. s.Condition = v
  16258. return s
  16259. }
  16260. // SetRedirect sets the Redirect field's value.
  16261. func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
  16262. s.Redirect = v
  16263. return s
  16264. }
  16265. type Rule struct {
  16266. _ struct{} `type:"structure"`
  16267. // Specifies the days since the initiation of an Incomplete Multipart Upload
  16268. // that Lifecycle will wait before permanently removing all parts of the upload.
  16269. AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
  16270. Expiration *LifecycleExpiration `type:"structure"`
  16271. // Unique identifier for the rule. The value cannot be longer than 255 characters.
  16272. ID *string `type:"string"`
  16273. // Specifies when noncurrent object versions expire. Upon expiration, Amazon
  16274. // S3 permanently deletes the noncurrent object versions. You set this lifecycle
  16275. // configuration action on a bucket that has versioning enabled (or suspended)
  16276. // to request that Amazon S3 delete noncurrent object versions at a specific
  16277. // period in the object's lifetime.
  16278. NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
  16279. // Container for the transition rule that describes when noncurrent objects
  16280. // transition to the STANDARD_IA, ONEZONE_IA or GLACIER storage class. If your
  16281. // bucket is versioning-enabled (or versioning is suspended), you can set this
  16282. // action to request that Amazon S3 transition noncurrent object versions to
  16283. // the STANDARD_IA, ONEZONE_IA or GLACIER storage class at a specific period
  16284. // in the object's lifetime.
  16285. NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
  16286. // Prefix identifying one or more objects to which the rule applies.
  16287. //
  16288. // Prefix is a required field
  16289. Prefix *string `type:"string" required:"true"`
  16290. // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
  16291. // is not currently being applied.
  16292. //
  16293. // Status is a required field
  16294. Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
  16295. Transition *Transition `type:"structure"`
  16296. }
  16297. // String returns the string representation
  16298. func (s Rule) String() string {
  16299. return awsutil.Prettify(s)
  16300. }
  16301. // GoString returns the string representation
  16302. func (s Rule) GoString() string {
  16303. return s.String()
  16304. }
  16305. // Validate inspects the fields of the type to determine if they are valid.
  16306. func (s *Rule) Validate() error {
  16307. invalidParams := request.ErrInvalidParams{Context: "Rule"}
  16308. if s.Prefix == nil {
  16309. invalidParams.Add(request.NewErrParamRequired("Prefix"))
  16310. }
  16311. if s.Status == nil {
  16312. invalidParams.Add(request.NewErrParamRequired("Status"))
  16313. }
  16314. if invalidParams.Len() > 0 {
  16315. return invalidParams
  16316. }
  16317. return nil
  16318. }
  16319. // SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
  16320. func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
  16321. s.AbortIncompleteMultipartUpload = v
  16322. return s
  16323. }
  16324. // SetExpiration sets the Expiration field's value.
  16325. func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
  16326. s.Expiration = v
  16327. return s
  16328. }
  16329. // SetID sets the ID field's value.
  16330. func (s *Rule) SetID(v string) *Rule {
  16331. s.ID = &v
  16332. return s
  16333. }
  16334. // SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
  16335. func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
  16336. s.NoncurrentVersionExpiration = v
  16337. return s
  16338. }
  16339. // SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
  16340. func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
  16341. s.NoncurrentVersionTransition = v
  16342. return s
  16343. }
  16344. // SetPrefix sets the Prefix field's value.
  16345. func (s *Rule) SetPrefix(v string) *Rule {
  16346. s.Prefix = &v
  16347. return s
  16348. }
  16349. // SetStatus sets the Status field's value.
  16350. func (s *Rule) SetStatus(v string) *Rule {
  16351. s.Status = &v
  16352. return s
  16353. }
  16354. // SetTransition sets the Transition field's value.
  16355. func (s *Rule) SetTransition(v *Transition) *Rule {
  16356. s.Transition = v
  16357. return s
  16358. }
  16359. // Specifies the use of SSE-KMS to encrypt delievered Inventory reports.
  16360. type SSEKMS struct {
  16361. _ struct{} `locationName:"SSE-KMS" type:"structure"`
  16362. // Specifies the ID of the AWS Key Management Service (KMS) master encryption
  16363. // key to use for encrypting Inventory reports.
  16364. //
  16365. // KeyId is a required field
  16366. KeyId *string `type:"string" required:"true"`
  16367. }
  16368. // String returns the string representation
  16369. func (s SSEKMS) String() string {
  16370. return awsutil.Prettify(s)
  16371. }
  16372. // GoString returns the string representation
  16373. func (s SSEKMS) GoString() string {
  16374. return s.String()
  16375. }
  16376. // Validate inspects the fields of the type to determine if they are valid.
  16377. func (s *SSEKMS) Validate() error {
  16378. invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
  16379. if s.KeyId == nil {
  16380. invalidParams.Add(request.NewErrParamRequired("KeyId"))
  16381. }
  16382. if invalidParams.Len() > 0 {
  16383. return invalidParams
  16384. }
  16385. return nil
  16386. }
  16387. // SetKeyId sets the KeyId field's value.
  16388. func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
  16389. s.KeyId = &v
  16390. return s
  16391. }
  16392. // Specifies the use of SSE-S3 to encrypt delievered Inventory reports.
  16393. type SSES3 struct {
  16394. _ struct{} `locationName:"SSE-S3" type:"structure"`
  16395. }
  16396. // String returns the string representation
  16397. func (s SSES3) String() string {
  16398. return awsutil.Prettify(s)
  16399. }
  16400. // GoString returns the string representation
  16401. func (s SSES3) GoString() string {
  16402. return s.String()
  16403. }
  16404. // Describes the parameters for Select job types.
  16405. type SelectParameters struct {
  16406. _ struct{} `type:"structure"`
  16407. // The expression that is used to query the object.
  16408. //
  16409. // Expression is a required field
  16410. Expression *string `type:"string" required:"true"`
  16411. // The type of the provided expression (e.g., SQL).
  16412. //
  16413. // ExpressionType is a required field
  16414. ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
  16415. // Describes the serialization format of the object.
  16416. //
  16417. // InputSerialization is a required field
  16418. InputSerialization *InputSerialization `type:"structure" required:"true"`
  16419. // Describes how the results of the Select job are serialized.
  16420. //
  16421. // OutputSerialization is a required field
  16422. OutputSerialization *OutputSerialization `type:"structure" required:"true"`
  16423. }
  16424. // String returns the string representation
  16425. func (s SelectParameters) String() string {
  16426. return awsutil.Prettify(s)
  16427. }
  16428. // GoString returns the string representation
  16429. func (s SelectParameters) GoString() string {
  16430. return s.String()
  16431. }
  16432. // Validate inspects the fields of the type to determine if they are valid.
  16433. func (s *SelectParameters) Validate() error {
  16434. invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
  16435. if s.Expression == nil {
  16436. invalidParams.Add(request.NewErrParamRequired("Expression"))
  16437. }
  16438. if s.ExpressionType == nil {
  16439. invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
  16440. }
  16441. if s.InputSerialization == nil {
  16442. invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
  16443. }
  16444. if s.OutputSerialization == nil {
  16445. invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
  16446. }
  16447. if invalidParams.Len() > 0 {
  16448. return invalidParams
  16449. }
  16450. return nil
  16451. }
  16452. // SetExpression sets the Expression field's value.
  16453. func (s *SelectParameters) SetExpression(v string) *SelectParameters {
  16454. s.Expression = &v
  16455. return s
  16456. }
  16457. // SetExpressionType sets the ExpressionType field's value.
  16458. func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
  16459. s.ExpressionType = &v
  16460. return s
  16461. }
  16462. // SetInputSerialization sets the InputSerialization field's value.
  16463. func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
  16464. s.InputSerialization = v
  16465. return s
  16466. }
  16467. // SetOutputSerialization sets the OutputSerialization field's value.
  16468. func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
  16469. s.OutputSerialization = v
  16470. return s
  16471. }
  16472. // Describes the default server-side encryption to apply to new objects in the
  16473. // bucket. If Put Object request does not specify any server-side encryption,
  16474. // this default encryption will be applied.
  16475. type ServerSideEncryptionByDefault struct {
  16476. _ struct{} `type:"structure"`
  16477. // KMS master key ID to use for the default encryption. This parameter is allowed
  16478. // if SSEAlgorithm is aws:kms.
  16479. KMSMasterKeyID *string `type:"string"`
  16480. // Server-side encryption algorithm to use for the default encryption.
  16481. //
  16482. // SSEAlgorithm is a required field
  16483. SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
  16484. }
  16485. // String returns the string representation
  16486. func (s ServerSideEncryptionByDefault) String() string {
  16487. return awsutil.Prettify(s)
  16488. }
  16489. // GoString returns the string representation
  16490. func (s ServerSideEncryptionByDefault) GoString() string {
  16491. return s.String()
  16492. }
  16493. // Validate inspects the fields of the type to determine if they are valid.
  16494. func (s *ServerSideEncryptionByDefault) Validate() error {
  16495. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
  16496. if s.SSEAlgorithm == nil {
  16497. invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
  16498. }
  16499. if invalidParams.Len() > 0 {
  16500. return invalidParams
  16501. }
  16502. return nil
  16503. }
  16504. // SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
  16505. func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
  16506. s.KMSMasterKeyID = &v
  16507. return s
  16508. }
  16509. // SetSSEAlgorithm sets the SSEAlgorithm field's value.
  16510. func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
  16511. s.SSEAlgorithm = &v
  16512. return s
  16513. }
  16514. // Container for server-side encryption configuration rules. Currently S3 supports
  16515. // one rule only.
  16516. type ServerSideEncryptionConfiguration struct {
  16517. _ struct{} `type:"structure"`
  16518. // Container for information about a particular server-side encryption configuration
  16519. // rule.
  16520. //
  16521. // Rules is a required field
  16522. Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
  16523. }
  16524. // String returns the string representation
  16525. func (s ServerSideEncryptionConfiguration) String() string {
  16526. return awsutil.Prettify(s)
  16527. }
  16528. // GoString returns the string representation
  16529. func (s ServerSideEncryptionConfiguration) GoString() string {
  16530. return s.String()
  16531. }
  16532. // Validate inspects the fields of the type to determine if they are valid.
  16533. func (s *ServerSideEncryptionConfiguration) Validate() error {
  16534. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
  16535. if s.Rules == nil {
  16536. invalidParams.Add(request.NewErrParamRequired("Rules"))
  16537. }
  16538. if s.Rules != nil {
  16539. for i, v := range s.Rules {
  16540. if v == nil {
  16541. continue
  16542. }
  16543. if err := v.Validate(); err != nil {
  16544. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
  16545. }
  16546. }
  16547. }
  16548. if invalidParams.Len() > 0 {
  16549. return invalidParams
  16550. }
  16551. return nil
  16552. }
  16553. // SetRules sets the Rules field's value.
  16554. func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
  16555. s.Rules = v
  16556. return s
  16557. }
  16558. // Container for information about a particular server-side encryption configuration
  16559. // rule.
  16560. type ServerSideEncryptionRule struct {
  16561. _ struct{} `type:"structure"`
  16562. // Describes the default server-side encryption to apply to new objects in the
  16563. // bucket. If Put Object request does not specify any server-side encryption,
  16564. // this default encryption will be applied.
  16565. ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
  16566. }
  16567. // String returns the string representation
  16568. func (s ServerSideEncryptionRule) String() string {
  16569. return awsutil.Prettify(s)
  16570. }
  16571. // GoString returns the string representation
  16572. func (s ServerSideEncryptionRule) GoString() string {
  16573. return s.String()
  16574. }
  16575. // Validate inspects the fields of the type to determine if they are valid.
  16576. func (s *ServerSideEncryptionRule) Validate() error {
  16577. invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
  16578. if s.ApplyServerSideEncryptionByDefault != nil {
  16579. if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
  16580. invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
  16581. }
  16582. }
  16583. if invalidParams.Len() > 0 {
  16584. return invalidParams
  16585. }
  16586. return nil
  16587. }
  16588. // SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
  16589. func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
  16590. s.ApplyServerSideEncryptionByDefault = v
  16591. return s
  16592. }
  16593. // Container for filters that define which source objects should be replicated.
  16594. type SourceSelectionCriteria struct {
  16595. _ struct{} `type:"structure"`
  16596. // Container for filter information of selection of KMS Encrypted S3 objects.
  16597. SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
  16598. }
  16599. // String returns the string representation
  16600. func (s SourceSelectionCriteria) String() string {
  16601. return awsutil.Prettify(s)
  16602. }
  16603. // GoString returns the string representation
  16604. func (s SourceSelectionCriteria) GoString() string {
  16605. return s.String()
  16606. }
  16607. // Validate inspects the fields of the type to determine if they are valid.
  16608. func (s *SourceSelectionCriteria) Validate() error {
  16609. invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
  16610. if s.SseKmsEncryptedObjects != nil {
  16611. if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
  16612. invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
  16613. }
  16614. }
  16615. if invalidParams.Len() > 0 {
  16616. return invalidParams
  16617. }
  16618. return nil
  16619. }
  16620. // SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
  16621. func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
  16622. s.SseKmsEncryptedObjects = v
  16623. return s
  16624. }
  16625. // Container for filter information of selection of KMS Encrypted S3 objects.
  16626. type SseKmsEncryptedObjects struct {
  16627. _ struct{} `type:"structure"`
  16628. // The replication for KMS encrypted S3 objects is disabled if status is not
  16629. // Enabled.
  16630. //
  16631. // Status is a required field
  16632. Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
  16633. }
  16634. // String returns the string representation
  16635. func (s SseKmsEncryptedObjects) String() string {
  16636. return awsutil.Prettify(s)
  16637. }
  16638. // GoString returns the string representation
  16639. func (s SseKmsEncryptedObjects) GoString() string {
  16640. return s.String()
  16641. }
  16642. // Validate inspects the fields of the type to determine if they are valid.
  16643. func (s *SseKmsEncryptedObjects) Validate() error {
  16644. invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
  16645. if s.Status == nil {
  16646. invalidParams.Add(request.NewErrParamRequired("Status"))
  16647. }
  16648. if invalidParams.Len() > 0 {
  16649. return invalidParams
  16650. }
  16651. return nil
  16652. }
  16653. // SetStatus sets the Status field's value.
  16654. func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
  16655. s.Status = &v
  16656. return s
  16657. }
  16658. type StorageClassAnalysis struct {
  16659. _ struct{} `type:"structure"`
  16660. // A container used to describe how data related to the storage class analysis
  16661. // should be exported.
  16662. DataExport *StorageClassAnalysisDataExport `type:"structure"`
  16663. }
  16664. // String returns the string representation
  16665. func (s StorageClassAnalysis) String() string {
  16666. return awsutil.Prettify(s)
  16667. }
  16668. // GoString returns the string representation
  16669. func (s StorageClassAnalysis) GoString() string {
  16670. return s.String()
  16671. }
  16672. // Validate inspects the fields of the type to determine if they are valid.
  16673. func (s *StorageClassAnalysis) Validate() error {
  16674. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
  16675. if s.DataExport != nil {
  16676. if err := s.DataExport.Validate(); err != nil {
  16677. invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
  16678. }
  16679. }
  16680. if invalidParams.Len() > 0 {
  16681. return invalidParams
  16682. }
  16683. return nil
  16684. }
  16685. // SetDataExport sets the DataExport field's value.
  16686. func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
  16687. s.DataExport = v
  16688. return s
  16689. }
  16690. type StorageClassAnalysisDataExport struct {
  16691. _ struct{} `type:"structure"`
  16692. // The place to store the data for an analysis.
  16693. //
  16694. // Destination is a required field
  16695. Destination *AnalyticsExportDestination `type:"structure" required:"true"`
  16696. // The version of the output schema to use when exporting data. Must be V_1.
  16697. //
  16698. // OutputSchemaVersion is a required field
  16699. OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
  16700. }
  16701. // String returns the string representation
  16702. func (s StorageClassAnalysisDataExport) String() string {
  16703. return awsutil.Prettify(s)
  16704. }
  16705. // GoString returns the string representation
  16706. func (s StorageClassAnalysisDataExport) GoString() string {
  16707. return s.String()
  16708. }
  16709. // Validate inspects the fields of the type to determine if they are valid.
  16710. func (s *StorageClassAnalysisDataExport) Validate() error {
  16711. invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
  16712. if s.Destination == nil {
  16713. invalidParams.Add(request.NewErrParamRequired("Destination"))
  16714. }
  16715. if s.OutputSchemaVersion == nil {
  16716. invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
  16717. }
  16718. if s.Destination != nil {
  16719. if err := s.Destination.Validate(); err != nil {
  16720. invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
  16721. }
  16722. }
  16723. if invalidParams.Len() > 0 {
  16724. return invalidParams
  16725. }
  16726. return nil
  16727. }
  16728. // SetDestination sets the Destination field's value.
  16729. func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
  16730. s.Destination = v
  16731. return s
  16732. }
  16733. // SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
  16734. func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
  16735. s.OutputSchemaVersion = &v
  16736. return s
  16737. }
  16738. type Tag struct {
  16739. _ struct{} `type:"structure"`
  16740. // Name of the tag.
  16741. //
  16742. // Key is a required field
  16743. Key *string `min:"1" type:"string" required:"true"`
  16744. // Value of the tag.
  16745. //
  16746. // Value is a required field
  16747. Value *string `type:"string" required:"true"`
  16748. }
  16749. // String returns the string representation
  16750. func (s Tag) String() string {
  16751. return awsutil.Prettify(s)
  16752. }
  16753. // GoString returns the string representation
  16754. func (s Tag) GoString() string {
  16755. return s.String()
  16756. }
  16757. // Validate inspects the fields of the type to determine if they are valid.
  16758. func (s *Tag) Validate() error {
  16759. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  16760. if s.Key == nil {
  16761. invalidParams.Add(request.NewErrParamRequired("Key"))
  16762. }
  16763. if s.Key != nil && len(*s.Key) < 1 {
  16764. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  16765. }
  16766. if s.Value == nil {
  16767. invalidParams.Add(request.NewErrParamRequired("Value"))
  16768. }
  16769. if invalidParams.Len() > 0 {
  16770. return invalidParams
  16771. }
  16772. return nil
  16773. }
  16774. // SetKey sets the Key field's value.
  16775. func (s *Tag) SetKey(v string) *Tag {
  16776. s.Key = &v
  16777. return s
  16778. }
  16779. // SetValue sets the Value field's value.
  16780. func (s *Tag) SetValue(v string) *Tag {
  16781. s.Value = &v
  16782. return s
  16783. }
  16784. type Tagging struct {
  16785. _ struct{} `type:"structure"`
  16786. // TagSet is a required field
  16787. TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
  16788. }
  16789. // String returns the string representation
  16790. func (s Tagging) String() string {
  16791. return awsutil.Prettify(s)
  16792. }
  16793. // GoString returns the string representation
  16794. func (s Tagging) GoString() string {
  16795. return s.String()
  16796. }
  16797. // Validate inspects the fields of the type to determine if they are valid.
  16798. func (s *Tagging) Validate() error {
  16799. invalidParams := request.ErrInvalidParams{Context: "Tagging"}
  16800. if s.TagSet == nil {
  16801. invalidParams.Add(request.NewErrParamRequired("TagSet"))
  16802. }
  16803. if s.TagSet != nil {
  16804. for i, v := range s.TagSet {
  16805. if v == nil {
  16806. continue
  16807. }
  16808. if err := v.Validate(); err != nil {
  16809. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
  16810. }
  16811. }
  16812. }
  16813. if invalidParams.Len() > 0 {
  16814. return invalidParams
  16815. }
  16816. return nil
  16817. }
  16818. // SetTagSet sets the TagSet field's value.
  16819. func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
  16820. s.TagSet = v
  16821. return s
  16822. }
  16823. type TargetGrant struct {
  16824. _ struct{} `type:"structure"`
  16825. Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
  16826. // Logging permissions assigned to the Grantee for the bucket.
  16827. Permission *string `type:"string" enum:"BucketLogsPermission"`
  16828. }
  16829. // String returns the string representation
  16830. func (s TargetGrant) String() string {
  16831. return awsutil.Prettify(s)
  16832. }
  16833. // GoString returns the string representation
  16834. func (s TargetGrant) GoString() string {
  16835. return s.String()
  16836. }
  16837. // Validate inspects the fields of the type to determine if they are valid.
  16838. func (s *TargetGrant) Validate() error {
  16839. invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
  16840. if s.Grantee != nil {
  16841. if err := s.Grantee.Validate(); err != nil {
  16842. invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
  16843. }
  16844. }
  16845. if invalidParams.Len() > 0 {
  16846. return invalidParams
  16847. }
  16848. return nil
  16849. }
  16850. // SetGrantee sets the Grantee field's value.
  16851. func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
  16852. s.Grantee = v
  16853. return s
  16854. }
  16855. // SetPermission sets the Permission field's value.
  16856. func (s *TargetGrant) SetPermission(v string) *TargetGrant {
  16857. s.Permission = &v
  16858. return s
  16859. }
  16860. // Container for specifying the configuration when you want Amazon S3 to publish
  16861. // events to an Amazon Simple Notification Service (Amazon SNS) topic.
  16862. type TopicConfiguration struct {
  16863. _ struct{} `type:"structure"`
  16864. // Events is a required field
  16865. Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
  16866. // Container for object key name filtering rules. For information about key
  16867. // name filtering, go to Configuring Event Notifications (http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
  16868. Filter *NotificationConfigurationFilter `type:"structure"`
  16869. // Optional unique identifier for configurations in a notification configuration.
  16870. // If you don't provide one, Amazon S3 will assign an ID.
  16871. Id *string `type:"string"`
  16872. // Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects
  16873. // events of specified type.
  16874. //
  16875. // TopicArn is a required field
  16876. TopicArn *string `locationName:"Topic" type:"string" required:"true"`
  16877. }
  16878. // String returns the string representation
  16879. func (s TopicConfiguration) String() string {
  16880. return awsutil.Prettify(s)
  16881. }
  16882. // GoString returns the string representation
  16883. func (s TopicConfiguration) GoString() string {
  16884. return s.String()
  16885. }
  16886. // Validate inspects the fields of the type to determine if they are valid.
  16887. func (s *TopicConfiguration) Validate() error {
  16888. invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
  16889. if s.Events == nil {
  16890. invalidParams.Add(request.NewErrParamRequired("Events"))
  16891. }
  16892. if s.TopicArn == nil {
  16893. invalidParams.Add(request.NewErrParamRequired("TopicArn"))
  16894. }
  16895. if invalidParams.Len() > 0 {
  16896. return invalidParams
  16897. }
  16898. return nil
  16899. }
  16900. // SetEvents sets the Events field's value.
  16901. func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
  16902. s.Events = v
  16903. return s
  16904. }
  16905. // SetFilter sets the Filter field's value.
  16906. func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
  16907. s.Filter = v
  16908. return s
  16909. }
  16910. // SetId sets the Id field's value.
  16911. func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
  16912. s.Id = &v
  16913. return s
  16914. }
  16915. // SetTopicArn sets the TopicArn field's value.
  16916. func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
  16917. s.TopicArn = &v
  16918. return s
  16919. }
  16920. type TopicConfigurationDeprecated struct {
  16921. _ struct{} `type:"structure"`
  16922. // Bucket event for which to send notifications.
  16923. Event *string `deprecated:"true" type:"string" enum:"Event"`
  16924. Events []*string `locationName:"Event" type:"list" flattened:"true"`
  16925. // Optional unique identifier for configurations in a notification configuration.
  16926. // If you don't provide one, Amazon S3 will assign an ID.
  16927. Id *string `type:"string"`
  16928. // Amazon SNS topic to which Amazon S3 will publish a message to report the
  16929. // specified events for the bucket.
  16930. Topic *string `type:"string"`
  16931. }
  16932. // String returns the string representation
  16933. func (s TopicConfigurationDeprecated) String() string {
  16934. return awsutil.Prettify(s)
  16935. }
  16936. // GoString returns the string representation
  16937. func (s TopicConfigurationDeprecated) GoString() string {
  16938. return s.String()
  16939. }
  16940. // SetEvent sets the Event field's value.
  16941. func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
  16942. s.Event = &v
  16943. return s
  16944. }
  16945. // SetEvents sets the Events field's value.
  16946. func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
  16947. s.Events = v
  16948. return s
  16949. }
  16950. // SetId sets the Id field's value.
  16951. func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
  16952. s.Id = &v
  16953. return s
  16954. }
  16955. // SetTopic sets the Topic field's value.
  16956. func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
  16957. s.Topic = &v
  16958. return s
  16959. }
  16960. type Transition struct {
  16961. _ struct{} `type:"structure"`
  16962. // Indicates at what date the object is to be moved or deleted. Should be in
  16963. // GMT ISO 8601 Format.
  16964. Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
  16965. // Indicates the lifetime, in days, of the objects that are subject to the rule.
  16966. // The value must be a non-zero positive integer.
  16967. Days *int64 `type:"integer"`
  16968. // The class of storage used to store the object.
  16969. StorageClass *string `type:"string" enum:"TransitionStorageClass"`
  16970. }
  16971. // String returns the string representation
  16972. func (s Transition) String() string {
  16973. return awsutil.Prettify(s)
  16974. }
  16975. // GoString returns the string representation
  16976. func (s Transition) GoString() string {
  16977. return s.String()
  16978. }
  16979. // SetDate sets the Date field's value.
  16980. func (s *Transition) SetDate(v time.Time) *Transition {
  16981. s.Date = &v
  16982. return s
  16983. }
  16984. // SetDays sets the Days field's value.
  16985. func (s *Transition) SetDays(v int64) *Transition {
  16986. s.Days = &v
  16987. return s
  16988. }
  16989. // SetStorageClass sets the StorageClass field's value.
  16990. func (s *Transition) SetStorageClass(v string) *Transition {
  16991. s.StorageClass = &v
  16992. return s
  16993. }
  16994. type UploadPartCopyInput struct {
  16995. _ struct{} `type:"structure"`
  16996. // Bucket is a required field
  16997. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  16998. // The name of the source bucket and key name of the source object, separated
  16999. // by a slash (/). Must be URL-encoded.
  17000. //
  17001. // CopySource is a required field
  17002. CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
  17003. // Copies the object if its entity tag (ETag) matches the specified tag.
  17004. CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
  17005. // Copies the object if it has been modified since the specified time.
  17006. CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp" timestampFormat:"rfc822"`
  17007. // Copies the object if its entity tag (ETag) is different than the specified
  17008. // ETag.
  17009. CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
  17010. // Copies the object if it hasn't been modified since the specified time.
  17011. CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp" timestampFormat:"rfc822"`
  17012. // The range of bytes to copy from the source object. The range value must use
  17013. // the form bytes=first-last, where the first and last are the zero-based byte
  17014. // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
  17015. // first ten bytes of the source. You can copy a range only if the source object
  17016. // is greater than 5 GB.
  17017. CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
  17018. // Specifies the algorithm to use when decrypting the source object (e.g., AES256).
  17019. CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
  17020. // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
  17021. // the source object. The encryption key provided in this header must be one
  17022. // that was used when the source object was created.
  17023. CopySourceSSECustomerKey *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string"`
  17024. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17025. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17026. // key was transmitted without error.
  17027. CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
  17028. // Key is a required field
  17029. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17030. // Part number of part being copied. This is a positive integer between 1 and
  17031. // 10,000.
  17032. //
  17033. // PartNumber is a required field
  17034. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  17035. // Confirms that the requester knows that she or he will be charged for the
  17036. // request. Bucket owners need not specify this parameter in their requests.
  17037. // Documentation on downloading objects from requester pays buckets can be found
  17038. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17039. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17040. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17041. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17042. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17043. // data. This value is used to store the object and then it is discarded; Amazon
  17044. // does not store the encryption key. The key must be appropriate for use with
  17045. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17046. // header. This must be the same encryption key specified in the initiate multipart
  17047. // upload request.
  17048. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  17049. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17050. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17051. // key was transmitted without error.
  17052. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17053. // Upload ID identifying the multipart upload whose part is being copied.
  17054. //
  17055. // UploadId is a required field
  17056. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  17057. }
  17058. // String returns the string representation
  17059. func (s UploadPartCopyInput) String() string {
  17060. return awsutil.Prettify(s)
  17061. }
  17062. // GoString returns the string representation
  17063. func (s UploadPartCopyInput) GoString() string {
  17064. return s.String()
  17065. }
  17066. // Validate inspects the fields of the type to determine if they are valid.
  17067. func (s *UploadPartCopyInput) Validate() error {
  17068. invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
  17069. if s.Bucket == nil {
  17070. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17071. }
  17072. if s.CopySource == nil {
  17073. invalidParams.Add(request.NewErrParamRequired("CopySource"))
  17074. }
  17075. if s.Key == nil {
  17076. invalidParams.Add(request.NewErrParamRequired("Key"))
  17077. }
  17078. if s.Key != nil && len(*s.Key) < 1 {
  17079. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17080. }
  17081. if s.PartNumber == nil {
  17082. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  17083. }
  17084. if s.UploadId == nil {
  17085. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  17086. }
  17087. if invalidParams.Len() > 0 {
  17088. return invalidParams
  17089. }
  17090. return nil
  17091. }
  17092. // SetBucket sets the Bucket field's value.
  17093. func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
  17094. s.Bucket = &v
  17095. return s
  17096. }
  17097. func (s *UploadPartCopyInput) getBucket() (v string) {
  17098. if s.Bucket == nil {
  17099. return v
  17100. }
  17101. return *s.Bucket
  17102. }
  17103. // SetCopySource sets the CopySource field's value.
  17104. func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
  17105. s.CopySource = &v
  17106. return s
  17107. }
  17108. // SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
  17109. func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
  17110. s.CopySourceIfMatch = &v
  17111. return s
  17112. }
  17113. // SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
  17114. func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
  17115. s.CopySourceIfModifiedSince = &v
  17116. return s
  17117. }
  17118. // SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
  17119. func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
  17120. s.CopySourceIfNoneMatch = &v
  17121. return s
  17122. }
  17123. // SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
  17124. func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
  17125. s.CopySourceIfUnmodifiedSince = &v
  17126. return s
  17127. }
  17128. // SetCopySourceRange sets the CopySourceRange field's value.
  17129. func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
  17130. s.CopySourceRange = &v
  17131. return s
  17132. }
  17133. // SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
  17134. func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  17135. s.CopySourceSSECustomerAlgorithm = &v
  17136. return s
  17137. }
  17138. // SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
  17139. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
  17140. s.CopySourceSSECustomerKey = &v
  17141. return s
  17142. }
  17143. func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
  17144. if s.CopySourceSSECustomerKey == nil {
  17145. return v
  17146. }
  17147. return *s.CopySourceSSECustomerKey
  17148. }
  17149. // SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
  17150. func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  17151. s.CopySourceSSECustomerKeyMD5 = &v
  17152. return s
  17153. }
  17154. // SetKey sets the Key field's value.
  17155. func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
  17156. s.Key = &v
  17157. return s
  17158. }
  17159. // SetPartNumber sets the PartNumber field's value.
  17160. func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
  17161. s.PartNumber = &v
  17162. return s
  17163. }
  17164. // SetRequestPayer sets the RequestPayer field's value.
  17165. func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
  17166. s.RequestPayer = &v
  17167. return s
  17168. }
  17169. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17170. func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
  17171. s.SSECustomerAlgorithm = &v
  17172. return s
  17173. }
  17174. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17175. func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
  17176. s.SSECustomerKey = &v
  17177. return s
  17178. }
  17179. func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
  17180. if s.SSECustomerKey == nil {
  17181. return v
  17182. }
  17183. return *s.SSECustomerKey
  17184. }
  17185. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17186. func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
  17187. s.SSECustomerKeyMD5 = &v
  17188. return s
  17189. }
  17190. // SetUploadId sets the UploadId field's value.
  17191. func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
  17192. s.UploadId = &v
  17193. return s
  17194. }
  17195. type UploadPartCopyOutput struct {
  17196. _ struct{} `type:"structure" payload:"CopyPartResult"`
  17197. CopyPartResult *CopyPartResult `type:"structure"`
  17198. // The version of the source object that was copied, if you have enabled versioning
  17199. // on the source bucket.
  17200. CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
  17201. // If present, indicates that the requester was successfully charged for the
  17202. // request.
  17203. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17204. // If server-side encryption with a customer-provided encryption key was requested,
  17205. // the response will include this header confirming the encryption algorithm
  17206. // used.
  17207. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17208. // If server-side encryption with a customer-provided encryption key was requested,
  17209. // the response will include this header to provide round trip message integrity
  17210. // verification of the customer-provided encryption key.
  17211. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17212. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  17213. // encryption key that was used for the object.
  17214. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  17215. // The Server-side encryption algorithm used when storing this object in S3
  17216. // (e.g., AES256, aws:kms).
  17217. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17218. }
  17219. // String returns the string representation
  17220. func (s UploadPartCopyOutput) String() string {
  17221. return awsutil.Prettify(s)
  17222. }
  17223. // GoString returns the string representation
  17224. func (s UploadPartCopyOutput) GoString() string {
  17225. return s.String()
  17226. }
  17227. // SetCopyPartResult sets the CopyPartResult field's value.
  17228. func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
  17229. s.CopyPartResult = v
  17230. return s
  17231. }
  17232. // SetCopySourceVersionId sets the CopySourceVersionId field's value.
  17233. func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
  17234. s.CopySourceVersionId = &v
  17235. return s
  17236. }
  17237. // SetRequestCharged sets the RequestCharged field's value.
  17238. func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
  17239. s.RequestCharged = &v
  17240. return s
  17241. }
  17242. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17243. func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
  17244. s.SSECustomerAlgorithm = &v
  17245. return s
  17246. }
  17247. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17248. func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
  17249. s.SSECustomerKeyMD5 = &v
  17250. return s
  17251. }
  17252. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17253. func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
  17254. s.SSEKMSKeyId = &v
  17255. return s
  17256. }
  17257. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17258. func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
  17259. s.ServerSideEncryption = &v
  17260. return s
  17261. }
  17262. type UploadPartInput struct {
  17263. _ struct{} `type:"structure" payload:"Body"`
  17264. // Object data.
  17265. Body io.ReadSeeker `type:"blob"`
  17266. // Name of the bucket to which the multipart upload was initiated.
  17267. //
  17268. // Bucket is a required field
  17269. Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
  17270. // Size of the body in bytes. This parameter is useful when the size of the
  17271. // body cannot be determined automatically.
  17272. ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
  17273. // The base64-encoded 128-bit MD5 digest of the part data.
  17274. ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
  17275. // Object key for which the multipart upload was initiated.
  17276. //
  17277. // Key is a required field
  17278. Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
  17279. // Part number of part being uploaded. This is a positive integer between 1
  17280. // and 10,000.
  17281. //
  17282. // PartNumber is a required field
  17283. PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
  17284. // Confirms that the requester knows that she or he will be charged for the
  17285. // request. Bucket owners need not specify this parameter in their requests.
  17286. // Documentation on downloading objects from requester pays buckets can be found
  17287. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17288. RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
  17289. // Specifies the algorithm to use to when encrypting the object (e.g., AES256).
  17290. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17291. // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
  17292. // data. This value is used to store the object and then it is discarded; Amazon
  17293. // does not store the encryption key. The key must be appropriate for use with
  17294. // the algorithm specified in the x-amz-server-side​-encryption​-customer-algorithm
  17295. // header. This must be the same encryption key specified in the initiate multipart
  17296. // upload request.
  17297. SSECustomerKey *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string"`
  17298. // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
  17299. // Amazon S3 uses this header for a message integrity check to ensure the encryption
  17300. // key was transmitted without error.
  17301. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17302. // Upload ID identifying the multipart upload whose part is being uploaded.
  17303. //
  17304. // UploadId is a required field
  17305. UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
  17306. }
  17307. // String returns the string representation
  17308. func (s UploadPartInput) String() string {
  17309. return awsutil.Prettify(s)
  17310. }
  17311. // GoString returns the string representation
  17312. func (s UploadPartInput) GoString() string {
  17313. return s.String()
  17314. }
  17315. // Validate inspects the fields of the type to determine if they are valid.
  17316. func (s *UploadPartInput) Validate() error {
  17317. invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
  17318. if s.Bucket == nil {
  17319. invalidParams.Add(request.NewErrParamRequired("Bucket"))
  17320. }
  17321. if s.Key == nil {
  17322. invalidParams.Add(request.NewErrParamRequired("Key"))
  17323. }
  17324. if s.Key != nil && len(*s.Key) < 1 {
  17325. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  17326. }
  17327. if s.PartNumber == nil {
  17328. invalidParams.Add(request.NewErrParamRequired("PartNumber"))
  17329. }
  17330. if s.UploadId == nil {
  17331. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  17332. }
  17333. if invalidParams.Len() > 0 {
  17334. return invalidParams
  17335. }
  17336. return nil
  17337. }
  17338. // SetBody sets the Body field's value.
  17339. func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
  17340. s.Body = v
  17341. return s
  17342. }
  17343. // SetBucket sets the Bucket field's value.
  17344. func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
  17345. s.Bucket = &v
  17346. return s
  17347. }
  17348. func (s *UploadPartInput) getBucket() (v string) {
  17349. if s.Bucket == nil {
  17350. return v
  17351. }
  17352. return *s.Bucket
  17353. }
  17354. // SetContentLength sets the ContentLength field's value.
  17355. func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
  17356. s.ContentLength = &v
  17357. return s
  17358. }
  17359. // SetContentMD5 sets the ContentMD5 field's value.
  17360. func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
  17361. s.ContentMD5 = &v
  17362. return s
  17363. }
  17364. // SetKey sets the Key field's value.
  17365. func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
  17366. s.Key = &v
  17367. return s
  17368. }
  17369. // SetPartNumber sets the PartNumber field's value.
  17370. func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
  17371. s.PartNumber = &v
  17372. return s
  17373. }
  17374. // SetRequestPayer sets the RequestPayer field's value.
  17375. func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
  17376. s.RequestPayer = &v
  17377. return s
  17378. }
  17379. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17380. func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
  17381. s.SSECustomerAlgorithm = &v
  17382. return s
  17383. }
  17384. // SetSSECustomerKey sets the SSECustomerKey field's value.
  17385. func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
  17386. s.SSECustomerKey = &v
  17387. return s
  17388. }
  17389. func (s *UploadPartInput) getSSECustomerKey() (v string) {
  17390. if s.SSECustomerKey == nil {
  17391. return v
  17392. }
  17393. return *s.SSECustomerKey
  17394. }
  17395. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17396. func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
  17397. s.SSECustomerKeyMD5 = &v
  17398. return s
  17399. }
  17400. // SetUploadId sets the UploadId field's value.
  17401. func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
  17402. s.UploadId = &v
  17403. return s
  17404. }
  17405. type UploadPartOutput struct {
  17406. _ struct{} `type:"structure"`
  17407. // Entity tag for the uploaded object.
  17408. ETag *string `location:"header" locationName:"ETag" type:"string"`
  17409. // If present, indicates that the requester was successfully charged for the
  17410. // request.
  17411. RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
  17412. // If server-side encryption with a customer-provided encryption key was requested,
  17413. // the response will include this header confirming the encryption algorithm
  17414. // used.
  17415. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
  17416. // If server-side encryption with a customer-provided encryption key was requested,
  17417. // the response will include this header to provide round trip message integrity
  17418. // verification of the customer-provided encryption key.
  17419. SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
  17420. // If present, specifies the ID of the AWS Key Management Service (KMS) master
  17421. // encryption key that was used for the object.
  17422. SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string"`
  17423. // The Server-side encryption algorithm used when storing this object in S3
  17424. // (e.g., AES256, aws:kms).
  17425. ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
  17426. }
  17427. // String returns the string representation
  17428. func (s UploadPartOutput) String() string {
  17429. return awsutil.Prettify(s)
  17430. }
  17431. // GoString returns the string representation
  17432. func (s UploadPartOutput) GoString() string {
  17433. return s.String()
  17434. }
  17435. // SetETag sets the ETag field's value.
  17436. func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
  17437. s.ETag = &v
  17438. return s
  17439. }
  17440. // SetRequestCharged sets the RequestCharged field's value.
  17441. func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
  17442. s.RequestCharged = &v
  17443. return s
  17444. }
  17445. // SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
  17446. func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
  17447. s.SSECustomerAlgorithm = &v
  17448. return s
  17449. }
  17450. // SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
  17451. func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
  17452. s.SSECustomerKeyMD5 = &v
  17453. return s
  17454. }
  17455. // SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
  17456. func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
  17457. s.SSEKMSKeyId = &v
  17458. return s
  17459. }
  17460. // SetServerSideEncryption sets the ServerSideEncryption field's value.
  17461. func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
  17462. s.ServerSideEncryption = &v
  17463. return s
  17464. }
  17465. type VersioningConfiguration struct {
  17466. _ struct{} `type:"structure"`
  17467. // Specifies whether MFA delete is enabled in the bucket versioning configuration.
  17468. // This element is only returned if the bucket has been configured with MFA
  17469. // delete. If the bucket has never been so configured, this element is not returned.
  17470. MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
  17471. // The versioning state of the bucket.
  17472. Status *string `type:"string" enum:"BucketVersioningStatus"`
  17473. }
  17474. // String returns the string representation
  17475. func (s VersioningConfiguration) String() string {
  17476. return awsutil.Prettify(s)
  17477. }
  17478. // GoString returns the string representation
  17479. func (s VersioningConfiguration) GoString() string {
  17480. return s.String()
  17481. }
  17482. // SetMFADelete sets the MFADelete field's value.
  17483. func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
  17484. s.MFADelete = &v
  17485. return s
  17486. }
  17487. // SetStatus sets the Status field's value.
  17488. func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
  17489. s.Status = &v
  17490. return s
  17491. }
  17492. type WebsiteConfiguration struct {
  17493. _ struct{} `type:"structure"`
  17494. ErrorDocument *ErrorDocument `type:"structure"`
  17495. IndexDocument *IndexDocument `type:"structure"`
  17496. RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
  17497. RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
  17498. }
  17499. // String returns the string representation
  17500. func (s WebsiteConfiguration) String() string {
  17501. return awsutil.Prettify(s)
  17502. }
  17503. // GoString returns the string representation
  17504. func (s WebsiteConfiguration) GoString() string {
  17505. return s.String()
  17506. }
  17507. // Validate inspects the fields of the type to determine if they are valid.
  17508. func (s *WebsiteConfiguration) Validate() error {
  17509. invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
  17510. if s.ErrorDocument != nil {
  17511. if err := s.ErrorDocument.Validate(); err != nil {
  17512. invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
  17513. }
  17514. }
  17515. if s.IndexDocument != nil {
  17516. if err := s.IndexDocument.Validate(); err != nil {
  17517. invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
  17518. }
  17519. }
  17520. if s.RedirectAllRequestsTo != nil {
  17521. if err := s.RedirectAllRequestsTo.Validate(); err != nil {
  17522. invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
  17523. }
  17524. }
  17525. if s.RoutingRules != nil {
  17526. for i, v := range s.RoutingRules {
  17527. if v == nil {
  17528. continue
  17529. }
  17530. if err := v.Validate(); err != nil {
  17531. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
  17532. }
  17533. }
  17534. }
  17535. if invalidParams.Len() > 0 {
  17536. return invalidParams
  17537. }
  17538. return nil
  17539. }
  17540. // SetErrorDocument sets the ErrorDocument field's value.
  17541. func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
  17542. s.ErrorDocument = v
  17543. return s
  17544. }
  17545. // SetIndexDocument sets the IndexDocument field's value.
  17546. func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
  17547. s.IndexDocument = v
  17548. return s
  17549. }
  17550. // SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
  17551. func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
  17552. s.RedirectAllRequestsTo = v
  17553. return s
  17554. }
  17555. // SetRoutingRules sets the RoutingRules field's value.
  17556. func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
  17557. s.RoutingRules = v
  17558. return s
  17559. }
  17560. const (
  17561. // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
  17562. AnalyticsS3ExportFileFormatCsv = "CSV"
  17563. )
  17564. const (
  17565. // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
  17566. BucketAccelerateStatusEnabled = "Enabled"
  17567. // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
  17568. BucketAccelerateStatusSuspended = "Suspended"
  17569. )
  17570. const (
  17571. // BucketCannedACLPrivate is a BucketCannedACL enum value
  17572. BucketCannedACLPrivate = "private"
  17573. // BucketCannedACLPublicRead is a BucketCannedACL enum value
  17574. BucketCannedACLPublicRead = "public-read"
  17575. // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
  17576. BucketCannedACLPublicReadWrite = "public-read-write"
  17577. // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
  17578. BucketCannedACLAuthenticatedRead = "authenticated-read"
  17579. )
  17580. const (
  17581. // BucketLocationConstraintEu is a BucketLocationConstraint enum value
  17582. BucketLocationConstraintEu = "EU"
  17583. // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
  17584. BucketLocationConstraintEuWest1 = "eu-west-1"
  17585. // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
  17586. BucketLocationConstraintUsWest1 = "us-west-1"
  17587. // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
  17588. BucketLocationConstraintUsWest2 = "us-west-2"
  17589. // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
  17590. BucketLocationConstraintApSouth1 = "ap-south-1"
  17591. // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
  17592. BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
  17593. // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
  17594. BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
  17595. // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
  17596. BucketLocationConstraintApNortheast1 = "ap-northeast-1"
  17597. // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
  17598. BucketLocationConstraintSaEast1 = "sa-east-1"
  17599. // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
  17600. BucketLocationConstraintCnNorth1 = "cn-north-1"
  17601. // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
  17602. BucketLocationConstraintEuCentral1 = "eu-central-1"
  17603. )
  17604. const (
  17605. // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
  17606. BucketLogsPermissionFullControl = "FULL_CONTROL"
  17607. // BucketLogsPermissionRead is a BucketLogsPermission enum value
  17608. BucketLogsPermissionRead = "READ"
  17609. // BucketLogsPermissionWrite is a BucketLogsPermission enum value
  17610. BucketLogsPermissionWrite = "WRITE"
  17611. )
  17612. const (
  17613. // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
  17614. BucketVersioningStatusEnabled = "Enabled"
  17615. // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
  17616. BucketVersioningStatusSuspended = "Suspended"
  17617. )
  17618. const (
  17619. // CompressionTypeNone is a CompressionType enum value
  17620. CompressionTypeNone = "NONE"
  17621. // CompressionTypeGzip is a CompressionType enum value
  17622. CompressionTypeGzip = "GZIP"
  17623. )
  17624. // Requests Amazon S3 to encode the object keys in the response and specifies
  17625. // the encoding method to use. An object key may contain any Unicode character;
  17626. // however, XML 1.0 parser cannot parse some characters, such as characters
  17627. // with an ASCII value from 0 to 10. For characters that are not supported in
  17628. // XML 1.0, you can add this parameter to request that Amazon S3 encode the
  17629. // keys in the response.
  17630. const (
  17631. // EncodingTypeUrl is a EncodingType enum value
  17632. EncodingTypeUrl = "url"
  17633. )
  17634. // Bucket event for which to send notifications.
  17635. const (
  17636. // EventS3ReducedRedundancyLostObject is a Event enum value
  17637. EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
  17638. // EventS3ObjectCreated is a Event enum value
  17639. EventS3ObjectCreated = "s3:ObjectCreated:*"
  17640. // EventS3ObjectCreatedPut is a Event enum value
  17641. EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
  17642. // EventS3ObjectCreatedPost is a Event enum value
  17643. EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
  17644. // EventS3ObjectCreatedCopy is a Event enum value
  17645. EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
  17646. // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
  17647. EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
  17648. // EventS3ObjectRemoved is a Event enum value
  17649. EventS3ObjectRemoved = "s3:ObjectRemoved:*"
  17650. // EventS3ObjectRemovedDelete is a Event enum value
  17651. EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
  17652. // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
  17653. EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
  17654. )
  17655. const (
  17656. // ExpirationStatusEnabled is a ExpirationStatus enum value
  17657. ExpirationStatusEnabled = "Enabled"
  17658. // ExpirationStatusDisabled is a ExpirationStatus enum value
  17659. ExpirationStatusDisabled = "Disabled"
  17660. )
  17661. const (
  17662. // ExpressionTypeSql is a ExpressionType enum value
  17663. ExpressionTypeSql = "SQL"
  17664. )
  17665. const (
  17666. // FileHeaderInfoUse is a FileHeaderInfo enum value
  17667. FileHeaderInfoUse = "USE"
  17668. // FileHeaderInfoIgnore is a FileHeaderInfo enum value
  17669. FileHeaderInfoIgnore = "IGNORE"
  17670. // FileHeaderInfoNone is a FileHeaderInfo enum value
  17671. FileHeaderInfoNone = "NONE"
  17672. )
  17673. const (
  17674. // FilterRuleNamePrefix is a FilterRuleName enum value
  17675. FilterRuleNamePrefix = "prefix"
  17676. // FilterRuleNameSuffix is a FilterRuleName enum value
  17677. FilterRuleNameSuffix = "suffix"
  17678. )
  17679. const (
  17680. // InventoryFormatCsv is a InventoryFormat enum value
  17681. InventoryFormatCsv = "CSV"
  17682. // InventoryFormatOrc is a InventoryFormat enum value
  17683. InventoryFormatOrc = "ORC"
  17684. )
  17685. const (
  17686. // InventoryFrequencyDaily is a InventoryFrequency enum value
  17687. InventoryFrequencyDaily = "Daily"
  17688. // InventoryFrequencyWeekly is a InventoryFrequency enum value
  17689. InventoryFrequencyWeekly = "Weekly"
  17690. )
  17691. const (
  17692. // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
  17693. InventoryIncludedObjectVersionsAll = "All"
  17694. // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
  17695. InventoryIncludedObjectVersionsCurrent = "Current"
  17696. )
  17697. const (
  17698. // InventoryOptionalFieldSize is a InventoryOptionalField enum value
  17699. InventoryOptionalFieldSize = "Size"
  17700. // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
  17701. InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
  17702. // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
  17703. InventoryOptionalFieldStorageClass = "StorageClass"
  17704. // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
  17705. InventoryOptionalFieldEtag = "ETag"
  17706. // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
  17707. InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
  17708. // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
  17709. InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
  17710. // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
  17711. InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
  17712. )
  17713. const (
  17714. // JSONTypeDocument is a JSONType enum value
  17715. JSONTypeDocument = "DOCUMENT"
  17716. // JSONTypeLines is a JSONType enum value
  17717. JSONTypeLines = "LINES"
  17718. )
  17719. const (
  17720. // MFADeleteEnabled is a MFADelete enum value
  17721. MFADeleteEnabled = "Enabled"
  17722. // MFADeleteDisabled is a MFADelete enum value
  17723. MFADeleteDisabled = "Disabled"
  17724. )
  17725. const (
  17726. // MFADeleteStatusEnabled is a MFADeleteStatus enum value
  17727. MFADeleteStatusEnabled = "Enabled"
  17728. // MFADeleteStatusDisabled is a MFADeleteStatus enum value
  17729. MFADeleteStatusDisabled = "Disabled"
  17730. )
  17731. const (
  17732. // MetadataDirectiveCopy is a MetadataDirective enum value
  17733. MetadataDirectiveCopy = "COPY"
  17734. // MetadataDirectiveReplace is a MetadataDirective enum value
  17735. MetadataDirectiveReplace = "REPLACE"
  17736. )
  17737. const (
  17738. // ObjectCannedACLPrivate is a ObjectCannedACL enum value
  17739. ObjectCannedACLPrivate = "private"
  17740. // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
  17741. ObjectCannedACLPublicRead = "public-read"
  17742. // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
  17743. ObjectCannedACLPublicReadWrite = "public-read-write"
  17744. // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
  17745. ObjectCannedACLAuthenticatedRead = "authenticated-read"
  17746. // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
  17747. ObjectCannedACLAwsExecRead = "aws-exec-read"
  17748. // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
  17749. ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
  17750. // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
  17751. ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
  17752. )
  17753. const (
  17754. // ObjectStorageClassStandard is a ObjectStorageClass enum value
  17755. ObjectStorageClassStandard = "STANDARD"
  17756. // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
  17757. ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  17758. // ObjectStorageClassGlacier is a ObjectStorageClass enum value
  17759. ObjectStorageClassGlacier = "GLACIER"
  17760. // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
  17761. ObjectStorageClassStandardIa = "STANDARD_IA"
  17762. // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
  17763. ObjectStorageClassOnezoneIa = "ONEZONE_IA"
  17764. )
  17765. const (
  17766. // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
  17767. ObjectVersionStorageClassStandard = "STANDARD"
  17768. )
  17769. const (
  17770. // OwnerOverrideDestination is a OwnerOverride enum value
  17771. OwnerOverrideDestination = "Destination"
  17772. )
  17773. const (
  17774. // PayerRequester is a Payer enum value
  17775. PayerRequester = "Requester"
  17776. // PayerBucketOwner is a Payer enum value
  17777. PayerBucketOwner = "BucketOwner"
  17778. )
  17779. const (
  17780. // PermissionFullControl is a Permission enum value
  17781. PermissionFullControl = "FULL_CONTROL"
  17782. // PermissionWrite is a Permission enum value
  17783. PermissionWrite = "WRITE"
  17784. // PermissionWriteAcp is a Permission enum value
  17785. PermissionWriteAcp = "WRITE_ACP"
  17786. // PermissionRead is a Permission enum value
  17787. PermissionRead = "READ"
  17788. // PermissionReadAcp is a Permission enum value
  17789. PermissionReadAcp = "READ_ACP"
  17790. )
  17791. const (
  17792. // ProtocolHttp is a Protocol enum value
  17793. ProtocolHttp = "http"
  17794. // ProtocolHttps is a Protocol enum value
  17795. ProtocolHttps = "https"
  17796. )
  17797. const (
  17798. // QuoteFieldsAlways is a QuoteFields enum value
  17799. QuoteFieldsAlways = "ALWAYS"
  17800. // QuoteFieldsAsneeded is a QuoteFields enum value
  17801. QuoteFieldsAsneeded = "ASNEEDED"
  17802. )
  17803. const (
  17804. // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
  17805. ReplicationRuleStatusEnabled = "Enabled"
  17806. // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
  17807. ReplicationRuleStatusDisabled = "Disabled"
  17808. )
  17809. const (
  17810. // ReplicationStatusComplete is a ReplicationStatus enum value
  17811. ReplicationStatusComplete = "COMPLETE"
  17812. // ReplicationStatusPending is a ReplicationStatus enum value
  17813. ReplicationStatusPending = "PENDING"
  17814. // ReplicationStatusFailed is a ReplicationStatus enum value
  17815. ReplicationStatusFailed = "FAILED"
  17816. // ReplicationStatusReplica is a ReplicationStatus enum value
  17817. ReplicationStatusReplica = "REPLICA"
  17818. )
  17819. // If present, indicates that the requester was successfully charged for the
  17820. // request.
  17821. const (
  17822. // RequestChargedRequester is a RequestCharged enum value
  17823. RequestChargedRequester = "requester"
  17824. )
  17825. // Confirms that the requester knows that she or he will be charged for the
  17826. // request. Bucket owners need not specify this parameter in their requests.
  17827. // Documentation on downloading objects from requester pays buckets can be found
  17828. // at http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
  17829. const (
  17830. // RequestPayerRequester is a RequestPayer enum value
  17831. RequestPayerRequester = "requester"
  17832. )
  17833. const (
  17834. // RestoreRequestTypeSelect is a RestoreRequestType enum value
  17835. RestoreRequestTypeSelect = "SELECT"
  17836. )
  17837. const (
  17838. // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
  17839. ServerSideEncryptionAes256 = "AES256"
  17840. // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
  17841. ServerSideEncryptionAwsKms = "aws:kms"
  17842. )
  17843. const (
  17844. // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
  17845. SseKmsEncryptedObjectsStatusEnabled = "Enabled"
  17846. // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
  17847. SseKmsEncryptedObjectsStatusDisabled = "Disabled"
  17848. )
  17849. const (
  17850. // StorageClassStandard is a StorageClass enum value
  17851. StorageClassStandard = "STANDARD"
  17852. // StorageClassReducedRedundancy is a StorageClass enum value
  17853. StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
  17854. // StorageClassStandardIa is a StorageClass enum value
  17855. StorageClassStandardIa = "STANDARD_IA"
  17856. // StorageClassOnezoneIa is a StorageClass enum value
  17857. StorageClassOnezoneIa = "ONEZONE_IA"
  17858. )
  17859. const (
  17860. // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
  17861. StorageClassAnalysisSchemaVersionV1 = "V_1"
  17862. )
  17863. const (
  17864. // TaggingDirectiveCopy is a TaggingDirective enum value
  17865. TaggingDirectiveCopy = "COPY"
  17866. // TaggingDirectiveReplace is a TaggingDirective enum value
  17867. TaggingDirectiveReplace = "REPLACE"
  17868. )
  17869. const (
  17870. // TierStandard is a Tier enum value
  17871. TierStandard = "Standard"
  17872. // TierBulk is a Tier enum value
  17873. TierBulk = "Bulk"
  17874. // TierExpedited is a Tier enum value
  17875. TierExpedited = "Expedited"
  17876. )
  17877. const (
  17878. // TransitionStorageClassGlacier is a TransitionStorageClass enum value
  17879. TransitionStorageClassGlacier = "GLACIER"
  17880. // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
  17881. TransitionStorageClassStandardIa = "STANDARD_IA"
  17882. // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
  17883. TransitionStorageClassOnezoneIa = "ONEZONE_IA"
  17884. )
  17885. const (
  17886. // TypeCanonicalUser is a Type enum value
  17887. TypeCanonicalUser = "CanonicalUser"
  17888. // TypeAmazonCustomerByEmail is a Type enum value
  17889. TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
  17890. // TypeGroup is a Type enum value
  17891. TypeGroup = "Group"
  17892. )